Prerequisites
Before you begin, ensure you have the following tools installed:- Rust: Minimum version 1.91 (MSRV policy: N-2)
- Node.js: LTS version or later
- pnpm: Package manager for Node.js dependencies
- just: Command runner for development tasks
just via cargo:
Quick Setup
Initialize development tools
This installs required Rust tools and Node.js dependencies:This command installs:
cargo-insta- Snapshot testingtypos-cli- Spell checkercargo-shear- Unused dependency removerwatchexec-cli- File watcher- All Node.js dependencies via
pnpm install
Clone test submodules
Oxc uses external test suites for conformance testing:This clones Test262, Babel, TypeScript, and Prettier test suites.
Development Commands
Essential Commands
These are the most frequently used commands during development:Crate-Specific Commands
After modifying certain crates, you need to regenerate files:Watch Commands
Automatically re-run commands on file changes:Example Commands
Run crate examples for quick testing:Making Your First Contribution
Find an issue
Browse good first issues or ask for guidance on Discord.
Make your changes
AI Usage Policy
AI-generated code must be thoroughly reviewed, tested, and understood before submission. It should meet Oxc’s performance and quality standards.Git Pre-commit Hook
Optionally install a pre-commit hook to automatically format code:just fmt before each commit.
Troubleshooting
AST Generation Fails
Ifjust ast fails on first run, try running with JS generators disabled first:
Conformance Tests Fail
Ensure submodules are up to date:Build Fails After Pulling Changes
Clean build artifacts and rebuild:Next Steps
- Learn about the Codebase Architecture
- Understand the Testing Infrastructure
- Learn how to Add Linter Rules
- Read the FAQ for common questions
Getting Help
If you need assistance:- Join our Discord server
- Ask questions on GitHub Discussions
- Review existing pull requests for examples