Skip to content

Latest commit

 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rust-shell 🐚

A shell implementation written in Rust that reads, parses, and executes commands from an interactive prompt. Supports piping commands together and includes several built-in commands handled directly by the shell.

Built with:

Rust

Features ✨

  • Interactive REPL: reads commands from a prompt in a continuous loop
  • Command parsing: splits input into a program name and arguments
  • Pipes: chain multiple commands together (cmd1 | cmd2 | cmd3)
  • Built-in commands: cd, pwd, exit, export run in-process rather than as subprocesses
  • Graceful error handling: bad commands or failed spawns report an error and return to the prompt instead of crashing

Requirements 🛠️

  • rust (2024 edition)
  • cargo

Installation Guide 📝

Option 1: Run the prebuilt executable (Windows)

No Rust toolchain required. Download bin/rust-shell.exe from this repo and run it directly:

./rust-shell.exe

Option 2: Build from source

  1. Clone the repository:
git clone https://github.com/AdrianTomin/rust-shell.git
cd rust-shell
  1. Build the project:
cargo build
  1. Run the tool:
cargo run

Example Output 🖥️

> pwd
C:\Users\adrian\rust-shell
> findstr name Cargo.toml
name = "rust-shell"
> exit

Testing 🧪

cargo test

Badges

MIT License

Authors

About

A Unix shell implementation written in Rust, exploring how shells handle command parsing, process spawning, and pipeline execution.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages