NetWasm 是一款独立的 .NET WebAssembly 编译器和运行时,可将 C# 代码直接编译为 WebAssembly。其最新版本 0.10.0 在相同工作负载下生成的 WASM 文件大小为 47.8 KB,相比 Rust 1.95.0 的 53.6 KB 减少了 10.9%;经过 Brotli-11 压缩后,体积优势扩大至 20.4%1。
0.10.0 版本进行了垃圾回收器的重构,对象不再需要携带收集器头部,从而实现了代码体积的显著优化1。该项目支持 C# 15、JavaScript 模块、Web Workers、WIT/WASI Preview 2、表达式树以及 HTTP/JSON/XML/Regex 等功能1。在授权方面,NetWasm 采用社区许可证模式,允许员工数量在 250 人以下或年收入少于 1000 万美元的组织免费使用,同时使用 Apache-2.0 和 MIT 许可证发布部分组件1。
NetWasm, an independent .NET WebAssembly compiler and runtime, has demonstrated superior code efficiency compared to Rust in a direct size comparison.1 Version 0.10.0 of NetWasm generates WebAssembly files that are 10.9% smaller than those produced by Rust 1.95.0 when compiling the same workload, producing 47.8 KB versus Rust's 53.6 KB respectively.1 The size advantage widens to 20.4% after Brotli compression at level 11.1
The latest release features a rebuilt garbage collector architecture in which objects no longer carry collector headers, contributing to the reduced binary footprint.1 NetWasm 0.10.0 supports C# 15, JavaScript modules, Web Workers, WIT/WASI Preview 2, expression trees, and built-in HTTP, JSON, XML, and regex functionality.1 The project is distributed under a community licensing model that provides free access to organizations with fewer than 250 employees or annual revenue below $10 million, while selected components are released under Apache-2.0 and MIT licenses.1
评论
还没有评论,欢迎留下第一条。