Thank you for your interest in contributing to LUMOS! This document provides guidelines and instructions for contributing.
- Rust 1.75 or later
- Git
- A GitHub account
-
Fork and clone the repository
git clone https://github.com/RECTOR-LABS/lumos.git cd lumos -
Build the project
cargo build
-
Run tests
cargo test -
Run the CLI locally
cargo run --package lumos-cli -- --help
-
Install git hooks (recommended)
bash .github/scripts/install-hooks.sh
This installs a pre-commit hook that automatically validates
.lumosschema files before each commit.
Create a .env file based on .env.example at the repo root. Useful variables:
LUMOS_WATCH_DEBOUNCE: Debounce delay in ms for--watchRUST_LOG: Set logging level (e.g.,info)
The anchor generate command now requires an explicit program address via --address and validates it as a base58-encoded 32-byte Solana program ID.
Example:
lumos anchor generate examples/basic/schema.lumos --address Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS --typescript
If you find a bug, please create an issue with:
- A clear, descriptive title
- Steps to reproduce the issue
- Expected vs actual behavior
- Your environment (OS, Rust version, LUMOS version)
- Code samples if applicable
Feature requests are welcome! Please create an issue describing:
- The problem you're trying to solve
- Your proposed solution
- Any alternatives you've considered
- Why this would be useful to other users
-
Create a branch
git checkout -b feature/your-feature-name
-
Make your changes
- Follow the existing code style
- Add tests for new functionality
- Update documentation as needed
-
Run checks locally
cargo fmt --all -- --check cargo clippy --all-targets --all-features cargo test --all -
Commit your changes
- Write clear, concise commit messages
- Reference any related issues
- If you've installed git hooks,
.lumosfiles are automatically validated
-
Push and create a pull request
git push origin feature/your-feature-name
- Follow Rust standard formatting (
cargo fmt) - Address all Clippy warnings (
cargo clippy) - Write tests for new functionality
- Document public APIs with doc comments
- Unit tests:
cargo test --lib - Integration tests:
cargo test --test '*' - All tests:
cargo test --all
- Update README.md for user-facing changes
- Add doc comments for public APIs
- Update examples if behavior changes
lumos/
├── packages/
│ ├── core/ # Core schema parsing and IR
│ └── cli/ # Command-line interface
├── examples/ # Usage examples
└── docs/ # Documentation
Be respectful and inclusive. We're building for the Solana community together.
- Open an issue for questions about contributing
- Tag @rz1989s for urgent matters
By contributing, you agree that your contributions will be dual-licensed under MIT OR Apache-2.0, matching the project's license.
Thank you for helping make LUMOS better!