Libraries and tools to build and use the libcsp C library in your Rust project
Go to file
2024-05-31 19:48:12 +02:00
.cargo library is configurable now 2024-05-31 12:35:29 +02:00
examples start writing a README 2024-05-31 19:48:12 +02:00
lib getting a bit further now 2024-05-31 16:56:44 +02:00
libcsp-cargo-build start writing a README 2024-05-31 19:48:12 +02:00
libcsp-rust start writing a README 2024-05-31 19:48:12 +02:00
.gitignore dedicated folder for generating bindings 2024-05-29 18:39:54 +02:00
Cargo.lock getting a bit further now 2024-05-31 16:56:44 +02:00
Cargo.toml dedicated folder for generating bindings 2024-05-29 18:39:54 +02:00
LICENSE-APACHE at this point i dont know whats going on anymore 2024-05-29 13:13:48 +02:00
NOTICE at this point i dont know whats going on anymore 2024-05-29 13:13:48 +02:00
README.md start writing a README 2024-05-31 19:48:12 +02:00

libcsp-rust

This project aims to provide libraries and tools to use libcsp in your Rust project.

It provides 2 crates for this:

  • [libcsp-cargo-build] provides an API to build the libcsp using cargo with the cc crate.
  • [libcsp-rust] provides the Rust bindings to libcsp and a safe and ergonomic Rust interface.

In addition, it provides a workspace to allow updating the libcsp and the corresponding bindings more easily inside the lib directory. Some of the examples libcsp provides were ported to Rust and are showcases in the examples directory.

Getting started

We assume that cargo should also take care of building the library.

  1. Add the libcsp-cargo-build as a build dependency inside your Cargo.toml.
  2. Add the libcsp-rust as a regular dependency inside your Cargo.toml.
  3. Create a custom build.rs script which takes care of building libcsp using the API provided by libcsp-cargo-build. You have to provide the source code for libcsp inside some directory and pass that director to a builder API.
  4. You can now write regular Rust code and use the API provided by libcsp-rust to use libcsp in a safe and Rusty way.

It is recommended to have a look at the example build script which should give you a general idea of how a build script might look like to integrate libcsp.