First off, thank you for considering contributing to VeridianOS! It's people like you that will make VeridianOS a great operating system.
- Code of Conduct
- Getting Started
- How Can I Contribute?
- Development Process
- Coding Standards
- Commit Guidelines
- Pull Request Process
- Community
This project and everyone participating in it is governed by our Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to conduct@veridian-os.org.
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/VeridianOS.git cd VeridianOS - Add upstream remote:
git remote add upstream https://github.com/doublegate/VeridianOS.git
- Set up development environment following DEVELOPMENT-GUIDE.md
Before creating bug reports, please check existing issues to avoid duplicates. When creating a bug report, include:
- Clear title and description
- Steps to reproduce
- Expected behavior
- Actual behavior
- System information (OS, architecture, Rust version)
- Relevant logs or error messages
Use the bug report template when available.
Enhancement suggestions are tracked as GitHub issues. When creating an enhancement suggestion, include:
- Clear title and description
- Rationale - Why would this be useful?
- Detailed explanation of the enhancement
- Possible implementation approach (if you have ideas)
Look for issues labeled with:
good first issue- Simple issues good for newcomershelp wanted- Issues where we need community helpdocumentation- Documentation improvements
- Drivers: Network, storage, and device drivers
- Architecture Ports: RISC-V support improvements
- Testing: Unit tests, integration tests, fuzzing
- Documentation: Tutorials, guides, API docs
- Performance: Optimizations and benchmarks
- Security: Security audits and hardening
Documentation improvements are always welcome! This includes:
- Fixing typos and grammar
- Clarifying existing documentation
- Adding examples
- Writing tutorials
- Translating documentation
main- Primary development branch, all tests passing, PRs target herefeature/*- Feature branchesfix/*- Bug fix branchesdocs/*- Documentation branches
# Sync with upstream
git fetch upstream
git checkout main
git merge upstream/main
# Create feature branch
git checkout -b feature/my-feature- Write code following our coding standards
- Add tests for new functionality
- Update documentation as needed
- Run tests locally:
cargo test - Check formatting:
cargo fmt --all --check
- Run lints:
cargo clippy --target x86_64-unknown-none -p veridian-kernel -- -D warnings cargo clippy --target aarch64-unknown-none -p veridian-kernel -- -D warnings cargo clippy --target riscv64gc-unknown-none-elf -p veridian-kernel -- -D warnings
- All new code must have tests
- Maintain or improve code coverage
- Tests must pass on all supported architectures
- Include both positive and negative test cases
We follow the official Rust Style Guide with these additions:
- Types:
PascalCase - Functions/Methods:
snake_case - Constants:
SCREAMING_SNAKE_CASE - Modules:
snake_case - Feature flags:
kebab-case
Every public item must have documentation:
/// Allocates a physical memory frame.
///
/// # Returns
///
/// Returns `Some(Frame)` if successful, `None` if out of memory.
///
/// # Example
///
/// ```
/// let frame = allocator.allocate_frame()?;
/// ```
pub fn allocate_frame(&mut self) -> Option<Frame> {
// Implementation
}- Use
Result<T, Error>for fallible operations - Create specific error types using
thiserror - Provide helpful error messages
- Never use
.unwrap()in non-test code
- Minimize unsafe code
- Document all safety requirements
- Isolate unsafe code in dedicated modules
- Provide safe wrappers
Example:
/// Dereferences a raw pointer.
///
/// # Safety
///
/// - `ptr` must be valid for reads
/// - `ptr` must be properly aligned
/// - The memory must not be mutated during access
unsafe fn read_raw(ptr: *const u8) -> u8 {
// Safety: Caller ensures preconditions
*ptr
}- Place in
arch/<architecture>/directories - Use conditional compilation
- Provide common traits/interfaces
- Document architecture requirements
- Profile before optimizing
- Document performance-critical code
- Prefer safe code unless performance requires unsafe
- Add benchmarks for performance-critical paths
We follow Conventional Commits:
<type>(<scope>): <subject>
<body>
<footer>
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, etc.)refactor: Code refactoringperf: Performance improvementstest: Test additions or modificationsbuild: Build system changesci: CI configuration changeschore: Other changes (e.g., dependency updates)
feat(mm): implement huge page support
Add support for 2MB and 1GB huge pages in the memory manager.
This improves TLB efficiency for large allocations.
Closes #123
fix(scheduler): resolve race condition in thread wake
A race condition could occur when waking a thread that was
simultaneously being migrated to another CPU. This patch adds
proper locking to prevent the race.
Fixes #456
- Keep commits atomic and focused
- Write clear, descriptive messages
- Reference issues when applicable
- Sign commits with GPG when possible
-
Update from upstream:
git fetch upstream git rebase upstream/main
-
Run all checks:
cargo fmt --all --check cargo clippy --target x86_64-unknown-none -p veridian-kernel -- -D warnings cargo test -
Update documentation if needed
-
Add tests for new functionality
-
Update CHANGELOG.md with your changes
-
Push to your fork:
git push origin feature/my-feature
-
Create Pull Request via GitHub UI
-
Fill out PR template completely
-
Link related issues
-
Request reviews from maintainers
- All CI checks pass
- Code follows style guidelines
- Tests added/updated
- Documentation updated
- CHANGELOG.md updated
- Commits are clean and well-described
- PR description explains changes
- Automated checks run first
- Maintainer review for code quality
- Address feedback promptly
- Squash commits if requested
- Merge once approved
- Delete your feature branch
- Update your local repository
- Celebrate your contribution! 🎉
- Discord: #dev-help
- Matrix: #veridian-dev:matrix.org
- Mailing List: dev@veridian-os.org
- Architecture: Use GitHub Discussions
- Features: Create an RFC (Request for Comments)
- Bugs: Use issue tracker
- Time: Thursdays at 18:00 UTC
- Platform: Discord voice channel
- Agenda: Posted in #meeting-agenda
Contributors are recognized in several ways:
- Listed in CONTRIBUTORS.md
- Mentioned in release notes
- Special roles in Discord
- Contributor badge on forum
# Use sccache
export RUSTC_WRAPPER=sccache
# Limit parallel jobs if low on RAM
cargo build -j 2
# Build only specific component
cargo build -p veridian-kernel# Enable debug logging
RUST_LOG=debug just run
# Run with GDB
just gdb
# Use QEMU monitor
just run -- -monitor stdio# Run specific test
cargo test test_name
# Run tests with output
cargo test -- --nocapture
# Run benchmarks
cargo benchIf you have questions not covered here:
- Check the FAQ
- Ask on Discord
- Email dev@veridian-os.org
Thank you for contributing to VeridianOS! Your efforts help build a better operating system for everyone.
Remember: The best way to get started is to pick a small issue and dive in. We're here to help!