7 releases

0.5.0 Jun 19, 2023
0.4.1 Feb 4, 2023
0.3.4 Jan 17, 2023
0.3.2 Aug 30, 2022

#17 in #exporting

Download history 45/week @ 2023-12-12 538/week @ 2023-12-19 645/week @ 2023-12-26 3/week @ 2024-01-02 133/week @ 2024-01-09 708/week @ 2024-01-16 276/week @ 2024-01-23 80/week @ 2024-01-30 79/week @ 2024-02-06 141/week @ 2024-02-13 116/week @ 2024-02-20 171/week @ 2024-02-27 48/week @ 2024-03-05 84/week @ 2024-03-12 209/week @ 2024-03-19 325/week @ 2024-03-26

727 downloads per month
Used in 2 crates (via ffizz-header)

MIT license

29KB
644 lines

ffizz

ffizz is a library of utilities for exporting Rust libs for use in other languages.

FFI generally requires a lot of unsafe code, which in turn requires a lot of manual verification of assumptions. The ffizz libraries help by implementing some common patterns with clear safety guidelines that are easily described in the documentation for the C side of the interface.

Ffizz differs from other FFI utilities like uniffi, cxx, or diplomat in that it does not generate bindings. Instead, it's aimed at situations where you want precise control over the interface, in a safe and ergonomic fashion. If you want to implement exactly the C API you have in mind, Ffizz is the tool.

Crates

  • ffizz-passby supports passing arguments and return values by pointer or by value.
  • ffizz-header supports generating a C header corresponding to a library crate
  • ffizz-string provides a simple string abstraction

Dependencies

~2MB
~42K SLoC