Contributing
Contributions to LatticeDB are welcome.
Getting Started
- Fork the repository on GitHub
- Clone your fork and create a branch
- Make your changes
- Run the test suite:
zig build test - Submit a pull request
Development Setup
git clone https://github.com/YOUR_USERNAME/latticedb.git
cd latticedb
zig build test # Verify everything builds and passes
Code Style
- Follow existing Zig conventions in the codebase
- All allocation goes through explicit allocator parameters
- Fail fast: detect and report corruption, don't hide it
- Keep the C API as the contract: all bindings wrap
include/lattice.h
Testing
All changes should include appropriate tests:
- Unit tests for new functions or modules
- Integration tests for end-to-end behavior changes
- Fuzz tests for parser or serialization changes
- Crash tests for durability-related changes
Run the full test suite before submitting:
zig build test
zig build integration-test
Pull Requests
- Keep PRs focused on a single change
- Include a clear description of what changed and why
- Ensure all tests pass
- Add tests for new functionality
Reporting Issues
File issues on GitHub with:
- A clear description of the problem
- Steps to reproduce
- Expected vs actual behavior
- LatticeDB version and platform