Get the latest tech news

Embedding Scheme in Rust


, as a compiled language, makes it challenging to modify the behavior of programs dynamically. In this article, we embed a small Scheme interpreter called Stak Scheme in Rust to dynamically change the behavior of a program without stopping the process.

You can see that the Rust program executed the Scheme script and it calculated the sum of numbers in the list you passed in in the HTTP request. This functionality dynamically reflects modified source files’ contents to running programs, such as HTTP servers. If you don’t care about memory footprints, standards compliance, etc., there are richer Scheme interpreters written in Rust.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Rust

Rust

Photo of scheme

scheme

Related news:

News photo

Game dev in Rust: a year later

News photo

Rust, Reflection and Access Rules

News photo

Boffins carve up C so code can be converted to Rust