Crates.io | lisp-rs |
lib.rs | lisp-rs |
version | 0.3.5 |
source | src |
created_at | 2022-05-07 13:59:37.550782 |
updated_at | 2022-06-03 00:21:13.624884 |
description | Lisp interpreter in Rust |
homepage | https://vishpat.github.io/lisp-rs |
repository | https://github.com/vishpat/lisp-rs |
max_upload_size | |
id | 582128 |
size | 2,878,040 |
A simple Lisp interpreter/library in Rust. The interpreter/library was initially developed as a teaching aid to explain how Lisp interpreters work and how can they be implemented using the Rust programming language. However the interpreter seems to be taking life of it's own and has been ported to the web using WASM. The interpreter is available as a crate and can be used to embed a Lisp interpreter in your Rust projects. The WASM implementation uses the lisp-rs as a library to implement the online interpreter.
The interpreter is based on a modified subset of Scheme. Following are the features supported by the interpreter
More information about the dialect can be found at
The interpreter has been implemented in three phases
Phase I: Complete interpreter and REPL implementation with support for basic data types (integers and boolean), variables, lambdas, and lambda calls (branch 0.0.1)
Phase II: Support for advanced data types (string, float, and lists) and functional constructs (branch 0.0.2)
Phase III: Support for tail call optimization (branch 0.0.3) and closures (branch 0.0.4)
For a detailed code-walkthrough about Phase-I implementation refer to the docs. For code-walkthrough of all the phases, get the e-book.
cargo run --features="build-binary"
cargo test
The interpreter has also been compiled to WASM so that it can run in a browser and is hosted here.