# Extension points — web-infra-dev/rspack

> Canonical page: https://codevetter.com/unpack/rspack/extension-points

# Extension points — web-infra-dev/rspack

Scanned commit 179a0934f3091463419827fc2767af07b2fd38ed (2026-10-01). Generated by codevetter codevetter 1.15.0 on 2026-10-02.

Source inspection; upstream code and tests were not executed.

Rspack offers extension seams at the CLI, configuration, compiler hooks, native plugins, module-type parsing, loaders, filesystems, and cache services. JavaScript and Rust plugin models meet through staged hook registrations. New behavior should attach to the owning lifecycle rather than bypass its boundaries. The inspected factories and registries make these integration points concrete.
- New CLI commands implement apply(cli) and join RspackCLI.registerCommands' builtin command list; asynchronous actions use wrapAction so run can await their failures. — [packages/rspack-cli/src/cli.ts#L83-92](https://github.com/web-infra-dev/rspack/blob/179a0934f3091463419827fc2767af07b2fd38ed/packages/rspack-cli/src/cli.ts#L83-L92) [packages/rspack-cli/src/cli.ts#L193-201](https://github.com/web-infra-dev/rspack/blob/179a0934f3091463419827fc2767af07b2fd38ed/packages/rspack-cli/src/cli.ts#L193-L201) [packages/rspack-cli/src/commands/build.ts#L120-137](https://github.com/web-infra-dev/rspack/blob/179a0934f3091463419827fc2767af07b2fd38ed/packages/rspack-cli/src/commands/build.ts#L120-L137)
- Configuration accepts function plugins called with the compiler as receiver and argument, or object plugins with apply(compiler); definePlugin provides typed identity helpers for both shapes. — [packages/rspack/src/rspack.ts#L68-75](https://github.com/web-infra-dev/rspack/blob/179a0934f3091463419827fc2767af07b2fd38ed/packages/rspack/src/rspack.ts#L68-L75) [packages/rspack-cli/src/cli.ts#L430-438](https://github.com/web-infra-dev/rspack/blob/179a0934f3091463419827fc2767af07b2fd38ed/packages/rspack-cli/src/cli.ts#L430-L438)
- Rust plugins implement Plugin: Debug + Send + Sync with apply(ApplyContext), name, and clear_cache; PluginExt boxes implementations into BoxPlugin. — [crates/rspack_core/src/plugin/mod.rs#L12-33](https://github.com/web-infra-dev/rspack/blob/179a0934f3091463419827fc2767af07b2fd38ed/crates/rspack_core/src/plugin/mod.rs#L12-L33)
- PluginDriver supplies ApplyContext with compiler/compilation/factory hooks and a ModuleType-keyed parser-and-generator builder registry. — [crates/rspack_core/src/plugin/plugin_driver.rs#L14-28](https://github.com/web-infra-dev/rspack/blob/179a0934f3091463419827fc2767af07b2fd38ed/crates/rspack_core/src/plugin/plugin_driver.rs#L14-L28) [crates/rspack_core/src/plugin/plugin_driver.rs#L37-58](https://github.com/web-infra-dev/rspack/blob/179a0934f3091463419827fc2767af07b2fd38ed/crates/rspack_core/src/plugin/plugin_driver.rs#L37-L58)
- PassExt supports run_pass, cache-aware execution, incremental artifact groups, before/after cache hooks, and is_enabled, allowing conditional compilation transformations within the shared runner. — [crates/rspack_core/src/compilation/pass.rs#L15-52](https://github.com/web-infra-dev/rspack/blob/179a0934f3091463419827fc2767af07b2fd38ed/crates/rspack_core/src/compilation/pass.rs#L15-L52)
- CompilerBuilder accepts extra plugins and independent readable, intermediate, and writable filesystem implementations; build combines configured builtin plugins with supplied plugins. — [crates/rspack/src/builder/mod.rs#L417-456](https://github.com/web-infra-dev/rspack/blob/179a0934f3091463419827fc2767af07b2fd38ed/crates/rspack/src/builder/mod.rs#L417-L456)
- JavaScript hook bridging partitions taps by stage ranges, skips unused hooks, and updates non-skippable registration kinds when hook usage changes. — [packages/rspack/src/Compiler.ts#L1064-1079](https://github.com/web-infra-dev/rspack/blob/179a0934f3091463419827fc2767af07b2fd38ed/packages/rspack/src/Compiler.ts#L1064-L1079) [packages/rspack/src/Compiler.ts#L1105-1137](https://github.com/web-infra-dev/rspack/blob/179a0934f3091463419827fc2767af07b2fd38ed/packages/rspack/src/Compiler.ts#L1105-L1137)
- Compiler.get_cache exposes namespaced CacheFacade views, while HttpUriPlugin accepts a custom httpClient and configurable filesystem-backed remote cache/lockfile locations. — [crates/rspack_core/src/compiler/mod.rs#L211-212](https://github.com/web-infra-dev/rspack/blob/179a0934f3091463419827fc2767af07b2fd38ed/crates/rspack_core/src/compiler/mod.rs#L211-L212) [crates/rspack_core/src/new_cache/cache.rs#L165-168](https://github.com/web-infra-dev/rspack/blob/179a0934f3091463419827fc2767af07b2fd38ed/crates/rspack_core/src/new_cache/cache.rs#L165-L168) [packages/rspack/src/builtin-plugin/HttpUriPlugin.ts#L21-45](https://github.com/web-infra-dev/rspack/blob/179a0934f3091463419827fc2767af07b2fd38ed/packages/rspack/src/builtin-plugin/HttpUriPlugin.ts#L21-L45) [crates/rspack_plugin_schemes/src/http_uri/mod.rs#L104-110](https://github.com/web-infra-dev/rspack/blob/179a0934f3091463419827fc2767af07b2fd38ed/crates/rspack_plugin_schemes/src/http_uri/mod.rs#L104-L110)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
