-
Notifications
You must be signed in to change notification settings - Fork 380
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add simple README about our C bindings generation stuff
- Loading branch information
1 parent
2aa0233
commit 386ccf3
Showing
1 changed file
with
12 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
LDK C Bindings Generator | ||
======================== | ||
|
||
This program parses a Rust AST from a single-lib.rs Rust crate (passed in on stdin) and generates a | ||
second crate which is C-callable (and carries appropriate annotations for cbindgen). It is usually | ||
invoked via the `genbindings.sh` script in the top-level directory. | ||
|
||
`genbindings.sh` requires that you have a rustc installed with the `wasm32-wasi` target available | ||
(eg via the `libstd-rust-dev-wasm32` package on Debian or `rustup target add wasm32-wasi` for those | ||
using rustup), cbindgen installed via `cargo install cbindgen` and in your `PATH`, and `clang`, | ||
`clang++`, `gcc`, and `g++` available in your `PATH`. It uses `valgrind` if it is available to test | ||
the generated bindings thoroughly for memory management issues. |