Skip to content
Rust Search
← FOSDEM 2026

Calling JIT-compiled Roto scripts from Rust

FOSDEM

Roto is a statically-typed and compiled scripting language for Rust applications that integrates very tightly with Rust. To achieve that integration, it needs to interface directly with Rust types and functions. Implementing that boundary turned out to be quite tricky! We had many obstacles to overcome, such as Rust providing very few mechanisms for reflection and not providing a stable ABI by default. This talk will explain how Rust-Roto boundary works and the tricks we have to pull along the w

Recording not playing? Use the FOSDEM link above.

Other talks by Terts Diepraam

Roto: a fast and safe scripting language

EuroRust
17:58 1398 views

There are many excellent scripting languages for Rust, but, while building our BGP engine Rotonda at NLnet Labs, we found that none of the existing languages fit our purpose. They are usually dynamically typed and interpreted. Errors are therefore only caught at runtime and they are slower than we’d like. So,we did the only logical thing and decided to make our own language from scratch. That language became Roto; a statically-typed scripting language with Rust-inspired syntax that is compiled to machine code using cranelift. It achieves pretty good performance out of the box and guarantees that there are no type errors at runtime. By virtue of being written in Rust, Roto is easy to embed in any Rust application. In addition, types and functions from Rust can be registered into Roto so they can be used in Roto scripts. This talk introduces the Roto language and tells the story of how it came to be. You will learn how to write Roto code and how to integrate it in your own Rust projects. Along the way, you’ll gain some insights about how it works under the hood.