This commit is contained in:
Robin Müller 2024-06-01 01:23:26 +02:00
parent 64291e947f
commit b79c775801
Signed by: muellerr
GPG Key ID: A649FB78196E3849

View File

@ -36,8 +36,8 @@ The example uses both the builder crate and the bindings and API crate and imple
[server/client example](https://github.com/libcsp/libcsp/blob/develop/examples/csp_server_client.c)
in Rust. You can run the example using the following steps:
1. Clone `libcsp` into the `lib` folder, for example by using the provided `lib/clone-csp.sh`
script.
1. Clone/Copy `libcsp` into the `lib` folder, for example by using the provided `lib/clone-csp.sh`
script or adding `libcsp` as a git submodule.
2. You can now use `cargo run -p libcsp-rust-examples` to run the server/client example.
## Compile-time configuration of the `libcsp-rust` library
@ -49,7 +49,9 @@ The user has to provide the path to a directory containing this `autoconfig.rs`
`CSP_CONFIG_DIR` environmental variable.
You can automatically generate this file when using `libcsp-cargo-build` by using the
[`generate_autoconf_rust_file`] method of the Builder object as done in the example build script.
[`generate_autoconf_rust_file`](here be link soon) method of the Builder object as done in the
example build script.
In this workspace, the `CSP_CONFIG_DIR` variable is hardcoded using the following `.cargo/config.toml`
configuration:
@ -84,4 +86,3 @@ bindgen --use-core wrapper.h -- "-I./libcsp/include" "-I./cfg" "-I./libcsp/src"
With the bindings file, you can now manually update the FFI bindings provided in
`libcsp-rust/src/ffi.rs` or in your own CSP library.