24 releases (11 breaking)
|0.12.0||Dec 23, 2022|
|0.12.0-alpha.1||Nov 9, 2022|
|0.11.1||Nov 4, 2022|
|0.10.0-alpha.1||Jul 31, 2022|
|0.1.1||Mar 26, 2021|
#112 in #bindings
158 downloads per month
Used in forrustts
rust bindings for tskit
This package provides the following:
- Low-level bindings to the C API of both
kastore. We use bindgen to automatically generate the bindings.
- Support for table collections, tree sequences, and tree iteration.
- An error handling system that maps
tskiterror codes to
rusterrors while preserving error messages.
The overview is:
kastoreC code are include in
- These two tools are compiled into the
bindgengenerates the bindings.
- Finally, the entire rust package is generated.
The result is a
rust library with all of these two C libraries statically compiled in.
rust types and functions exist in the module name
unsafe access to the low-level API.
Quick start guide
Cloning the repository and running the test suite
git clone https://github.com/tskit-dev/tskit-rust cd tskit-rust cargo test --all-features
Viewing the documentation
cargo doc --all-features --open
Calculating code coverage
cargo install cargo-tarpaulin
Then, we use all tests, doc tests, and example programs to calculate code coverage for all available features:
cargo tarpaulin --all-features --doc --tests --examples --exclude-files '*.c' --exclude-files '*.h' --ignore-tests -o html
Then, point your favorite browser to
The last few flags exclude the C code and any
rust code that is test-only from being part of the denominator of the coverage calculation.
The goal here is not to have high test coverage of the C API, as it is up to the upstream project to provide that.
tarpaulin can be fickle, and changing the order of some of those flags can cause the coverage run to fail.
Updating the change log.
git cliff -u --tag v0.11.0 --date-order -p CHANGELOG.md