book icon indicating copy to clipboard operation
book copied to clipboard

Writing Interpreters in Rust: a Guide

Results 28 book issues
Sort by recently updated
recently updated
newest added

It should be fairly straightforward to adjust the allocator to bump-allocate downward from the end of a block rather than upward from the beginning. See https://fitzgeraldnick.com/2019/11/01/always-bump-downwards.html for an explanation. Bump...

medium
allocator

I originally wrote the parser to generate a nested `Pair` tree data structure, just like Lisp uses cons cells. I did this to simplify bootstrapping into a compiler when I...

easy
book-section
parser

See discussion on regarding the nanopass concept. In my opinion this is a very relevant idea for this book, given that half the purpose is to provide a baseline for...

hard
parser
compiler
data structures

The `CloseUpvalues` opcode can take three operands, i.e. up to three upvalues can be closed in one operation. The present implementation lazily only does one. See TODO: `interpreter/src/compiler.rs:247` Refactor the...

easy
compiler

Implement simple stop-the-world tracing for all objects in all blocks, including large objects. This code should live on the interpreter side as the entry point to tracing an object is...

medium
garbage collection

Implement dead object sweeping across all blocks. * Blocks with 2 or more consecutively unmarked lines should be added to an allocation block-recycling list * The allocator should make use...

medium
allocator
garbage collection

The book should include a chapter (or series of multiple chapters) discussing the basics of garbage collection and how to tackle this using Rust. The end goal should be a...

book-section
garbage collection

Numbers that overflow `(size_of::() * 8) - 2` bits should be stored in `NumberObject` objects. I have no experience implementing number objects and I understand that there may be commonly...

vm
data structures

There needs to be a chapter discussing a simple bytecode format and a parser to use in the VM. I would recommend _not_ using heavy-weight crates such as serde and...

book-section

We need a chapter that outlines the object model the VM will use, what the trade-offs are, etc, etc.

book-section