Rust-based platform for the Web
Go to file
강동윤 9a5de4beb6
More transcompilers (#49)
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
2018-11-14 19:40:46 +09:00
.cargo chores: cleanup for docs; no email from travis 2018-01-27 15:14:53 +09:00
.vscode Initial release (#45) 2018-11-10 17:44:35 +09:00
atoms More transcompilers (#49) 2018-11-14 19:40:46 +09:00
common Initial release (#45) 2018-11-10 17:44:35 +09:00
ecmascript More transcompilers (#49) 2018-11-14 19:40:46 +09:00
macros Initial release (#45) 2018-11-10 17:44:35 +09:00
scripts ECMAScript parser (#1) 2018-01-12 16:53:06 +09:00
src More transcompilers (#49) 2018-11-14 19:40:46 +09:00
testing Initial release (#45) 2018-11-10 17:44:35 +09:00
.gitignore More transcompilers (#49) 2018-11-14 19:40:46 +09:00
.gitmodules ECMAScript parser (#1) 2018-01-12 16:53:06 +09:00
.rustfmt.toml Ecmascript codegen (#40) 2018-10-25 13:17:05 +09:00
.travis.yml Documentation (#48) 2018-11-10 19:00:26 +09:00
bors.toml Add bors to prevent misktake. 2018-01-14 14:44:32 +09:00
Cargo.toml Initial release (#45) 2018-11-10 17:44:35 +09:00
LICENSE-APACHE initial commit 2017-12-22 22:07:03 +09:00
LICENSE-MIT initial commit 2017-12-22 22:07:03 +09:00
README.md Documentation (#48) 2018-11-10 19:00:26 +09:00
rust-toolchain Ecmascript codegen (#40) 2018-10-25 13:17:05 +09:00

spdy web compiler

Build Status codecov


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));