Back to Rspack

Skills Required for Rspack Development

.agents/SKILLS.md

2.0.17.9 KB
Original Source

Skills Required for Rspack Development

Skills and knowledge areas needed to contribute to Rspack.

Core Programming Languages

Rust (Essential)

Primary language for Rspack's core engine.

Required Skills:

  • Fundamentals: Ownership, borrowing, lifetimes, traits, generics
  • Async: async/await, Future, tokio runtime
  • Concurrency: Thread-safe structures, Arc, Mutex, RwLock
  • Error Handling: Result<T, E>, Option<T>, error propagation
  • Macros: Declarative, procedural, derive macros
  • Performance: Zero-cost abstractions, memory management, profiling
  • Testing: Unit tests, integration tests

Key Crates:

  • napi-rs: Node.js bindings
  • swc: JavaScript/TypeScript compiler
  • tokio: Async runtime
  • serde: Serialization
  • rayon: Parallel processing

Resources:

JavaScript/TypeScript (Essential)

Used for JavaScript API layer, CLI tools, and test infrastructure.

Required Skills:

  • TypeScript: Type system, generics, utility types
  • Modern JavaScript: ES6+, async/await, modules (ESM/CJS)
  • Node.js: APIs, streams, file system
  • Package Management: npm, pnpm, workspaces
  • Build Tools: Understanding bundlers, loaders, plugins

Key Libraries:

  • @rspack/core: Core Rspack API
  • @rspack/test-tools: Testing utilities

Resources:

Build System & Compiler Knowledge

Bundler Concepts (Essential)

Key Concepts:

  • Module resolution
  • Dependency graph
  • Code splitting
  • Tree shaking
  • Source maps
  • Hot Module Replacement (HMR)
  • Asset processing

Resources:

Compiler Theory (Helpful)

Key Concepts:

  • AST (Abstract Syntax Tree)
  • Parsing, transformation, code generation
  • Static analysis

Resources:

Testing & Quality Assurance

Testing Skills (Essential)

Rust Testing:

  • Unit tests with #[test]
  • Integration tests
  • Test organization

JavaScript/TypeScript Testing:

  • Integration tests in tests/rspack-test/
  • Snapshot testing
  • Test types: Normal, Config, Hot, Watch, StatsOutput, etc.

Test Tools:

  • cargo test: Rust test runner
  • @rspack/test-tools: Rspack test utilities

Resources:

Code Quality (Essential)

Linting:

  • Rust: cargo clippy, cargo check
  • JavaScript/TypeScript: Rslint
  • Type checking: TypeScript compiler

Formatting:

  • Rust: cargo fmt
  • JavaScript/TypeScript: Prettier
  • TOML: taplo

Debugging & Performance

Debugging Skills (Essential)

Rust Debugging:

  • VS Code debugging configuration
  • rust-lldb for panic debugging
  • Breakpoints and step-through debugging

JavaScript Debugging:

  • Node.js --inspect flag
  • Chrome DevTools integration

Resources:

Performance Optimization (Important)

Key Areas:

  • Profiling bottlenecks
  • Parallelization
  • Caching (persistent and memory)
  • Incremental compilation
  • Memory management

Tools:

  • cargo flamegraph: Rust profiling
  • Perfetto tracing
  • Benchmark suites

Resources:

System Design & Architecture

Monorepo Management (Important)

Skills:

  • Workspace management (pnpm, Cargo)
  • Dependency management
  • Build orchestration
  • Code organization

Resources:

Plugin System Architecture (Important)

Key Concepts:

  • Plugin interface
  • Hook system (sync/async, series/parallel)
  • Compilation lifecycle (make, seal, emit)
  • Module graph management

Resources:

Cross-Language Interoperability

Rust-JavaScript Interop (Essential)

Key Concepts:

  • NAPI (Node-API)
  • napi-rs: Rust bindings
  • Type marshalling
  • Async interop
  • Memory management

Resources:

WebAssembly (Optional)

  • WASM compilation
  • WASI (WebAssembly System Interface)
  • Browser vs. Node.js environments

Version Control & Collaboration

Git & GitHub (Essential)

Skills:

  • Branching (feature branches)
  • Conventional commits
  • Pull requests
  • Code review

Resources:

Domain-Specific Knowledge

Webpack Ecosystem (Important)

Key Areas:

  • Webpack API (Compiler, Compilation, Module, Chunk)
  • Plugin development patterns
  • Loader development patterns
  • Configuration options

Resources:

Frontend Build Tools (Helpful)

  • Vite, esbuild, Rollup, Parcel
  • Module Federation
  • Code splitting strategies
  • CSS processing (PostCSS, Lightning CSS)

Learning Path Recommendations

For Rust Developers New to Bundlers

  1. Learn webpack concepts and ecosystem
  2. Study Rspack's architecture
  3. Understand compilation pipeline
  4. Practice writing plugins and loaders

For JavaScript Developers New to Rust

  1. Complete Rust fundamentals (ownership, borrowing)
  2. Learn async Rust and concurrency
  3. Study NAPI and Rust-JavaScript interop
  4. Practice reading and modifying Rust code

For New Contributors

  1. Set up development environment
  2. Run existing tests and understand structure
  3. Fix small bugs or add tests
  4. Gradually work on larger features

Skill Assessment

Beginner Level

  • Can read and understand Rust code
  • Can write basic TypeScript/JavaScript
  • Understands basic bundler concepts
  • Can run tests and debug issues

Intermediate Level

  • Can write Rust code following patterns
  • Can implement plugins or loaders
  • Understands compilation pipeline
  • Can debug complex issues

Advanced Level

  • Can design and implement new features
  • Understands performance implications
  • Can optimize hot paths
  • Can mentor other contributors

Resources

Official Documentation

External Resources

Community

Conclusion

Contributing to Rspack requires skills in Rust, JavaScript/TypeScript, build systems, and performance optimization. Start with areas most relevant to your contributions and gradually expand knowledge. The community is welcoming and supportive.