3 stable releases

2.0.1 Oct 24, 2024
1.0.0 Jun 18, 2024

#857 in Network programming

Download history 2668/week @ 2024-11-30 5712/week @ 2024-12-07 6685/week @ 2024-12-14 1282/week @ 2024-12-21 2109/week @ 2024-12-28 4983/week @ 2025-01-04 4252/week @ 2025-01-11 4853/week @ 2025-01-18 3960/week @ 2025-01-25 5831/week @ 2025-02-01 4906/week @ 2025-02-08 5128/week @ 2025-02-15 6234/week @ 2025-02-22 5735/week @ 2025-03-01 3584/week @ 2025-03-08 4542/week @ 2025-03-15

21,771 downloads per month

MIT/Apache

220KB
4.5K SLoC

Maybenot FFI

This crate contains C FFI bindings for Maybenot, which let's you use Maybenot as a static library for languages other than Rust. Headers are found at maybenot-ffi/maybenot.h and are auto-generated when compiling using make.

Building

You need to have rust installed. cbindgen is also required: cargo install --force cbindgen Then just run make to build a static library at maybenot-ffi/libmaybenot.a.

Arguments to make, including default values:

  • DESTINATION=. - the directory where the output artifacts will be placed.
  • TARGET= override target architecture; cross-compile. Use rustup target to list and install targets.
  • PROFILE=release - override the cargo profile, valid options are release and debug.
  • CARGO=cargo - path to cargo.
  • CBINDGEN=cbindgen - path to cbindgen.
  • CARGO_TARGET_DIR=../../target - the build directory.

Example:

make TARGET=x86_64-unknown-linux-gnu PROFILE=debug

In order to link the resulting library to your program, you'll need to explicitly link some additional dependencies in addition to -lmaybenot. Run the following command to get an up-to-date list of the required flags for your platform:

RUSTFLAGS="--print native-static-libs" cargo build

Dependencies

~4.5MB
~92K SLoC