Thank you for your interest in contributing to Iris! We are building a high-performance, language-agnostic, BEAM-class foundation for distributed systems. To maintain the project's performance and reliability, we follow strict guidelines for development.
Before contributing, please keep our core philosophy in mind:
- Runtime First, Language Second: Rust owns the scheduling, memory, safety, and correctness. Guest languages (Python, Node.js) are users of the runtime.
- No Shared-Mutable State: We forbid shared mutable state across actors to ensure safety.
- Non-Blocking Core: Blocking APIs are strictly prohibited in the core runtime to preserve microsecond-latency profiles.
- Mechanical Sympathy: We optimize for cache locality and minimal lock contention.
- Rust: Latest stable version (installed via
rustup). - Python: 3.8+ (3.10+ recommended).
- Maturin: For building Python bindings.
- Clone the repository:
git clone https://github.com/seuriin/iris.git cd iris - Create a virtual environment:
python -m venv venv source venv/bin/activate - Build the project in development mode:
maturin develop
All contributions must pass existing stress tests and benchmarks. We rely on extreme boundary testing to validate the leanness of the architecture.
For every new feature or significant update, you must ensure the following tests are included:
- Rust Integration Tests: You must write a
pyo3_test_*file in thetests/directory (e.g.,tests/pyo3_test_my_feature.rs). This test must validate the FFI boundary, ensuring the Rust core correctly exposes the feature to the Python runtime. - Python-Side Tests: You must provide a Python script (typically in
tests/orxtest/) that exercises the feature through the high-levelirisPython API. This ensures end-to-end functionality from the perspective of a library user.
- Standard Stress Tests: Run the 100k actor spawn tests to ensure no regressions in throughput.
- Chaos Tests: Use the
run.pyorchestrator to validate that remote monitoring and self-healing logic still handle node failures correctly. - Benchmarking: If modifying the scheduler or network layer, run the benchmarks on your local hardware and compare against the baseline metrics (e.g., the ~563k msgs/sec threshold on single-core setups).
- Format: Use
cargo fmt. - Lints: Use
cargo clippy. - Safety: Avoid
unsafeunless absolutely necessary for FFI or performance-critical operations that cannot be expressed safely.
- API Consistency: Use the
Runtimewrapper class defined iniris/__init__.pyto provide a clean Pythonic API. - GIL Management: Ensure any blocking Python operations use
release_gil=Truewhen spawning actors to prevent stalling the async worker.
- Fork the repo and create your branch from
main. - Ensure your branch builds and passes all integration tests (including the mandatory new ones).
- Update documentation: If you change an API or add a feature, update the relevant
README.mdorFEAT.mdentries. - Submit the PR: Provide a clear description of the changes and any performance impacts observed.