Get the latest tech news

My experience crafting an interpreter with Rust (2021)


Last year I finally decided to learn some Rust. The official book by Steve Klabnik and Carol Nichols is excellent, but even after reading it and working on some small code exercises, I felt that I …

The official book by Steve Klabnik and Carol Nichols is excellent, but even after reading it and working on some small code exercises, I felt that I needed more to really understand the language. The Lox language doesn’t have the strict rules that Rust has; it’s easy to create cyclic data structures that would leak memory if implemented using reference counting. One day I realized something that now feels so obvious that I’m almost ashamed to admit it: I am writing a garbage collector and its main job is to find objects with no references from the live parts of the program.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Experience

Experience

Photo of Rust

Rust

Photo of interpreter

interpreter

Related news:

News photo

Zig vs. Rust at work: the choice we made

News photo

IPC in Rust – A Ping Pong Comparison

News photo

Enhancing Code Completion for Rust in Cody