swc README

The project's README from github.com/swc-project/swc. As one markdown file: README.md.

swc

Make the web (development) faster.

downloads (@swc/core) downloads (3rd party)

undefined GitHub release (latest SemVer)

GitHub code size in bytes node-current (scoped)

Discord

SWC (stands for Speedy Web Compiler) is a super-fast TypeScript / JavaScript compiler written in Rust. It's a library for Rust and JavaScript at the same time. If you are using SWC from Rust, see rustdoc and for most users, your entry point for using the library will be parser.

Also, SWC tries to ensure that

If you select the latest version of each crates, it will work

for rust users.

MSRV of crates is currently 1.73.

To update all SWC crates you use, you can run curl https://raw.githubusercontent.com/swc-project/swc/main/scripts/update-all-swc-crates.sh | bash -s. This script will update all dependencies to the latest version and run cargo build to ensure that everything works. Note that you need

command to run the script.

Supported Node Versions:


If you are using SWC from JavaScript, please refer to docs on the website.

Documentation

Check out the documentation in the website.

Features

Please see comparison with babel.

Performance

Please see benchmark results on the website.

Supporting development

Supporting swc

Star History

Star History Chart

Powered by

JetBrains logo.

Sponsors

Sponsors

SWC is a community-driven project, and is maintained by a group of volunteers. If you'd like to help support the future of the project, please consider:

Contributing

See CONTRIBUTING.md. You may also find the architecture documentation useful (ARCHITECTURE.md).

License

SWC is primarily distributed under the terms of the Apache License (Version 2.0).

See LICENSE for details.

swc (swc-project/swc)

Searching Database…

34.2K ·GitHub
What is this?SWC (Speedy Web Compiler) is a super-fast TypeScript/JavaScript compiler written in Rust — a Rust-based platform for the Web.
Is this a tool I run, or a library I code against?Both, actually: the README describes it as a library for Rust and JavaScript at the same time — Rust crates on one side, JavaScript usage on the other.
How do I pull it into a Rust or JavaScript project?It depends on the language: from Rust, the docs are in rustdoc and the parser crate is the usual entry point; from JavaScript, follow the usage docs on the website.
Which Rust and Node versions do I need?The SWC crates currently require Rust 1.73 or newer (that's the MSRV). On the Node side, v10+ is supported for usage and v20+ for development.
Will it run on Windows as well as macOS and Linux?Yes — the repo is tagged for Linux, macOS and Windows, so all three major desktop platforms are covered.
Can I use it in commercial projects?Yes — SWC is primarily distributed under the Apache License, Version 2.0, so commercial use is fine.
How is it different from Babel?The README doesn't list the differences inline; it points to a dedicated comparison-with-Babel page and to benchmark results on the website. The core pitch is speed — a TS/JS compiler written in Rust.
How do I keep my SWC crates up to date?Run the provided one-liner (curl | bash -s): it updates every SWC crate you use to the latest version and runs cargo build to make sure everything still works. You need jq and the cargo upgrade command installed first.
Is this an established project or an early experiment?Established: development started in December 2017, the repo has about 34k GitHub stars, and the project is community-driven with sponsors backing it.
What are similar projects?oxc, babel, closure-compiler, rspack, esbuild, less.js, marked, gopherjs
Size
456.6 MB
Stars
34.2K
Age
8y
Commits · 90 Days