You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
2.1 KiB

# Create your own programming language with Rust
![Github Pages](https://github.com/ehsanmok/create-your-own-lang-with-rust/workflows/Github%20Pages/badge.svg?branch=master)
4 years ago
![CI](https://github.com/ehsanmok/create-your-own-lang-with-rust/workflows/CI/badge.svg?branch=master)
4 years ago
This repository contains the codes and the contents for [createlang.rs](https://createlang.rs)
4 years ago
4 years ago
## Why am I writing this book?
4 years ago
4 years ago
The book arises from my frustration of not finding modern, clear and concise teaching materials that are readily accessible to beginners like me who wants to learn a bit on how to create their own programming language.
The following are my guidelines
4 years ago
> "If you don't know how *compilers* work, then you don't know how computers work" <sup>[1](http://steve-yegge.blogspot.com/2007/06/rich-programmer-food.html?)</sup>
4 years ago
> "If you can’t explain something in simple terms, you don’t understand it" <sup>[2](https://skeptics.stackexchange.com/questions/8742/did-einstein-say-if-you-cant-explain-it-simply-you-dont-understand-it-well-en)</sup>
4 years ago
## Requirements
4 years ago
4 years ago
Make sure you have
4 years ago
1. [Rust toolchain installed](https://www.rust-lang.org/tools/install)
4 years ago
2. Cloned this repository (follow the instructions in each chapter)
4 years ago
3. LLVM installed to run and test locally `cargo test --tests`
* Easiest option is LLVM v14.0 ([Debian/Ubuntu](https://apt.llvm.org/) or [macOS](https://formulae.brew.sh/formula/llvm))
* Otherwise, in `Cargo.toml` you'd need to change the `inkwell = { ..., branch = "master", features = ["your-llvm-version"] }` with LLVM version on your system (output of `llvm-config --version`)
4 years ago
To build the book locally, navigate to the `book` subdirectory and follow the instructions in [mdbook](https://github.com/rust-lang/mdBook).
4 years ago
4 years ago
## Roadmap
Checkout the [roadmap to the 1st edition](https://github.com/ehsanmok/create-your-own-lang-with-rust/projects).
4 years ago
## Donation
4 years ago
If you have found this project useful, please consider donating to any of the organizations below
4 years ago
* [Child Foundation](https://mycf.childfoundation.org/s/donate)
4 years ago
* [Black Lives Matter](https://blacklivesmatter.com/)
4 years ago
* [Food Bank of Canada](https://www.foodbankscanada.ca/)