lsl-sys

Crates.iolsl-sys
lib.rslsl-sys
version0.1.1
sourcesrc
created_at2020-10-23 05:17:58.283952
updated_at2020-10-26 17:33:22.696129
descriptionLow-level bindings to the system liblsl library (lab streaming layer).
homepage
repositoryhttps://github.com/labstreaminglayer/liblsl-rust
max_upload_size
id304567
size21,311,041
Christian Kothe (chkothe)

documentation

README

lsl-sys

This is the low-level auto-generated binding to the liblsl library. You probably don't want to use this library directly; instead, check out the higher-level lsl crate.

Getting the source code

git clone --recurse-submodules https://github.com/labstreaminglayer/liblsl-rust

Compiling

See documentation in the liblsl-rust repository for build instructions.

Regenerating C FFI bindings

You only need to run this if you want to update the autogenerated header bindings (src/generated.rs), e.g., to pull in new declarations from an updated liblsl version.

For this you need the bindgen tool, which you can obtain as described here here.

Then, run the following commands to regenerate the bindings:

cd lsl-sys

# (prefix with liblsl license text)
echo "/* $(cat liblsl/LICENSE) */" > src/generated.rs

# (append bindings to file)
bindgen liblsl/include/lsl_c.h \
    --whitelist-function "^lsl_.*" \
    --whitelist-var "^lsl_.*" \
    --whitelist-type "^lsl_.*" \
    >> src/generated.rs

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the lsl-sys crate by you, shall be licensed as MIT, without any additional terms or conditions.

Commit count: 44

cargo fmt