Skip to content

SlfWind/MiniLisp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MiniLisp

A mini-Lisp interpreter written in Rust.

Current status

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

Build the project normally:

cargo build

Run the binary and inspect the command-line interface:

cargo run -- --help
cargo run -- --version

Command-line usage

The binary name is minilisp.

-i, --interactive

Reserved for interactive REPL mode.

cargo run -- --interactive

Current behavior: the program accepts the flag, then reports that interactive mode is not implemented yet.

-s, --source <FILE>

Provide a source file to execute.

cargo run -- --source path/to/program.lisp

Alias:

cargo run -- --src path/to/program.lisp

Current behavior: the program accepts the argument, then reports that source execution is not implemented yet.

Bash completion generation

Completion generation is disabled for normal builds.

Generate the Bash completion script only when needed:

cargo build --features completions

The 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.bash

Load it into the current shell session:

source target/debug/build/<build-hash>/out/minilisp.bash

Tests

Run the test suite with:

cargo test

At the moment, test coverage is limited to basic CLI parsing.

Development container

The devcontainer configuration is in .devcontainer/devcontainer.json. It uses the rust:trixie image.

About

A mini-Lisp interpreter written in Rust.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages