Show HN: BoltFFI a high performance Rust bindings generator

  • Posted 9 hours ago by alihilal94
  • 2 points
https://github.com/boltffi/boltffi
Built this because we were tired of fighting the same Rust FFI issues over and over we wanted one rust exports model that can generate bindings for Swift Kotlin and WASM and also handle packaging without a bunch of manual glue. We are also adding more targets over time including Python C# Java and Ruby

The main thing we cared about was boundary overhead so BoltFFI uses a different approach than UniFFI and the bench numbers are much better in our case, also async exports map to native async patterns on the target side.

few numbers from the current benches vs UniFFI

echo_i32 BoltFFI <1 ns UniFFI 1,416 ns speedup >1000x

counter_increment 1k calls BoltFFI 2,700 ns UniFFI 1,580,000 ns speedup 589x

generate_locations 10k BoltFFI 62,542 ns UniFFI 12,817,000 ns speedup 205x

benchmarks and code are in the repo and we compare against UniFFI and wasm-bindgen there.

repo: https://github.com/boltffi/boltffi

docs: https://www.boltffi.dev/docs/overview

benchmarks: https://github.com/boltffi/boltffi/tree/main/benchmarks

1 comments

    Loading..