SWC
Rust-based platform for the Web
SWC is an extensible Rust-based platform for the next generation of fast developer tools. It’s used by tools like Next.js, Parcel, and Deno, as well as companies like Vercel, ByteDance, Tencent, Shopify, Trip.com, andmore.
SWC can be used for both compilation and bundling. For compilation, it takes JavaScript / TypeScript files using modern JavaScript features and outputs valid code that is supported by all major browsers.
SWC is20x faster than Babel on a single thread and70x faster on four cores.
Overview
SWC can be downloaded and used as a pre-built binary, or built from source. Currently, the following binaries are provided:
- Mac (Apple Silicon)
- Mac (x64)
- Linux (x86_64)
- Linux (aarch64)
- Linux (armv7)
- Alpine Linux (also install
@swc/core-linux-musl) - Android (aarch64)
- Windows (win32-x64)
- Windows (ia32)
Download prebuilt binaries
pnpm
pnpm add -D @swc/cli @swc/corenpm
npm i -D @swc/cli @swc/coreyarn
yarn add -D @swc/cli @swc/coreTranspile JavaScript file and emit to stdout
npx swc ./file.jsFeatures
SWC is designed to be extensible. Currently, there is support for:
- Compilation
- Minification
- Transforming with WebAssembly
- Usage inside webpack and Rspack (
swc-loader) - Improving Jest performance (
@swc/jest) - Custom Plugins
Community
SWC is created bykdy1 .Follow@kdy1dev on Twitter for future project updates.
Feel free to join thediscussions on GitHub !