Skip to content
Rust Search
← EuroRust 2025

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

Player unavailable or embedding blocked? Use the YouTube link above.

Other talks by Terts Diepraam

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 way. You can expect lots of unsafe code, deep dives into the Rust Reference and coercions from slices to function pointers.