Thank you for considering contributing to Zixir. This document explains how to build, test, and submit changes.
- Elixir 1.14+ / OTP 25+
- Zig 0.15+ (or run
mix zig.getaftermix deps.get) - Git
Optional: Python 3.8+ (for specialist calls), Beaver (Unix, for MLIR).
git clone https://github.com/Zixir-lang/Zixir.git
cd Zixir
mix deps.get
mix zig.get
mix compilemix testTo run a single test file:
mix test path/to/test_file_test.exsAfter building, verify the JIT path:
mix zixir run examples/enterprise_test.zrExpected output ends with a number (e.g. 28.75). Interpreter path:
mix zixir.run examples/hello.zixirExpected: 11.0.
| Path | Purpose |
|---|---|
lib/zixir/ |
Main application and compiler |
lib/zixir/compiler/ |
Parser, Zig backend, MLIR, type system, GPU |
lib/mix/tasks/ |
Mix tasks (mix zixir, mix zixir.run, mix zixir.lsp) |
priv/zig/ |
Zig runtime and bridges |
priv/python/ |
Python port bridge |
.vscode/ |
VS Code extension (syntax, LSP client) |
examples/ |
Example Zixir scripts |
docs/ |
Documentation |
test/ |
ExUnit tests |
The canonical source is under lib/. Do not rely on the nested Zixir/ directory; it may be legacy or reference-only.
- Follow the existing style in the codebase (indentation, naming).
- Run the formatter:
mix format. - Use consistent import ordering (stdlib, third-party, local).
- Fork the repository on GitHub.
- Create a branch from
master:git checkout -b my-feature. - Make your changes. Keep commits focused and messages clear.
- Run
mix compile,mix test, andmix zixir run examples/enterprise_test.zr. - Push to your fork and open a Pull Request against
Zixir-lang/Zixirmaster. - In the PR description, briefly explain what changed and why.
- Tests (especially for compiler/Zig backend and edge cases)
- Documentation (examples, use cases, clarifications)
- Bug fixes and small improvements
- Examples (
.zr/.zixirscripts)
For larger features (e.g. new language constructs or backend changes), open an issue first to discuss.
Open an issue for bugs, feature ideas, or questions.