Up your coding game and discover issues early. SonarLint is a free plugin that helps you find & fix bugs and security issues from the moment you start writing code. Install from your favorite IDE marketplace today. Learn more →
Top 23 Rust FFI Projects
-
I use Qt but I use PyO3 to set up a "Python/PyQt/PySide frontend on top of Rust backend" architecture for the QWidget APIs similar to the "QML frontend on top of C++ backend" that they officially promote for Qt Quick.
-
Project mention: Interaction between a Node.js module and a Rust program | reddit.com/r/node | 2023-01-31
-
SonarLint
Clean code begins in your IDE with SonarLint. Up your coding game and discover issues early. SonarLint is a free plugin that helps you find & fix bugs and security issues from the moment you start writing code. Install from your favorite IDE marketplace today.
-
unfortunately as of the time of this writing, rustler does not support generic type intefaces so I guess this is impossible?
-
Project mention: I implemented a NASA image compression algorithm | reddit.com/r/programming | 2023-03-23
It looks like the guy you're replying too was kind of an ass, but I do want to point out for anyone else reading that that's not actually that much of a technical limitation: rust code can natively call C code. The main thing you need is a translation of the C library's header file so rustc knows what C functions and structs exist, and that can be automatically generated with bindgen.
-
-
Later we'll see what cbindgen essentially does is receive a configuration and a Rust library and then spit out a C header (.h) file. One might think that what cbindgen is doing might not be that special and can be done by hand. In which some cases that might be true if the project is simple enough. Though additionally as the cbindgen documentation states:
-
I've never used pyo3, just cpython, but the latter at least let me do things like:
-
InfluxDB
Access the most powerful time series database as a service. Ingest, store, & analyze all types of time series data in a fully-managed, purpose-built database. Keep data forever with low-cost storage and superior data compression.
-
Project mention: I seen people say that () is similar to void in C. But what is similar to void*? | reddit.com/r/rust | 2023-03-27
The std library provides the type c_void for FFI, which is an enum with two variants. Some libraries have their own version, winapi for example defines c_void as an enum with no variants, making it identical to !. Finally, whenever the std needs a pointer with no particular type, they tend to reach for *const (), see ptr::to_raw_parts.
-
Project mention: How much Rust work is actually going on at Cloudflare? | reddit.com/r/rust | 2023-01-15
I'm also in the Workers org but I have had a bit of interaction with Rust. There's some Rust in the Workers runtime using lol-html for HTMLRewriter as well as some tooling and there's the full blown workers-rs framework that I work on, but that's about it for the Rust I work on regularly.
-
I do have education and real experience in the field. See, for example, my recent work on the rather arcane subject of Rust↔Java FFI. You don't get to pull rank with me, son. I know quite well what CreateFile does. (Fun fact: it creates a file handle, i.e. opens a file, and may or may not create the file itself.)
-
Project mention: Zork++ reaches the v0.5.0, ...where the project has been [completely] rewritten in Rust | reddit.com/r/programmingcirclejerk | 2023-02-13
https://github.com/mystor/rust-cpp <- not a transpiler, but almost as good
-
Project mention: swift-bridge 0.1.37 supports passing `Box<dyn FnOnce(A, B) -> C>` from Rust to Swift | reddit.com/r/rust | 2022-09-15
-
Project mention: Regarding using multiple languages in one project | reddit.com/r/learnprogramming | 2023-02-15
You can also use Rust to write an extension module that can be loaded into the Ruby interpreter, so that everything runs in the same process: https://github.com/matsadler/magnus
-
-
Real chads write PHP websites and extend it with Rust
-
Project mention: Where do I start for creating a windowed app in pure rust? | reddit.com/r/rust | 2022-11-22
If you find dealing with the Obj-C bindings a bit daunting (I would), I'd recommend you use the objc crate. That will like you dive into the details of creating and updating Mac windows without having to figure out how to call Objective C from Rust.
-
-
-
I don't know how rare this is (or how rare it should be), but this issue warned me about this potential problem, and I had to make a huge refactoring to treat the possibility. I had to rethink many aspects of all handle implementations. It was hard work, but in the end it was worth it.
-
-
-
-
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
Rust FFI related posts
- I seen people say that () is similar to void in C. But what is similar to void*?
- Announcing `stabby`: a stable ABI for Rust with niche optimizations and much more!
- I implemented a NASA image compression algorithm
- no good UI toolkit/framework
- Security Engineer looking for ways to see if any of my tasks could slowly be ported to Rust or should I just stick with Python.
- I use dwm btw
- Pyo3: Rust Bindings for the Python Interpreter
-
A note from our sponsor - SonarLint
www.sonarlint.org | 29 Mar 2023
Index
What are some of the best open-source FFI projects in Rust? This list will help you:
Project | Stars | |
---|---|---|
1 | PyO3 | 8,034 |
2 | neon | 7,089 |
3 | Rustler | 3,647 |
4 | rust-bindgen | 3,341 |
5 | flutter_rust_bridge | 2,449 |
6 | cbindgen | 1,758 |
7 | rust-cpython | 1,710 |
8 | winapi-rs | 1,621 |
9 | workers-rs | 1,536 |
10 | jni-rs | 844 |
11 | rust-cpp | 660 |
12 | swift-bridge | 485 |
13 | magnus | 404 |
14 | j4rs | 380 |
15 | ext-php-rs | 376 |
16 | rust-objc | 349 |
17 | curryrs | 296 |
18 | emacs-module-rs | 293 |
19 | winsafe | 256 |
20 | robusta | 239 |
21 | ocaml-rs | 211 |
22 | mrusty | 201 |
23 | rusty-cheddar | 190 |