Show HN: Netpack – a bundler written in C#/.NET
github.comThis is a small experiment I've worked on during my winter vacation. I wanted to see if instead of using Rust / Go / Zig / whatever for development of web tools C#/.NET might be a viable alternative (esp. in terms of performance).
The answer is yes. Right now it's still feature incomplete (so generally I would not make this a too strong statement), but as of today it's faster than the tested competition (rspack, vite, esbuild).
Personally, I think that C#/.NET is much less complicated than Rust and more powerful than Go. It comes with some drawbacks as well - not gonna lie.
The main reason why C#/.NET can be viable in that space is AoT. Without AoT the startup performance (as well as runtime requirements) is killing the whole idea.
AoT, on the other hand, comes with some challenges. Some libraries cannot be used or require some work to be integrated. Hence, some of the flexibility of .NET cannot be used.
Very nice and clean implementation, awesome work!
(obviously can be further optimized but hey it already beats the alternatives)
Thanks!
Yes indeed - it can be optimized further, but it will also loose some perf. when things such as sourcemaps or tree shaking are introduced. Right now I am positive that in total it should be around the same as of now due to the potential optimizations (e.g., streaming in the JS AST generation).