https://doc.rust-lang.org/nomicon/ffi.html

This guide will use the snappy compression/decompression library as an introduction to writing bindings for foreign code. Rust is currently unable to call directly into a C++ library, but snappy includes a C interface (documented in snappy-c.h).

https://crates.io/crates/jni
https://github.com/jni-rs/jni-rs Github Repo Stars: jni-rs/jni-rs

This project provides complete JNI bindings for Rust, allowing to:

  • Implement native Java methods for JVM and Android in Rust
  • Call Java code from Rust
  • Embed JVM in Rust applications and use any Java libraries

https://cxx.rs/
https://github.com/dtolnay/cxx Github Repo Stars: dtolnay/cxx

This library provides a safe mechanism for calling C++ code from Rust and Rust code from C++. It carves out a regime of commonality where Rust and C++ are semantically very similar and guides the programmer to express their language boundary effectively within this regime. CXX fills in the low level stuff so that you get a safe binding, preventing the pitfalls of doing a foreign function interface over unsafe C-style signatures.

https://deno.com/manual@v1.33.1/runtime/ffi_api

As of Deno 1.13 and later, the FFI (foreign function interface) API allows users to call libraries written in native languages that support the C ABIs (C/C++, Rust, Zig, V, etc.) using Deno.dlopen.