mirror of
https://github.com/swc-project/swc.git
synced 2024-11-23 09:38:16 +03:00
Rust-based platform for the Web
babelcompilerecmascriptecmascript-parserjavascriptparserruststarred-repostarred-swc-project-reposwctypescripttypescript-compilertypescript-parser
9a5de4beb6
transforms: - implement String.length simplifier - implement more arithmetic operations - new Date() is side-effect free - implement left.rhs * right - optimize `SeqExpr` while creation - implement es3 - member expression literals pass - implement es2015 - classes pass codegen: - handle infinity correctly - disable comments for testing (it's buggy) ast: - add methods about reserved words |
||
---|---|---|
.cargo | ||
.vscode | ||
atoms | ||
common | ||
ecmascript | ||
macros | ||
scripts | ||
src | ||
testing | ||
.gitignore | ||
.gitmodules | ||
.rustfmt.toml | ||
.travis.yml | ||
bors.toml | ||
Cargo.toml | ||
LICENSE-APACHE | ||
LICENSE-MIT | ||
README.md | ||
rust-toolchain |
spdy web compiler
Make the web (development) faster.
swc is rust port of babel and closure compiler.
Installation
Requires nightly version of rust.
cargo install --git https://github.com/swc-project/swc.git
Usage
test.js
:
8 + 8;
use(8 + 8, 8 ** 8);
Example
swc jsc test.js
Output
8 + 8;
use(8 + 8, Math.pow(8, 8));
Example
swc jsc --optimize test.js
Output
use(8 + 8, Math.pow(8, 8));