iTranslated by AI
Rust-based JavaScript Tools 2023: Non-essential Trivia
I will briefly introduce some Rust-based frontend-related tools I found while browsing the web.
This is some trivia I planned to publish in 2023. I'm releasing it now because I lost interest in writing it. The content might be a bit outdated.
CSS
servo/rust-cssparser
A CSS parser written in Rust. It is mainly used in servo, a browser engine written in Rust.
lightningcss
It serves as not only a parser but also a minifier and transformer. A project under the Parcel umbrella.
As announced by Lee Robinson, VPoE at Vercel, Next.js is migrating from swc_css to lightningcss.
Also, though not mentioned above, the CSS-related parts of swc plugins might all move to lightningcss as well.
The parser used inside Next.js was swc_css. However, the original main maintainer, Alexander Akait, has already left Vercel, and they seem to have judged that future maintenance would be difficult. Going forward, in addition to Next.js, swc plugins and Turbopack will likely be ported to lightningcss.
railwind
Believe it or not, a Rust version of the Tailwind CSS compiler! It is not currently being updated much.
Transpiler
swc
The well-known Rust-based Parser, Transpiler, and Minifier. Actually, there was a bundling feature called swcpack a while ago, but it is no longer being developed (as Turbopack exists).
Bundler
rspack
A tool developed mainly by ByteDance's Web Infra team, aiming to be a drop-in replacement for webpack.
turbopack
The successor tool to webpack, being developed at Vercel by Tobias Koppers, the creator of webpack.
rolldown
A Rust version of rollup. If I recall correctly, when rspack was released, it was called rolldown_legacy and served as a PoC for rspack.
It became open source in March 2024.
farm
A Rust version of Vite. Since it's vite-compatible, it seems plugins and such can be used as they are. Refer to the documentation for differences from Vite and development motivations.
mako
A bundling tool reportedly being developed internally at Alipay. The repository is not public.
Formatter
dprint
The core of deno fmt. It is used in the repositories for TypeScript and DefinitelyTyped.
biome
Currently, it features a Formatter and Linter for JavaScript and TypeScript. Recently, it also became capable of formatting and linting within script tags for Vue, Svelte, and Astro. Support for CSS is currently in progress.
An attempt is being made to use it in the Node.js repository.
Linter
rslint
Currently not under active development. Biome uses some of its implementation as a reference.
deno_lint
The core of deno lint.
Oxc
Formerly a hobby project by Boshen. Currently, the Parser, Linter, and Resolver are under development.
Package manager
pacquet
An experimental Rust-based package manager being developed under the pnpm umbrella.
volt
Another Rust-based package manager. Development has currently stopped.
Type Checker
ezno
A TypeScript type checker written in Rust. However, it does not aim for full tsc compatibility (e.g., handling of any is different). Currently, it can also be used experimentally through Oxc.
stc
A project aiming for full tsc compatibility. Development has stopped because the author is busy.
Bonus
TypeRunner
This is a TypeScript type checker written in C++, not Rust. Its approach is different: TypeRunner converts TypeScript into bytecode and performs type checking on a VM. Unfortunately, it has not been updated for about two years.
tyvm
An experimental project focused exclusively on type-level TypeScript. It seems to use a compiler written in Rust to convert code into bytecode and execute it on a VM written in Zig.
Discussion