README
This commit is contained in:
parent
64291e947f
commit
b79c775801
@ -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)
|
[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:
|
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`
|
1. Clone/Copy `libcsp` into the `lib` folder, for example by using the provided `lib/clone-csp.sh`
|
||||||
script.
|
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.
|
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
|
## 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.
|
`CSP_CONFIG_DIR` environmental variable.
|
||||||
|
|
||||||
You can automatically generate this file when using `libcsp-cargo-build` by using the
|
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`
|
In this workspace, the `CSP_CONFIG_DIR` variable is hardcoded using the following `.cargo/config.toml`
|
||||||
configuration:
|
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
|
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.
|
`libcsp-rust/src/ffi.rs` or in your own CSP library.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user