a work in progress draft of an online book "Writing Interpreters in Rust: a Guide"
accompanying source code for an allocator and an interpreter (compiler and virtual machine)
lots of rough edges:
compiler warnings (mostly function X is never called)
missing features (mostly language completeness and garbage collection itself)
TODOs in the source code
likely lots of unidiomatic Rust (I stopped trying to keep up with what is idiomatic and focused on getting something done)
very likely a few soundness bugs
lots of unoptimized code
under-documented code
probably some wheel-reinventing that crates out there already solved
book is in progress
This is obviously an absurdly large pull request. The history of that is that in the early days there was a lot of churn in my code design (implying a long period where I lacked confidence in my choices) and so by the time the architecture had stabilized there was already quite a lot of code.
Proceeding
My intention is to focus on the book until it is caught up with the source code.
PRs and contributions
If this looks at all interesting to anybody, some questions should be discussed:
book license
I think this should be some form of Creative Commons but which one?
source code license
I initially picked MPLv2 because I have some sympathy to copyleft
I also recognize that this is a rare choice and there are arguments in favor of more copyleft but possibly even more arguments toward the commonly used MIT/Apache2 in the Rust community. MPLv2 is a middle-way IMO but :man_shrugging:
This PR is too big to be sanely reviewed. Options:
just accept it, ugly parts and all as something to start from: merge it to base/master and create issues and PRs from there on
don't accept it as is, fork this fork and make PRs to it until it's acceptable quality. This could take a long time.
What should this become?
What should the book and code cover, going forward?
What I'd like this to be is a repository that somebody can fork and design their own language from, where the builiding blocks are provided. A language design kit, almost. That's a way off though.
Book rendering updated on each push: https://pliniker.github.io/book/
What this is:
This is obviously an absurdly large pull request. The history of that is that in the early days there was a lot of churn in my code design (implying a long period where I lacked confidence in my choices) and so by the time the architecture had stabilized there was already quite a lot of code.
Proceeding
My intention is to focus on the book until it is caught up with the source code.
PRs and contributions
If this looks at all interesting to anybody, some questions should be discussed:
What should this become?
What should the book and code cover, going forward?
What I'd like this to be is a repository that somebody can fork and design their own language from, where the builiding blocks are provided. A language design kit, almost. That's a way off though.