PitchHut logo
Log in / Sign up
netpack
by surviving_blush_simone
Editor's pick
A .NET bundler that aims for performance parity with Rust and Go.
Pitch

Netpack is a web project bundler written in C#/.NET, designed to challenge traditional performance norms. By leveraging Ahead-of-Time (AoT) compilation, netpack delivers impressive startup times and efficient resource management while being fully integrated into the .NET ecosystem. Ideal for optimizing ASP.NET Core and Blazor applications.

Description

netpack is a web project bundler crafted using C# and .NET, designed to challenge the performance capabilities of existing tools written in languages such as Rust or Go. While it is currently in an experimental stage and not deemed production-ready, it offers unique insights into the potential of .NET tooling in the web development ecosystem.

Performance Insights

The primary focus of netpack is optimizing performance; the project leverages Ahead-of-Time (AoT) compilation to minimize runtime dependencies, providing startup speeds comparable to the best in class. Although netpack maintains a garbage collector, it significantly enhances startup time by eliminating Just-In-Time (JIT) compilation.

Benchmarks have demonstrated compelling performance metrics:

TestesbuildrspackVitenetpack
Small lib326ms611ms601ms359ms
Small project670ms912ms1658ms418ms
Medium project1931ms2877ms10601ms974ms
Large project2189ms2422ms13710ms1357ms

The performance benchmarks were conducted on Ubuntu 22.04 with standardized hardware setup, providing a fair comparison across different bundlers.

Target Audience

netpack aims to be a viable alternative for developers integrated within the .NET ecosystem, particularly those working on ASP.NET Core and Blazor applications. By utilizing .NET, developers can benefit from improved code readability and performance advantages over JavaScript-based tools.

Current Features

Although still evolving, netpack includes a range of features pertinent to modern web bundling:

  • JavaScript and JSX support
  • Image optimization via SkiaSharp
  • CSS handling
  • HTML and JSON processing
  • Minification of assets
  • DevServer functionality for file watching and reload
  • Bundle analysis support

Future enhancements may see the inclusion of TypeScript support, CSS modules, and hot module replacement (HMR) for a streamlined development workflow.

Conclusion

Developers interested in exploring an innovative approach to web bundling using C# and .NET can consider contributing to the netpack project to help evolve it into a production-ready tool. For those interested in supporting its development, opportunities for code contributions and sponsorship are welcomed.

0 comments

No comments yet.

Sign in to be the first to comment.