Skip to content

Commit 6730350

Browse files
committed
cleanup
1 parent 975dd86 commit 6730350

File tree

9 files changed

+58
-16
lines changed

9 files changed

+58
-16
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Hypercore is a secure, distributed append-only log.
33

44
# BUILD
5-
To generate a `shared library`, install the [`build-tool`][0] and run the
5+
To generate a `shared library`, install the [`build`][0] tool and run the
66
following command...
77

88
Run install and then build.

index.cxx

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
#include "index.hxx"
12
#include "deps/datcxx/cxx-flat-tree/index.hxx"
23

3-
#include <iostream>
4-
5-
int main () {
6-
std::cout << flatTree::index(0, 0) << std::endl;
7-
}
4+
namespace Hypercore {
5+
size_t getIndex () {
6+
return flatTree::index(0, 0);
7+
}
8+
} // namespace Hypercore

index.hxx

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#ifndef DAT_HYPERCORE_H
2+
#define DAT_HYPERCORE_H
3+
4+
#include <stddef.h>
5+
6+
namespace Hypercore {
7+
size_t getIndex ();
8+
}
9+
10+
#endif

lib/hypercore.so

35.6 KB
Binary file not shown.
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>CFBundleDevelopmentRegion</key>
6+
<string>English</string>
7+
<key>CFBundleIdentifier</key>
8+
<string>com.apple.xcode.dsym.hypercore.so</string>
9+
<key>CFBundleInfoDictionaryVersion</key>
10+
<string>6.0</string>
11+
<key>CFBundlePackageType</key>
12+
<string>dSYM</string>
13+
<key>CFBundleSignature</key>
14+
<string>????</string>
15+
<key>CFBundleShortVersionString</key>
16+
<string>1.0</string>
17+
<key>CFBundleVersion</key>
18+
<string>1</string>
19+
</dict>
20+
</plist>
Binary file not shown.

package.json

+14-10
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,24 @@
11
{
22
"name": "hypercore",
3-
"main": "index.cxx",
43
"description": "Hypercore is a secure, distributed append-only log.",
5-
"dependencies": {
6-
"[email protected]:datcxx/cxx-flat-tree": "ceda12f3"
7-
},
84
"repository": {
95
"type": "git",
10-
"url": "git+https://github.com/datcxx/cxx-hypercore.git"
6+
"url": "[email protected]:datcxx/cxx-hypercore.git"
7+
},
8+
"dependencies": {
9+
"[email protected]:datcxx/cxx-flat-tree": "c051eac4"
10+
},
11+
"scripts": {
12+
"test": "c++ -std=c++2a test/index.cxx lib/hypercore.so -o test/index && ./test/index"
1113
},
1214
"flags": [
13-
"-o ./bin/hypercore",
15+
"-shared",
16+
"-o ./lib/hypercore.so",
1417
"-std=c++2a",
1518
"-ferror-limit=2"
1619
],
17-
"scripts": {
18-
"test": "c++ test/index.cxx -o test/index && ./test/index"
19-
}
20-
}
20+
"files": [
21+
"index.hxx",
22+
"index.cxx"
23+
]
24+
}

test/index

9.32 KB
Binary file not shown.

test/index.cxx

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#include "../index.hxx"
2+
3+
#include <iostream>
4+
5+
int main () {
6+
std::cout << Hypercore::getIndex() << std::endl;
7+
}

0 commit comments

Comments
 (0)