4 stable releases

Uses new Rust 2024

2.2.2 Sep 16, 2025
2.0.1 Oct 24, 2024
1.0.0 Jun 18, 2024

#11 in #security-privacy

Download history 3500/week @ 2025-09-23 4876/week @ 2025-09-30 4322/week @ 2025-10-07 5604/week @ 2025-10-14 3285/week @ 2025-10-21 2740/week @ 2025-10-28 5252/week @ 2025-11-04 3555/week @ 2025-11-11 2964/week @ 2025-11-18 2113/week @ 2025-11-25 3006/week @ 2025-12-02 5003/week @ 2025-12-09 3285/week @ 2025-12-16 2117/week @ 2025-12-23 1312/week @ 2025-12-30 2805/week @ 2026-01-06

10,094 downloads per month

MIT/Apache

240KB
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.

Crates.io Documentation Build Status MIT OR Apache-2.0

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

Contributing

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 dual licensed as MIT or Apache-2.0, without any additional terms or conditions.

Sponsorship

Made possible with support from Mullvad VPN, the Swedish Internet Foundation, and the Knowledge Foundation of Sweden.

Dependencies

~3.5–4.5MB
~91K SLoC