# Contributing
## Building
```bash
# Debug build
cargo build
# Release build
cargo build --release
# With JIT
cargo build --features jit
# All features
cargo build --features full
```
## Testing
```bash
# Run all tests
cargo test
# With JIT tests
cargo test --features jit
# Specific test
cargo test test_lookahead
```
## Benchmarks
```bash
# Run benchmarks
cargo bench
# Specific benchmark
cargo bench throughput
cargo bench compile
cargo bench simd
```
## Code Style
- Run `cargo fmt` before committing
- Run `cargo clippy` and address warnings
- Add tests for new features
- Update documentation for API changes
## Pull Requests
1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Run tests and clippy
5. Submit a pull request
## Project Structure
```
src/
├── lib.rs # Public API
├── regex.rs # Regex type and methods
├── error.rs # Error types
├── parser/ # Lexer and parser
├── analyzer/ # Pattern analysis
├── backtrack/ # VM bytecode compiler and executor
├── engine/ # Engine trait and implementations
│ ├── vm.rs # Bytecode VM
│ ├── jit/ # Cranelift JIT
│ ├── lazy_dfa.rs # Lazy DFA
│ └── glushkov.rs # Glushkov NFA
└── simd/ # SIMD implementations
├── teddy.rs # Native Teddy
└── wasm.rs # WASM Teddy
```