SWC

Rust-based JavaScript/TypeScript compiler, a drop-in super-fast alternative to Babel

Tool
npm
v1.16.1
34,179stars
Apache License 2.0

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
90/100Excellent
Development Activity100
Maintenance96
Community64
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
87/100Excellent
Architecture93
Code Quality92
Innovation92
Learning Curve70

SWC (Speedy Web Compiler) is a Rust-based platform for compiling, bundling, and minifying JavaScript and TypeScript. @swc/core is its Node.js binding — a native addon (via NAPI-RS, distributed as prebuilt binaries per platform) that exposes SWC’s Rust compiler pipeline to JavaScript build tools, offering transform and minify performance many times faster than Babel or Terser on equivalent workloads.

SWC underpins the compilation and minification steps of several major JavaScript toolchains, including Next.js and the Vite/Rollup ecosystem via plugins, and is designed as a near drop-in replacement for Babel’s transform API. Beyond @swc/core, the monorepo also produces @swc/helpers (runtime helpers injected by transformed output), WASM bindings for browser/edge use, and a large family of Rust crates (swc_ecma_parser, swc_ecma_ast, swc_common, etc.) that implement the parser, AST, and codegen independently of any JS binding.

What You Get

  • A near drop-in replacement for Babel’s transform/transformSync API, backed by a Rust compiler instead of a JS one
  • Prebuilt native bindings (via NAPI-RS) for major platforms, so no local Rust toolchain is needed to install @swc/core
  • TypeScript, JSX, and modern ECMAScript syntax support with configurable target/preset-env-style downleveling
  • A JavaScript/TypeScript minifier as an alternative to Terser, exposed via @swc/core’s minify API
  • Companion packages (@swc/helpers, @swc/wasm-web) and a family of reusable Rust crates (swc_ecma_parser, swc_ecma_ast, swc_common) for embedding SWC’s compiler pieces directly in other Rust tooling

Common Use Cases

  • Replacing Babel in a build pipeline (webpack, Jest via @swc/jest, or a custom bundler) to cut transform time on large codebases
  • Powering framework-level compilation, as Next.js does internally for its build and dev-server transforms
  • Minifying production JavaScript bundles as a faster alternative to Terser
  • Building custom Rust-based JS/TS tooling (linters, formatters, bundlers) on top of the underlying swc_ecma_* and swc_common crates

Under The Hood

Architecture - The monorepo separates concerns cleanly across crates/ (pure Rust) and bindings//packages/ (language bindings). Core compiler logic lives in crates like swc_ecma_parser (tokenizer + parser), swc_ecma_ast (AST node definitions), swc_ecma_codegen (code generation), and swc_common (shared spans, source maps, error diagnostics) — each independently versioned and publishable to crates.io. swc_compiler_base and the top-level swc crate assemble these into a full compile pipeline (parse -> transform -> codegen), while bindings/binding_core_node wraps that pipeline via NAPI-RS to produce the @swc/core native addon, and bindings/binding_core_wasm produces the WASM build for browser/edge targets. CSS support follows the same pattern with a parallel swc_css_* crate family (parser, codegen, minifier, prefixer).

Tech Stack - Almost entirely Rust (97.5% of the codebase), using NAPI-RS for Node.js native bindings and wasm-bindgen-style tooling for WASM builds. The JS-facing packages/core publishes prebuilt binaries for a long list of platform/arch/libc targets (x86_64/aarch64 across Darwin, Windows MSVC, Linux gnu/musl, even PowerPC64LE and s390x), avoiding any local Rust compilation for consumers. The repo uses Cargo workspaces (crates/), a xtask crate for repo automation, and .changeset for JS package release management alongside Rust’s own crate versioning.

Code Quality - The crate suite has 1,407 Rust source files with 218 dedicated test files (plus extensive fixture-based snapshot testing common in compiler projects, which isn’t fully captured by a raw test-file count). Splitting the parser, AST, and codegen into separate crates keeps each concern testable in isolation, and the swc_ecma_compat_* family (es2015, es2016, …) isolates each ECMAScript-version downleveling transform into its own crate rather than one monolithic transform module.

API Design - @swc/core’s JS API deliberately mirrors Babel’s shape (transform, transformSync, parse, minify) to minimize migration friction for tools already built against Babel’s interface, while configuration is expressed through a .swcrc/options object that maps closely to Babel’s .babelrc mental model. The underlying Rust crates expose a lower-level, more idiomatic Rust API (visitor patterns via swc_ecma_visit) for embedding the compiler directly in other Rust programs, trading some ergonomics for full control over the compilation pipeline.

Used by 51 apps in this directory

TypeScript
88%
Other

AFFiNE

Productivity · Project Management · Note Taking

71,668

Write, draw, and plan in one infinite canvas — the open-source alternative to Notion and Miro that keeps your data yours.

View details
91
Repo Health
87
Technical
68
Dependency
Built with
TypeScript88%
Updated today
TypeScript
72%
AGPL 3.0

APITable

Low Code Platforms · Databases

15,526

API-first collaborative spreadsheet-database platform that auto-generates REST APIs and lets teams build internal tools, CRMs, and dashboards without code.

View details
53
Repo Health
77
Technical
60
Dependency
Built with
TypeScript72%
Java22%
Updated 9 months ago
TypeScript
96%
Other

Amplication

Developer Tools · AI Code Assistants · Automation

16,010

Create production-ready backend services with your organization's standards baked in — generating NestJS, Prisma, and GraphQL code that you own and control.

View details
61
Repo Health
84
Technical
60
Dependency
Built with
TypeScript96%
Updated 1 months ago
Python
54%
Other

authentik

Authentication · Security

24,980

The self-hosted Identity Provider that replaces Okta, Auth0, and Entra ID with a unified SSO platform supporting SAML, OAuth2/OIDC, LDAP, RADIUS, and WebAuthn.

View details
92
Repo Health
81
Technical
68
Dependency
Built with
Python54%
TypeScript33%
Updated today
TypeScript
69%
Other

Budibase

Low Code Platforms · No Code Platforms

28,220

Build AI agents, automations, and internal apps on a single open-source platform with full self-hosting control.

View details
92
Repo Health
81
Technical
63
Dependency
Built with
TypeScript69%
Svelte26%
Updated today
Rust
67%
MIT

Bun

Developer Tools

95,452

An all-in-one JavaScript and TypeScript toolkit — one Rust-and-JavaScriptCore binary that replaces Node.js, npm, a bundler, and a test runner with faster equivalents.

View details
92
Repo Health
91
Technical
66
Dependency
Built with
Rust67%
C++19%
Updated today
TypeScript
99%
AGPL 3.0

Cherry Studio

AI Assistants

50,753

All-in-one AI desktop client with 300+ assistants and multi-model support

View details
88
Repo Health
84
Technical
71
Dependency
Built with
TypeScript99%
Updated today
TypeScript
84%
Apache 2.0

Continue

Developer Tools · AI Development · AI Code Assistants

35,532

Open-source coding agent for VS Code, JetBrains, and CLI with support for 30+ LLM providers.

View details
87
Repo Health
88
Technical
65
Dependency
Built with
TypeScript84%
Updated today
TypeScript
45%
Other

Convex Backend

Developer Tools · Databases

12,394

Open-source reactive database that lets developers build live-updating apps with pure TypeScript, strong consistency, and real-time subscriptions—no separate API layer required.

View details
88
Repo Health
82
Technical
70
Dependency
Built with
TypeScript45%
Rust43%
Updated today

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search