Rust interoperability experiment bypasses C ABI for richer data types
Evan Ovadia, a Mojo contributor and former Google engineer, has demonstrated a way for other languages to use Rust libraries while preserving generics and complex data types. The approach avoids the limitations of the C application binary interface, which typically reduces data to primitive types. Ovadia developed the technique while working on his Valen programming language and calls it a 'Golden Spike' for language interoperability.
Evan Ovadia, who contributes to Mojo and previously worked at Google, built this experiment while creating Valen, a language intended to be faster and easier than Rust. He wanted access to Rust libraries such as wgpu, but existing C ABI interop strips types down to primitives and cannot represent generics.
His method embeds the Rust compiler through rustc_driver, letting Valen host it in-process. When Rust encounters Valen-specific types, control passes to Valen's compiler, which compiles that part and returns the result. Ovadia characterized modifying Rust's compiler as an extreme step.
If the technique matures, language designers and library maintainers could expose richer Rust APIs without flattening them through C. Developers mixing languages may gain safer, more expressive reuse of existing crates, while compiler teams may face added complexity and maintenance burdens. Its near-term impact may remain experimental, but it could influence how future languages approach interoperability and reduce reliance on C as a universal bridge.