Skip to content
This repository was archived by the owner on Apr 15, 2024. It is now read-only.

Commit 762142e

Browse files
author
Brord van Wierst
authored
Merge pull request #40 from iotaledger/kwek20-patch-2
Updated C bindings instructions
2 parents c921870 + 7bc948b commit 762142e

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

bindings/c/README.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,21 @@
22

33
## Instructions
44

5-
Change `src/constants.rs` to your preferred node and settings. (default to localhost)
5+
Check out `CMakeLists.txt` and change the 3 options to your preference:
6+
7+
- `NO_STD`: Enable no_std build, without iota_client (when ON, `SYNC_CLIENT` isnt supported)
8+
- `SYNC_CLIENT`: Enable sync transport via iota_client, otherwise it's going to be Bucket which can only be used for tests
9+
- `STATIC`: Build static library when ON, otherwise dynamic library
610

711
Edit your author and subscriber seeds in `main.c`
812

9-
run `./make` in this folder
13+
run `cmake .` in this folder
14+
15+
Then run `make` to build the rust code.
1016

11-
Then run `cargo build --target-dir ./target` to build the rust code.
17+
A binary will be generated which you can run depending on your STATIC setting
18+
- ON: `iota_streams_c_static`
19+
- OFF: `libiota_streams_c.so`(Unix), `iota_streams_c.dll`(Windows) and the executable `iota_streams_c`
1220

13-
A binary will be generated which you can run in `./target/streams`
21+
You can then run the static build or the dynamic executable. Keep in mind that by default the code points to a node on `http://localhost:14265`.
22+
If this node doesnt exist, we will exit with an error immediately.

0 commit comments

Comments
 (0)