Skip to content

dalps/tinyrust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tiny Rust

tinyrust is an interpreter of a small subset of the Rust language, focusing primarily on reimplementing its borrow-checking rules in a small-step fashion.

It comes with a friendly TUI (see below) that lets you step through the instructions of a valid Rust program and inspect the environment and memory during its execution.

Play with Tiny Rust

First, install the dependencies:

opam install menhir ppx_jane ANSITerminal minttea nice_parser re

Then, run the frontend with the syntax dune exec tinyrust <max_steps> <program>. For example:

dune exec tinyrust 100 test/examples/01-print.rs

Here's what it looks like:

image

About

A tiny interpreter of a tiny fragment of Rust

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published