Skip to content

Latest commit

 

History

History
36 lines (24 loc) · 1.38 KB

README.md

File metadata and controls

36 lines (24 loc) · 1.38 KB

Biscuit C API

This crate provides a C API for the Biscuit token library. It is a wrapper around the Rust API, and is intended to be used by other languages that can interface with C.

Building from sources

To build the C API, you need to have the Rust toolchain installed. You can then build the C API by running:

cargo cinstall --release --features="capi" --prefix=/path/to/install --destdir=/path/to/destdir

It will produce a shared library in the --destdir directory and also the C headers. You can then link against the generated library in your C code.

cargo cinstall is provided by the cargo-c crate, which you can install with cargo install cargo-c.

Downloading pre-built binaries

In the releases section of this repository, you can find pre-built binaries for the C API. Currently, only Linux x86_64 and MacOS (arm) are provided.

Running the tests

cargo ctest --features="capi"

License

Licensed under Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be licensed as above, without any additional terms or conditions.