I created a little programming language parser and interpreter written entirely in Rust with an optional "no_std" Crate feature allowing the parser/interpreter to work in environments where the standard library is not available (e.g. embedded devices).
The excellent Nom library was used to build the parser. The interpreter itself has no external dependencies.
By way of an example, linked is a live demo of the parser and interpreter compiled to a WASM module, allowing scripts to be parsed and executed entirely within the browser.
The project is mainly a component of another project that I'm working on, but I thought that some of you might be interested in the progress so far. Everything's open source, so please take a look at the code too (GitHub link on page). I'm planning on writing a tutorial series about this too, so I'll post a link to that when it's available.
I created a little programming language parser and interpreter written entirely in Rust with an optional "no_std" Crate feature allowing the parser/interpreter to work in environments where the standard library is not available (e.g. embedded devices).
The excellent Nom library was used to build the parser. The interpreter itself has no external dependencies.
By way of an example, linked is a live demo of the parser and interpreter compiled to a WASM module, allowing scripts to be parsed and executed entirely within the browser.
The project is mainly a component of another project that I'm working on, but I thought that some of you might be interested in the progress so far. Everything's open source, so please take a look at the code too (GitHub link on page). I'm planning on writing a tutorial series about this too, so I'll post a link to that when it's available.
Thanks!