To date there is still not universal FFI for "rich" dynamically sized data types even for non-sandboxed environments like a shared library (DLL). I wonder if WIT could be such an interface, binding together any languages? Are there on-going projects to that end?
I am aware this is not the scope of wasm or bytecode alliance, yet this seems the best place to ask this question.
I believe I tried this in 2021 https://github.com/bytecodealliance/wit-bindgen/pull/103, however it wasn't yet "ready". I don't think the ABI would be the same but using WIT as the IDL should work, its even used for networking RPC (WRPC). Later I abandoned WIT because it was missing lots of features at the time like futures, streams, etc and created ffi-gen. Googling for ffi-gen dvc94ch returned my since abandonned project:
ffi-gen by developer David Craven (dvc94ch) is a tool designed to make bridging Rust code with other programming languages (like Dart and JavaScript/Node/Browser) easier through automated foreign function interface (FFI) generation. It is often paired with xbuild as part of a toolchain aimed at simplifying cross-platform Rust and Flutter application development.
Core Features
cloudpeers organization.If you want, I can provide:
ffi-gen-macro cratexbuild companion toolLet me know what you would like to explore next.
I think this describes what I tried with "symmetric ABI", a non-sandboxed ABI which supports up to WIT/WASI 0.3 and is source code compatible with the canonical ABI (although you may want to revisit API ownership rules for incoming string and list arguments to avoid unnecessary copying on the receiver side). You can find the implementation at https://github.com/cpetig/wit-bindgen/ - as a nice side effect you don't need a host to connect plugins. I presented this at wasmcon24 and since then simply lacked the priority to get it formalized as an official component model variant.
Rust and C++ work, C async support is waiting within my todo list.
Thanks for mentioning this. This is going to be very useful to some of my current work. I'm surprised at how many useful tools you come across here with someone just casually dropping a project that I'd never heard about before.
Last updated: Jul 29 2026 at 05:03 UTC