What does HackerNews think of swc?

Rust-based platform for the Web

Language: Rust

#2 in Babel
#4 in Compiler
#9 in JavaScript
#12 in Rust
#6 in TypeScript
It's pretty fast with modern tooling. Try vite or swc if you have the time and inclination. vite builds one of my large $DAYJOB projects in ~45 seconds (which is insane compared to how webpack performed).

If you don't need vite's extensibility, you can go with 'pure' esbuild and slim down transpilation + minification + bundling to only a few seconds.

https://vitejs.dev

https://github.com/swc-project/swc

https://github.com/evanw/esbuild

(Not OP) That repo looks like a proof-of-concept which is linked to from an open issue in https://github.com/swc-project/swc which is apparently a "super-fast TypeScript / JavaScript compiler".
Yeah I meant speed of execution. Sorry for the letdown! But https://github.com/swc-project/swc is a very fast Typescript compiler written in Rust :)
The creator of SWC [0] is working on a faster compiler alternative in Rust, so there is still hope for a faster compilation speed in the future

[0] https://github.com/swc-project/swc

esbuild is the current darling leading the pack, but there are also various other projects in the space (swc[0] is written in Rust, fjb[1] is written in C, bun[2] is written in zig, leveraging JavascriptCore's engine).

The most significant performance-oriented effort in this space still leveraging JS that I know of is kataw[3], and while that's quite fast compared to babel, it's still within an order of magnitude from babel. Kataw itself is a CST-based implementation that was created to outperform seafox (a AST-based parser by the same developer), which itself is an iteration over several other perf-oriented parser projects.

Babel gained popularity due to the crazy amount of churn in grammar over the past few years, but more and more I think the dust is settling, and flexibility is no longer the name of the game, making an AST-based implementation less appealing. The Rome team must be feeling the heat if the data structure design choices are being informed by performance. I highly doubt someone will be able to compete in performance using a JS implementation in today's landscape.

[0] https://github.com/swc-project/swc

[1] https://github.com/sebbekarlsson/fjb

[2] https://bun.sh/

[3] https://github.com/kataw/kataw

Slightly tangential, but I can't tell if I love or hate the logo for swc https://github.com/swc-project/swc

Either way, I want to try this next time I'm using TypeScript.

swc (https://github.com/swc-project/swc) is a rust equivalent to babel and has a bundler under development. Not sure how far along it is.

That would be an interesting comparison of performance and features.

I've never used it, but [1] claims to be a much faster js/typescript compiler than some of its competitors and written in Rust.

1. https://github.com/swc-project/swc

They are considering switching from tsc to a TypeScript compiler written in Rust[0][1], and `deno fmt` subcommand already uses it internally.

[0] https://github.com/denoland/deno/issues/5432 [1] https://github.com/swc-project/swc

I wonder how possible it would be to just use this:

https://github.com/swc-project/swc

It's still not feature-complete, but there aren't any alternatives written in Rust that I know of.

Rome seems fine but I find this approach to be a bit more interesting https://github.com/swc-project/swc — though Rome seems potentially broader in scope.
I believe something like this project is inevitable. You're probably thinking "Where's the Rust version of this?". I'll save you a roundtrip to Google that'll find you SWC. [1]

SWC is already more mature, at least more so than this project. Using rust does also seem to have some advantages compared to Go.

Still, nothing wrong with some competition, just think it'll be pretty hard to replace the entire ecosystem around Typescript/Babel/Webpack in one go. Not going to work for existing project - probably way too high of a risk for new ones, sadly.

[1] https://github.com/swc-project/swc

Check out this project that is an attempt to rewrite Babel in Rust. It includes a Webpack plugin and their benchmarks show a major speedup.

https://github.com/swc-project/swc