C# now beats Rust on WASM size
Repository · https://github.com/zion-sati/netwasm
First seen by Oriel on .
AI summary
NetWasm is an independent .NET compiler, runtime, CoreLib, and SDK that compiles C# and .NET CIL into standalone WebAssembly, targeting a much smaller deployment than conventional .NET Wasm.
- For a print-42 workload, NetWasm 0.8.0 produces a 47,798-byte WASI Preview 2 Component, 10.9% smaller raw than the matched Rust 1.95.0 artifact; these results are workload-specific.
- NetWasm 0.10.0 reports lower median times than Mono AOT across three allocation and garbage-collection benchmarks, measured over 15 runs on an Apple M1 Max under Wasmtime 49.0.3.
- It compiles reachable code, specializes generics, and links only needed runtime support; Compact is the default precise, non-moving mark-and-sweep collector, with NetWasmGC and Bump available as alternatives.
- The profile supports ordinary dotnet workflows, browser JavaScript modules, WIT/WASI P2, and selected libraries, but excludes runtime reflection, dynamic assembly loading, managed threading, raw sockets, and general file APIs.
- NetWasm is pre-1.0, and its target-profile and ABI contracts may change; a compatible WebAssembly host is still required to run published components.
#webassembly #dotnet #wasi #garbage collection
Generated by gpt-5.6-sol. Check the original for details.
Metric trends
Last 30 days · Up to 120 recorded samples per source and metric, with reposts kept separate · First and latest retained
Points
Score reported by the source.
- Hacker News: 152, latest observation ; +149 over observed period since
Comments
Comment count reported by the source.
- Hacker News: 92, latest observation ; +91 over observed period since
Aliases
| Source | External ID | URL |
|---|---|---|
| Hacker News | 50175510 | https://github.com/zion-sati/NetWasm Read discussion |