Contributing
Contributions are welcome! This guide will help you get started.
Getting Started
- Fork the repository
- Clone your fork:
git clone https://github.com/warpy-ai/script.git
cd script - Create a branch:
git checkout -b feature/your-feature-name
Building
See the Getting Started guide for build instructions.
Testing
Run the test suite:
# Run all tests
cargo test --release
# Run specific IR tests
cargo test --release ir::
# Output: 94 tests passed
Code Style
- Follow Rust conventions
- Use
rustfmtfor formatting - Write tests for new features
- Update documentation
Project Structure
script/
├── src/
│ ├── main.rs # Entry point
│ ├── compiler/ # Rust compiler (SWC-based)
│ ├── ir/ # SSA IR system
│ ├── runtime/ # Native runtime kernel
│ ├── vm/ # Stack-based VM (debug)
│ ├── backend/ # Native backends (Cranelift, LLVM)
│ └── stdlib/ # Standard library
├── bootstrap/ # Self-hosting compiler
├── std/ # Standard prelude
└── examples/ # Example programs
Areas for Contribution
- Language features: ES modules, async/await, more stdlib
- Performance: Optimizations, profiling, benchmarks
- Documentation: Examples, guides, API docs
- Tooling: Formatter, linter, LSP
- Testing: More test cases, edge cases
Submitting Changes
- Write tests for your changes
- Update documentation if needed
- Run the test suite to ensure everything passes
- Submit a pull request with a clear description
License
By contributing, you agree that your contributions will be licensed under the Apache License 2.0.