Skip to content

ehsanmok/create-your-own-lang-with-rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This repository contains the codes and the contents for createlang.rs.

Why am I writing this book?

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

"If you don't know how compilers work, then you don't know how computers work" 1

"If you can’t explain something in simple terms, you don’t understand it" 2

Installation

  1. Install Rustlang via rustup
  2. Clone this repository
  3. To build the book locally, follow the instruction in mdbook

Content outline

  • Introduction
  • Crash course on Computing
  • Calculator
    • Grammar, lexer and praser
    • AST and cnterpreter
    • JIT with LLVM
      • Basic add function example
      • AST traversal patterns
    • Exercises
    • VM, bytecode and interpreter
    • REPL
    • Jeslang
      • Static typing
      • Type inference
      • ...
    • Object system and OOP
    • Functional lang
    • (TENTATIVE) Module system and packaging
    • (TENTATIVE) Mini-standard library
    • Content resources

Donation

If you have found this project useful, please consider donating to any of the organizations below

Contributors 9