A minimal Unix shell written in Rust, built as part of the CodeCrafters "Build Your Own Shell" challenge.
- REPL loop — displays a
$prompt and reads commands interactively - Built-in commands:
echo <text>— print text to stdouttype <cmd>— show whether a command is a shell builtin or an external executable (with its full path)exit— exit the shell
- External command execution — any command not matched as a builtin is looked up in
$PATHand executed as a child process
- Rust (edition 2024)
cargo build --release
./target/release/shell-rustOr run directly with:
cargo run$ echo hello world
hello world
$ type echo
echo is a shell builtin
$ type ls
ls is /bin/ls
$ ls -la
...
$ exit
src/
└── main.rs # entire shell implementation
MIT