Valen creator drives 'Golden Spike' to connect new languages with Rust
An experiment is afoot to sidestep C as the language of interoperability with Rust
Evan Ovadia, a former Google engineer and Mojo core contributor, has developed a way to transfer generic data types and functions between Rust and other languages. This breakthrough, dubbed the "Golden Spike," aims to intertwine two different programming languages, much like how the final spike was used to connect the United States' first transcontinental railroad.
Ovadia envisions Valen, his own programming language, as a faster and more developer-friendly alternative to Rust. The challenge lay in using Valen's rich libraries in Rust, as the current C ABI (application binary interface) does not support cross-language generics. The C ABI, a de facto interoperability layer, is typically used to pass data and function calls between compiled code, but it cannot comprehend Rust's generics.
Ovadia's solution involves running the Rust compiler as a library and patching it to call the Valen compiler for non-Rust types. While this approach is risky and limited to Rust using LLVM for machine code generation, it represents a significant leap in programming language interoperability.
Written by urgent.news from The Register's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.