Skip to content

Commit 09833f4

Browse files
committed
wip improve docs
1 parent 0fceae4 commit 09833f4

File tree

7 files changed

+52
-26
lines changed

7 files changed

+52
-26
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
/deps
22
/bin/*
3-
/lib/*
3+
/lib/hypercore.so
4+
/lib/hypercore.a

README.md

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,28 @@
11
# SYNOPSIS
22
Hypercore is a secure, distributed append-only log.
33

4+
# OBJECTIVES
5+
- `datcxx` should ultimately output Static and Dynamic shared Libraries (so the
6+
internal structure of this project won't matter to the end consumer).
7+
8+
- You should be able to do something like `[brew|apt] install libdat` and then
9+
`#include <libdat>` and use it like it was any other C++ library.
10+
11+
- It will have a public interface that is at parity with other implementations
12+
(the JavaScript implementation being today's canonical implementation).
13+
14+
# FAQ
15+
16+
```
17+
Q: Will I need to use `build` if I want to use `datcxx`?
18+
A: No.
19+
```
20+
21+
```
22+
Q: I tried brew or apt install but I cant install this.
23+
A: It's not ready yet.
24+
```
25+
426
# BUILD
527
To generate a `shared library`, install the [`build`][0] tool and run the
628
following command...
@@ -9,7 +31,18 @@ Run install and then build.
931

1032
```bash
1133
build i
12-
build -g
34+
build test
35+
build run shared
1336
```
1437

38+
If you want to produce a static library run
39+
40+
```
41+
build run static
42+
```
43+
44+
# SEE ALSO
45+
How [dat][1] works.
46+
1547
[0]:https://github.com/datcxx/build
48+
[1]:https://datprotocol.github.io/how-dat-works/

lib/hypercore.so

-35.6 KB
Binary file not shown.

lib/hypercore.so.dSYM/Contents/Info.plist

Lines changed: 0 additions & 20 deletions
This file was deleted.
Binary file not shown.

package.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,15 @@
66
"url": "[email protected]:datcxx/cxx-hypercore.git"
77
},
88
"dependencies": {
9-
"[email protected]:datcxx/cxx-flat-tree": "c051eac4"
9+
"[email protected]:datcxx/cxx-flat-tree": "c051eac4",
10+
"[email protected]:datcxx/cxx-eventemitter": "63d10af1",
11+
"[email protected]:datcxx/cxx-timers": "7d2ff2b7",
12+
"[email protected]:heapwolf/cxx-tap": "07821de0"
1013
},
1114
"scripts": {
12-
"test": "c++ -std=c++2a test/index.cxx lib/hypercore.so -o test/index && ./test/index"
15+
"test": "c++ -std=c++2a test/index.cxx lib/hypercore.so -o test/index && ./test/index",
16+
"shared": "",
17+
"static": ""
1318
},
1419
"flags": [
1520
"-shared",

test/index.cxx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
#include "../index.hxx"
2+
#include "../deps/heapwolf/cxx-tap/index.hxx"
23

34
#include <iostream>
5+
#include <sstream>
46

5-
int main () {
6-
std::cout << Hypercore::getIndex() << std::endl;
7+
int main() {
8+
TAP::Test t;
9+
10+
t.test("sanity", [](auto t) {
11+
t->ok(true, "true is true");
12+
t->end();
13+
});
714
}

0 commit comments

Comments
 (0)