Skip to content

Commit 49718cf

Browse files
committed
Add simple README about our C bindings generation stuff
1 parent 31a8a56 commit 49718cf

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

c-bindings-gen/README.md

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
LDK C Bindings Generator
2+
========================
3+
4+
This program parses a Rust AST from a single-lib.rs Rust crate (passed in on stdin) and generates a
5+
second crate which is C-callable (and carries appropriate annotations for cbindgen). It is usually
6+
invoked via the `genbindings.sh` script in the top-level directory.
7+
8+
`genbindings.sh` requires that you have a rustc installed with the `wasm32-wasi` target available
9+
(eg via the `libstd-rust-dev-wasm32` package on Debian or `rustup target add wasm32-wasi` for those
10+
using rustup), cbindgen installed via `cargo install cbindgen` and in your `PATH`, and `clang`,
11+
`clang++`, `gcc`, and `g++` available in your `PATH`. It uses `valgrind` if it is available to test
12+
the generated bindings thoroughly for memory management issues.

0 commit comments

Comments
 (0)