SWC compiles modern JavaScript and TypeScript to browser-compatible output. It ships as npm binaries, a CLI, and Rust libraries used by bundlers and frameworks.
Overview
SWC, short for Speedy Web Compiler, is implemented in Rust and serves both as a low-level compiler crate ecosystem and as the JavaScript tooling many teams install via npm. It parses, transforms, and emits code that preserves semantics while targeting widely supported browser syntax from contemporary source features.
Downstream tools such as Next.js, Parcel, and Deno integrate SWC for compilation and bundling tasks. JavaScript consumers typically add CLI and core packages, then transpile files—for example piping output to stdout from a single entry script. Native addons ship as prebuilt binaries for major desktop and mobile CPU targets, with self-loading compressed carriers on supported platforms.
Capabilities include compilation, minification, WebAssembly-powered transforms, webpack and Rspack loader integration, Jest acceleration through a dedicated preset, and a plugin interface for custom transforms. Rust developers can depend on published crates with coordinated versioning policies.
Public benchmarks compare throughput with other transpilers, and material covers installation, configuration, and feature matrices.
Key features
- TypeScript and JavaScript transpilation
- Code minification support
- npm CLI and prebuilt native binaries
- Webpack and Rspack loader integrations
- Jest transform preset for faster tests
- WebAssembly-powered transform paths
- Rust crate APIs for custom tooling
- Extensible custom plugin system
Use cases
- Speeding up frontend production builds
- Replacing slower transpilers in toolchains
- Embedding compilation inside Rust services
- Accelerating Jest test compilation
- Authoring custom syntax transforms