Installation Guide
Prerequisites
Before installing Kwasa-Kwasa, ensure you have the following prerequisites:
- Rust (latest stable version)
- Cargo (comes with Rust)
- Git
Installation Steps
- Clone the repository:
git clone https://github.com/yourusername/kwasa-kwasa.git cd kwasa-kwasa
- Build the project:
cargo build --release
- Run the tests to ensure everything is working:
cargo test
Using as a Dependency
To use Kwasa-Kwasa in your own Rust project, add it to your Cargo.toml
:
[dependencies]
kwasa-kwasa = { git = "https://github.com/yourusername/kwasa-kwasa" }
Development Setup
For development, you might want to install additional tools:
- Install recommended VS Code extensions (if using VS Code)
- Set up pre-commit hooks:
git config core.hooksPath .github/hooks
Troubleshooting
If you encounter any issues during installation:
- Make sure you have the latest stable Rust version:
rustup update stable
- Clear your Cargo cache if needed:
cargo clean
- Check the Issue Tracker for known problems
For additional help, please open an issue.
Running Kwasa-Kwasa
Using the CLI
The Kwasa-Kwasa CLI provides several commands for working with Turbulance:
- Run a Turbulance script
# Using debug build cargo run -- run path/to/script.turb # Or using release build ./target/release/kwasa-kwasa run path/to/script.turb
- Validate a script without executing
cargo run -- validate path/to/script.turb
- Process a document with embedded Turbulance
cargo run -- process path/to/document.md # Interactive mode cargo run -- process path/to/document.md --interactive
- Start the interactive REPL
cargo run -- repl
Installing Globally
To make the kwasa-kwasa
command available system-wide:
cargo install --path .
After this, you can run commands directly:
kwasa-kwasa repl
kwasa-kwasa run path/to/script.turb
Directory Structure
The Kwasa-Kwasa codebase is organized as follows: