A custom Unix-like shell implemented in Rust.
- External Commands: Runs any executable available in
rune.conf(e.g.,ls,grep,cat). - Built-ins: Supports standard built-in commands:
cd [dir]— Change directorypwd— Print current working directoryecho— Display some messageexit [code]— Exit the shell with an optional status code
- Pipeline Processing: Supports chaining commands with
|, e.g.:Each stage runs in its own process, with standard input/output properly connected via pipes.ls | grep src | wc
- Process Groups: Each pipeline sets up a process group for future job control features (
setpgid), laying the groundwork forCtrl+Z, backgrounding, and job management. - Proper FD Handling: Pipes, stdin/stdout redirection, and close-on-exec all handled robustly to avoid resource leaks and deadlocks.
- Rust (latest stable recommended)
- Unix-like OS (Linux, macOS, WSL, etc.)
git clone https://github.com/zen-zap/rune.git
cd runecargo buildOr, for a development build with debug info:
cargo build --releasecargo runOr, run the compiled binary directly:
./target/debug/rune
# Or, for the release build:
./target/release/runeRuneShell $ ls | grep src | wc
1 1 4
RuneShell $ cd ..
RuneShell $ pwd
/home/username
RuneShell $ exit
It looks for a rune.conf file in ../rune which is the parent directory of the rune directory, when you clone the repository.
Example Configuration:
/bin
/usr/bin
/usr/local/bin
/sbin
/usr/sbin
/home/username/.local/bin
./bin
Any contributions are welcome!