Settings

Theme

Rspack: A fast Rust-based web bundler

github.com

74 points by DesertVarnish 3 years ago · 10 comments

Reader

rk06 3 years ago

From their intro [0]: We created Rspack to solve various performance problems we encountered while maintaining building tools at ByteDance. There were no tools in the market that could solve these problems well. We have a large number of monolithic applications within the company, all of which have very complex webpack configurations.

This makes rspack looks like a competitor to Turbopack which is marketed as webpack's successor.

[0] https://www.rspack.dev/guide/introduction.html

  • likeabbas 3 years ago

    ByteDance seems to be putting out a lot of open source Rust libraries (e.g. Monoio). How widely used is Rust within the company?

rob74 3 years ago

I wonder how this compares (performance and feature-wise) to esbuild (https://github.com/evanw/esbuild), which is also a bundler written in a compiled language (Go)? esbuild claims to be 10-100x faster than JS-based builders, while Rspack doesn't provide any concrete numbers (at least I didn't find any)...

  • iudqnolq 3 years ago

    This is a big difference though

    > Rspack is compatible with webpack's configuration schema and loader architecture. You can seamlessly use familiar loaders such as babel-loader, less-loader, sass-loader, etc. Our long-term goal is to fully support most popular loaders including more complex cases such as vue-loader.

  • ScriptedAlchemy 3 years ago

    This depends of how many js hooks are used and how efficient they are. Large builds with many plugins / loaders have a parallelism bottleneck with native moving data back to JS.

    The slower end, I’ve seen at least 5x improvement. Upper end, I’ve seen 30x. for a optimized prod build.

    The project is quite new & fine tuning as it matures will most likely achieve further speed gains. The big benefit is you have a webpack level api & existing ecosystem support. Many current tools offer you speed in trade for api surface.

    Smaller api & JS hooks, more speed. I’m not sure what the diff between them is. But a 20k cold dev build takes about 2 seconds. No incremental or lazy compilation is built in, in the initial release.

    Rspack offers enormous real world build gains against webpack, while preserving its ecosystem which is a very welcome balance in speed vs power. As a big user & writer of custom plugins or complex builds, I’m not necessarily looking for the absolute fastest build. If a 40 second build takes 2, and esbuild takes 1 - its a negligible difference that I’d be happy to accept for a robust api.

    At 50k modules, if a prod build taking ~15 seconds seems plenty fast - those represent some of the largest codebases.

  • norman784 3 years ago

    > We have already used Rspack in internal projects and achieved a 5-10 times improvement in compilation performance.

    Per their intro[0] page, I would recommend to read the entire intro page, it give some thought and brief comparison between webpack, vite, esbuild and turbopack.

    [0] https://www.rspack.dev/guide/introduction.html#current-statu...

fitlog 3 years ago

If I were the author, I would consider renaming this, as "spack" (from the etymology "spastic" -> "spacker") is an offensive term for someone with cerebral palsy, in British English.

password4321 3 years ago

I feel like this deserves a shot at the 2nd chance queue even though it's a corporate project. Slipping under the radar on HN!

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection