Development Environment
Astra is written in Rust and uses Cargo for building, testing, and dependency management.
Required tools:
- Rust stable toolchain
- Cargo
- Git
Clone the Repository
git clone https://github.com/SYOP200/astra-shell cd astra-shell
Building Astra
Build a development version:
cargo build
Build an optimized release version:
cargo build --release
Project Structure
astra-shell/ ├── src/ │ ├── main.rs │ ├── shell.rs │ ├── parser.rs │ ├── executor.rs │ ├── prompt.rs │ ├── config.rs │ ├── theme.rs │ └── completion.rs │ ├── bin/ │ └── install │ ├── packaging/ │ ├── Cargo.toml ├── Makefile └── README.md
Code Style
Astra follows standard Rust formatting and linting practices.
cargo fmt cargo clippy
Before submitting changes, make sure the project builds without warnings.
Testing
Run the test suite:
cargo test
Tests should cover new functionality and prevent regressions.
Architecture
Astra is divided into several components:
- Shell - manages the interactive loop
- Parser - processes user input
- Executor - launches commands
- Prompt - renders the terminal interface
- Config - manages user settings
- Theme - controls visual appearance
- Completion - handles suggestions
Adding Features
When adding a feature:
- Create focused modules
- Avoid unnecessary dependencies
- Keep configuration optional
- Document user-facing changes
Building Releases
Release builds are created using:
cargo build --release
Future releases will provide binaries for:
- macOS Intel
- macOS Apple Silicon
- Linux x86_64
- Linux ARM64