Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR. Learn more →
Top 23 Rust FFI Projects
-
Project mention: Show HN: Robyn – "Batman Inspired" Python Web Framework Built with Rust | news.ycombinator.com | 2025-03-01
-
CodeRabbit
CodeRabbit: AI Code Reviews for Developers. Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
-
Project mention: Ask HN: What less-popular systems programming language are you using? | news.ycombinator.com | 2025-03-01
You only hand-write function bindings in simple or well-constrained cases.
In general, the expectation is that you will use bindgen [0].
It's a very easy process:
1. Create a `build.rs` file in your Rust project, which defines pre-build actions. Use it to call bindgen on whatever headers you want to import, and optionally to define library linkage. This file is very simple and mainly boilerplate. [1]
2. Import your bindgen-generated header as a module and... just use it. [2]
You can also skip step 1: bindgen is also a CLI tool, so if your C target is stable, you can just run bindgen once to generate the Rust interface module and move that right into your crate.
[0]: https://rust-lang.github.io/rust-bindgen/
[1]: https://rust-lang.github.io/rust-bindgen/tutorial-3.html
[2]: https://github.com/Charles-Schleich/Rust-Bindgen-Example/blo...
-
Rust (for languages such as Erlang or Dart)
-
- The speed of the Python interpreter running in WebAssembly
Today, Python cold starts are slower than cold starts for a JavaScript Worker of equivalent size. A basic "Hello World" Worker written in JavaScript has a near zero cold start time, while a Python Worker has a cold start under 1 second.
That's because we still need to load Pyodide into your Worker on-demand when a request comes in. The blog post describes what we're working on to reduce this — making Pyodide already available upfront.
Once a Python Worker has gone through a cold start though, the differences are more on the margins — maybe a handful milliseconds, depending on what happens during the request.
- There is a slight cost (think — microseconds not milliseconds) to crossing the "bridge" between JavaScript and WebAssembly — for example, by performing I/O or async operations. This difference tends to be minimal — generally something measured in microseconds not milliseconds. People with performance sensitive Workers already write them in Rust https://github.com/cloudflare/workers-rs, which also relies on bridging between JavaScript and WebAssembly.
- The Python interpreter that Pyodide provides, that runs in WebAssembly, isn't as fast as the years and years of optimization that have gone into making JavaScript fast in V8. But it's still relatively early days for Pyodide, compared to the JS engine in V8 — there are parts of its code where we think there are big perf gains to be had. We're looking forward to upstreaming performance improvements, and there are WebAssembly proposals that help here too.
-
Project mention: SlateDB – An embedded database built on object storage | news.ycombinator.com | 2024-10-01
Rust is just another programming language that’s quite similar to C++. The main difference is there’s like 4 types for String (some are references and some are owned) and methods for a struct go in a `impl StructName` block after the struct definition instead of inside it.
I don’t really know rust either but I’m currently writing some bindings to expose Rust libraries to NodeJS and not having too much trouble.
For rust -> c++ I googled one time and found this tool which Mozilla seems to use to call Rust from C++ in their web browser, maybe it would “just work”: https://github.com/mozilla/cbindgen?tab=readme-ov-file
-
-
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
-
-
-
Project mention: Crossing the Impossible FFI Boundary, and My Gradual Descent into Madness | news.ycombinator.com | 2024-06-17
[1] https://github.com/chinedufn/swift-bridge
-
-
Project mention: Magnus: Library for writing Ruby extentions in Rust, running Ruby code from Rust | news.ycombinator.com | 2024-07-01
-
Project mention: J4rs – 'Java for Rust' allows effortless calls to Java from Rust and vice-versa | news.ycombinator.com | 2024-09-26
-
Project mention: Using Rust in Non-Rust Servers to Improve Performance | news.ycombinator.com | 2024-10-24
The article links to two PHP and Rust integration strategies, WASM[1] or native[2].
[1] https://github.com/wasmerio/wasmer-php
[2] https://github.com/davidcole1340/ext-php-rs
-
-
Project mention: Winsafe: Low-level Windows API and GUI in safe, idiomatic Rust | news.ycombinator.com | 2024-08-01
-
nostr
Nostr protocol implementation, high-level client library, Nostr Wallet Connect, bindings and more. (by rust-nostr)
-
-
-
-
-
-
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
Rust FFI discussion
Rust FFI related posts
-
Pulumi Gestalt 0.0.1 released
-
Pulumi W̶a̶s̶m̶/̶R̶u̶s̶t̶ Gestalt devlog #7
-
Rust Bindings for the Python Interpreter
-
Ask HN: Python in the NoGIL World
-
How to introduce 🦀 Rust at your company 🏭?
-
An interpreter inside an interpreter
-
SlateDB – An embedded database built on object storage
-
A note from our sponsor - CodeRabbit
coderabbit.ai | 17 Mar 2025
Index
What are some of the best open-source FFI projects in Rust? This list will help you:
# | Project | Stars |
---|---|---|
1 | PyO3 | 13,194 |
2 | rust-bindgen | 4,684 |
3 | Rustler | 4,463 |
4 | workers-rs | 2,785 |
5 | cbindgen | 2,553 |
6 | rinf | 2,228 |
7 | winapi-rs | 1,865 |
8 | rust-cpython | 1,819 |
9 | jni-rs | 1,323 |
10 | swift-bridge | 896 |
11 | rust-cpp | 820 |
12 | magnus | 704 |
13 | j4rs | 682 |
14 | ext-php-rs | 636 |
15 | duckdb-rs | 592 |
16 | winsafe | 543 |
17 | nostr | 467 |
18 | jlrs | 442 |
19 | rust-objc | 394 |
20 | interoptopus | 369 |
21 | emacs-module-rs | 352 |
22 | robusta | 348 |
23 | deno_bindgen | 301 |