Thank you for considering contributing to Vitalis! This document provides guidelines and information for contributors.
- Rust (Edition 2024, stable toolchain)
- Python 3.10+ (for the Python wrapper, optional)
- Git
git clone https://github.com/ModernOps888/vitalis.git
cd vitalis
cargo buildcargo testcargo run -- run examples/hello.sl- Open an issue on GitHub with a clear title and description
- Include the
.slsource code that triggers the bug - Include the full error output
- Mention your OS and Rust version (
rustc --version)
- Open an issue with the
enhancementlabel - Describe the feature and why it would be useful
- If possible, include syntax examples for language features
- Fork the repository
- Create a feature branch:
git checkout -b feature/my-feature - Make your changes
- Run
cargo testand ensure all tests pass - Run
cargo clippyand fix any warnings - Submit a pull request
- Follow standard Rust formatting (
cargo fmt) - Use
cargo clippyfor linting - Write doc comments for public APIs
- Add tests for new functionality
- Keep functions focused and well-named
Source (.sl) → Lexer → Parser → AST → TypeChecker → IR → Optimizer → Cranelift JIT/AOT → Native
61 modules, ~45,703 LOC, 1,177 tests. Key modules:
| Module | Purpose |
|---|---|
lexer.rs |
Logos-based zero-copy tokenizer (~70 token variants) |
parser.rs |
Recursive-descent + Pratt parser → AST |
ast.rs |
30+ expression variants with origin tracking |
types.rs |
Structural type checker with capability annotations |
generics.rs |
Generic functions/structs, monomorphization |
ownership.rs |
Borrow checker (Owned/Moved/Borrowed/Dropped) |
lifetimes.rs |
Region analysis, lifetime constraints |
nll.rs |
Non-lexical lifetimes — CFG, liveness, NLL borrow regions |
effects.rs |
Effect system (IO/Net/FS/Async/GPU capabilities) |
ir.rs |
SSA-form intermediate representation |
optimizer.rs |
Constant folding, DCE, CSE, loop tiling, inlining |
codegen.rs |
Cranelift 0.116 JIT backend (~3,853 lines) |
aot.rs |
AOT compilation → native binaries |
cross_compile.rs |
x86-64 / AArch64 / RISC-V targets |
stdlib.rs |
~196 built-in functions |
evolution.rs |
@evolvable function registry + rollback |
engine.rs |
Autonomous evolution cycle runner |
hotpath.rs |
Native Rust fast-path operations (44 ops) |
bridge.rs |
C FFI exports for Python/C interop |
lsp.rs |
Language Server Protocol (diagnostics, hover, completion) |
See the full module map in README.md.
- Standard library expansion — new built-in functions
- Language features — effect handlers, pattern exhaustiveness
- Platform support — Linux/macOS builds and CI
- Documentation — tutorials, language guide, API docs
- Benchmarks — comparative benchmarks with other JIT languages
- Editor support — VS Code extension, syntax highlighting
- Package manager — registry and dependency resolution
By contributing, you agree that your contributions will be licensed under the MIT OR Apache-2.0 license.