This is a repo for Rust solutions to the "Build Your Own Shell" Challenge.
The entry point for this shell
implementation is in src/main.rs
. This simple shell
implementation includes:
- REPL implementation (run
./your_shell.sh
to start the REPL) - handling unknown commands
-
echo
,exit
, andtype
built-in commands - printing the full path to external executables if they are found in the PATH (run
type mkdir
in the REPL as an example) - running external executables with arguments (run
ls -l -s
in the REPL as an example) - implementing the
pwd
built-in command - implementing the
cd
built-in command
- Ensure you have
cargo (1.70)
installed locally - Run
./your_shell.sh
to run your program, which is implemented insrc/main.rs
. This command compiles your Rust project, so it might be slow the first time you run it. Subsequent runs will be fast. - Execute commands in the REPL that appears. You can run any command that you would normally run in a shell.