Urgent.News

What's breaking now, across thousands of outlets.

Tech

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

Valen creator drives 'Golden Spike' to connect new languages 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.

Also reported by 1 other outlet

Read the original at theregister.com →

More in Tech

VAT-Inclusive vs VAT-Exclusive Pricing: The Math Developers Get Wrong

VAT calculation often looks like simple percentage arithmetic: Take the price, multiply it by the VAT rate, and you are done. That only works when you know exactly what the input price represents .

  • VAT calculation is straightforward with clear input price
  • Mistake occurs when input price is VAT-inclusive
  • Developers must understand distinction to avoid errors

More from Friday 25 September →