A mini-Lisp interpreter written in Rust.
This repository currently provides:
- a
clap-based command-line interface definition - optional Bash completion generation during build
- the project skeleton for the interpreter, REPL, and tokenizer
The interpreter core is still under construction. --interactive and --source
are already defined as CLI options, but they are not implemented yet.
Build the project normally:
cargo buildRun the binary and inspect the command-line interface:
cargo run -- --help
cargo run -- --versionThe binary name is minilisp.
Reserved for interactive REPL mode.
cargo run -- --interactiveCurrent behavior: the program accepts the flag, then reports that interactive mode is not implemented yet.
Provide a source file to execute.
cargo run -- --source path/to/program.lispAlias:
cargo run -- --src path/to/program.lispCurrent behavior: the program accepts the argument, then reports that source execution is not implemented yet.
Completion generation is disabled for normal builds.
Generate the Bash completion script only when needed:
cargo build --features completionsThe generated script is written under the Cargo build output directory, for example:
target/debug/build/<build-hash>/out/minilisp.bash
You can locate it with:
find target -name minilisp.bashLoad it into the current shell session:
source target/debug/build/<build-hash>/out/minilisp.bashRun the test suite with:
cargo testAt the moment, test coverage is limited to basic CLI parsing.
The devcontainer configuration is in .devcontainer/devcontainer.json.
It uses the rust:trixie image.