Rust FFI

Open-source Rust projects categorized as FFI

Top 22 Rust FFI Projects

  • GitHub repo neon

    Rust bindings for writing safe and fast native Node.js modules.

    Project mention: How I significantly improved Giganotes app performance using Rust | | 2021-03-09

    After researching a lot of options how to get the optimal performance combined to maximum code re-usability and cross-platform compilation. I found Rust as the best option to implement application's core. Except for the perfect package management tool, Rust has all the necessary bindings - Neon for Electron, Rust code easily compiles for Android. So it was relatively easy to implement the communication layer between Rust native code and those platforms like Node.Js (Electron) and Android.

  • GitHub repo PyO3

    Rust bindings for the Python interpreter (by PyO3)

    Project mention: HPy: a better C API for Python? [] | | 2021-04-02

    I think I'll learn PyO3 instead.

  • GitHub repo Rustler

    Safe Rust bridge for creating Erlang NIF functions

    Project mention: New book! Refactoring to Rust | | 2021-01-07

    Any mention of Elixir?

  • GitHub repo rust-cpython

    Rust <-> Python bindings

    Project mention: How we built our Python Client that's mostly Rust | | 2021-03-31

    Author here. Yup! The Flapigen macros generate a ton of rust-cpython calls. I'll eventually get around to updating the flapigen book to include the parts I had to learn for this post.

  • GitHub repo winapi-rs

    Rust bindings to Windows API

    Project mention: Official WinRT+Win32 Crate for Rust | | 2021-03-05
  • GitHub repo cbindgen

    A project for generating C bindings from Rust code

    Project mention: Hey Rustaceans Got An Easy Question Ask Here | | 2020-12-28

    cbindgen can't support most arbitrary structs; they need to be marked #[repr(C)] which includes their fields:

  • GitHub repo rust-cpp

    Embed C++ directly inside your rust code!

    Project mention: CXX - Safe interop between Rust and C++ | | 2021-03-24

    Another create which i've been contributing to and maintaining is the cpp crate, which can also be useful for interoperability with C++, as it allows to embed C++ code snippets directly within rust functions:

  • GitHub repo jni-rs

    Rust bindings to the Java Native Interface — JNI

    Project mention: Project Ideas | | 2021-02-05

    Even so, staying relatively close to the Java focus of the class might be a good idea, since it will help prepare you for the AP exam. One idea would be using jni-rs to build Java bindings for a useful Rust library. Interesting candidates might be io-uring, lockfree, or even pyo3, if you wanted to try your hand at integrating Java and Python.

  • GitHub repo rust-objc

    Objective-C Runtime bindings and wrapper for Rust.

    Project mention: Wish we had Mac APIs for Rust | | 2021-02-04
  • GitHub repo curryrs

    Bridge the gap between Haskell and Rust

  • GitHub repo j4rs

    Java for Rust

  • GitHub repo mrusty

    mruby safe bindings for Rust

  • GitHub repo rusty-cheddar

    A Rust crate for automatically generating C header files from Rust source file.

  • GitHub repo rust-lua

    Safe Rust bindings to Lua 5.1

  • GitHub repo rustpy

    Rust + Python = ????

  • GitHub repo fruity

    Rusty bindings for Apple libraries

    Project mention: Wish we had Mac APIs for Rust | | 2021-02-04

    I recently found looks interesting but also not production ready

  • GitHub repo RustJNI

    Run Java code from Rust!

  • GitHub repo rust-jni-sys

  • GitHub repo uapi

    Unix API

    Project mention: uapi: A pragmatic libc wrapper | | 2021-01-07
  • GitHub repo rust-jdbc

    Rust-JDBC bindings

  • GitHub repo rust-bindgen

    THIS CRATE IS DEPRECATED, please use (by Yamakaky)

NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020). The latest post mention was on 2021-04-02.


What are some of the best open-source FFI projects in Rust? This list will help you:

Project Stars
1 neon 5,316
2 PyO3 4,015
3 Rustler 2,723
4 rust-cpython 1,411
5 winapi-rs 1,244
6 cbindgen 984
7 rust-cpp 509
8 jni-rs 468
9 rust-objc 257
10 curryrs 256
11 j4rs 210
12 mrusty 193
13 rusty-cheddar 189
14 rust-lua 112
15 rustpy 74
16 fruity 73
17 RustJNI 59
18 full_search 52
19 rust-jni-sys 30
20 uapi 18
21 rust-jdbc 13
22 rust-bindgen 1