This project is still in a very early stage; please continue to use SWC.
This project is an experimental version of SWC. The primary modification, based on SWC, is the redesign of the AST data structure:
- It adopts a Flattening AST design, which allows for a higher performance.
- The AST structure (fields) of the SWC (experimental) remains largely consistent with that of SWC, making migration relatively straightforward.
See codspeed for comparison.
Local benchmark results with M3Pro:
- Parser: 1.2x-1.5x faster.
- Pre-order visit: No apparent difference.
- Post-order visit: Compared to legacy pre-order visitor, 20x faster.
There's a long way to go, but luckly it could be progressive.
- Flattening AST design
- Port SWC js parser.
- Port SWC jsx parser.
- Port SWC TypeScript parser.
- Port SWC minifier.
- Port SWC transformation.
See our docs
Thanks to:
- The zig compiler and the rowan, which inspire the flattening AST design.
- The oxc, which inspires the ast-tools design.
SWC (Experimental) is licensed under the Apache License, Version 2.0, which should be always same as SWC.
See the LICENSE file for more details.