Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rust-hosted-langs/book
Writing Interpreters in Rust: a Guide
https://github.com/rust-hosted-langs/book
allocator book garbage-collection interpreted-programming-language rust
Last synced: 8 days ago
JSON representation
Writing Interpreters in Rust: a Guide
- Host: GitHub
- URL: https://github.com/rust-hosted-langs/book
- Owner: rust-hosted-langs
- License: cc-by-4.0
- Created: 2018-04-25T01:44:22.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-07-27T21:48:37.000Z (4 months ago)
- Last Synced: 2024-08-02T22:21:58.286Z (4 months ago)
- Topics: allocator, book, garbage-collection, interpreted-programming-language, rust
- Language: Rust
- Homepage: https://rust-hosted-langs.github.io/book/
- Size: 3.01 MB
- Stars: 475
- Watchers: 9
- Forks: 28
- Open Issues: 25
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE-APACHE
Awesome Lists containing this project
- awesome-list - book - hosted-langs | 100 | (Rust)
README
# Writing Interpreters in Rust: a Guide
![](https://github.com/rust-hosted-langs/book/workflows/code-test/badge.svg)
This is an online book covering the lower level topics involved in writing an
interpreter in Rust including:* memory management: allocation and garbage collection
* compiling: expressions, functions, closures
* virtual machines: bytecode, instruction dispatch## Project vision
From CPython to Ruby's YARV, V8 and SpiderMonkey, GHC to the JVM, most language
runtimes are written in C/C++.We believe that Rust is eminently suitable for implementing languages and can
provide significant productivity improvements over C and C++ while retaining
the performance advantages and low level control of both.While there are a number of languages implemented in Rust available now, in
varying states of completeness - interpreters, AOT compilers and
JIT-compiled - our vision is singular:_To create a well documented reference compiler and runtime,
permissively licensed, such that you can fork and morph it into your own
programming language._That is, a platform for bootstrapping other languages, written in Rust.
To that end, the implementation provided here is not intended to be feature
complete and cannot possibly represent every variation of programming
language or local optimization.It is a lofty goal, and it certainly won't be the right approach for
everybody. However, we hope it will help shift the landscape in favor of more
memory-safe language implementations.## Getting involved
See `CONTRIBUTING.md` for licensing and how to get involved.
## The contents
The rendered book can be read [here](https://rust-hosted-langs.github.io/book/)
while the accompanying source code can be browsed in this repository.