Skip to content

Releases: zion-sati/NetWasm

NetWasm 0.7.1: Browser Project Compilation and Linking

Choose a tag to compare

@zion-sati zion-sati released this 06 Oct 09:48
88853aa

Browser project compilation and linking

NetWasm 0.7.1 adds browser-hosted compiler APIs for assembling complete projects in memory:

  • plan raw core-module linking without filesystem intermediates;
  • identify the native archive providers required by reachable LibraryImport calls;
  • generate JavaScript bindings from inspected raw-module signatures; and
  • report temporary runtime exports so hosts can prune them after linking.

These APIs support browser tools that compile multi-file C# projects, link native .a libraries, and publish JSExport Web Worker applications. They are general compiler and runtime planning surfaces rather than UI-specific hooks.

Application output remains pay-as-you-use: host-side planning does not add unused browser compiler features or native libraries to generated applications.

NetWasm 0.7.1-preview.1: Browser project compilation and linking

Choose a tag to compare

@zion-sati zion-sati released this 06 Oct 09:27
88853aa

Browser project compilation and linking

NetWasm 0.7.1 adds browser-hosted compiler APIs for assembling complete projects in memory:

  • plan raw core-module linking without filesystem intermediates;
  • identify the native archive providers required by reachable LibraryImport calls;
  • generate JavaScript bindings from inspected raw-module signatures; and
  • report temporary runtime exports so hosts can prune them after linking.

These APIs support browser tools that compile multi-file C# projects, link native .a libraries, and publish JSExport Web Worker applications. They are general compiler and runtime planning surfaces rather than UI-specific hooks.

Application output remains pay-as-you-use: host-side planning does not add unused browser compiler features or native libraries to generated applications.

NetWasm 0.7.0

Choose a tag to compare

@zion-sati zion-sati released this 06 Oct 02:30
8f693cb

Compact is the default garbage collector

NetWasm 0.7.0 selects Compact for wasm32 and wasm64 applications. It is a
size-first, precise, non-moving mark-and-sweep collector with support for the
managed lifetime features in NetWasm's profile: finalizers, resurrection, weak
references, dependent handles and pinning.

Boehm remains available for workloads that benefit from its allocation paths:

<PropertyGroup>
  <NetWasmGarbageCollector>Boehm</NetWasmGarbageCollector>
</PropertyGroup>

Class libraries remain collector-neutral. Collector selection is a build-time
application choice, not a runtime switch or a global.json setting.

See Choosing a garbage collector
for the tradeoffs and supported controls. The smaller default does not change
NetWasm's documented platform boundaries.

Runtime packs ship prebuilt, optimized native archives for both Debug and Release
C# application builds. GC_DONT_GC requires a diagnostic-enabled Boehm native
runtime; dotnet build -c Debug does not enable that hook.

The qualified Release Console.WriteLine(42) component is 55,825 bytes
with Compact, compared with 84,653 bytes when selecting Boehm. These are
uncompressed complete Wasm components, including the runtime and collector,
not isolated GC sizes or complete browser downloads. See the
measurement methodology.

NetWasm 0.7.0-preview.1: Compact GC

Pre-release

Choose a tag to compare

@zion-sati zion-sati released this 06 Oct 00:50
8f693cb

Compact garbage collection

Compact is now the default precise, non-moving garbage collector for wasm32 and
wasm64 applications. Boehm remains available by setting
<NetWasmGarbageCollector>Boehm</NetWasmGarbageCollector> in the executable
project. Class libraries remain collector-neutral.

Compact retains the supported managed lifetime features, including finalizers,
resurrection, weak references, dependent handles and pinning. Its name refers to
implementation size, not moving heap compaction.

Read the developer guide
for collector tradeoffs, selection and diagnostics.

Runtime packs ship prebuilt, optimized native archives for both Debug and Release
C# application builds. GC_DONT_GC requires a diagnostic-enabled Boehm native
runtime; dotnet build -c Debug does not enable that hook.

This preview qualifies the 0.7.0 release train. Stable packages are promoted from
the retained, qualified candidate.

NetWasm 0.6.0: C# Web Workers, Wasm Interop and Library Improvements

Choose a tag to compare

@zion-sati zion-sati released this 04 Oct 17:28
1f68040

NetWasm 0.6.0 adds three major capabilities: C# Web Workers, broader Wasm interop, and the compiler and library support needed by real package workloads. It preserves closed-world, pay-as-you-use output.

Highlights

  • C# Web Workers: publish either a portable WIT worker or a direct JSExport worker from the netwasm-app template. The SDK generates the JavaScript client, worker bootstrap, deployment manifest, lifecycle handling, notifications, and managed failure propagation. See the C# Web Workers guide.
  • Wasm interop: bundle application-owned JavaScript imports, expose managed JSExport entry points, define language-neutral WIT worker contracts, and link supported native C APIs from Wasm .a archives.
  • Library improvements: bounded user-defined attribute queries and expression trees unlock validation-library patterns; CBOR date/time and exception-region fixes support System.Formats.Cbor; secure randomness, Interlocked, type metadata, enum, delegate, and compatibility APIs broaden the usable package surface.

New compiler and CoreLib capabilities

  • Added bounded custom-attribute queries for framework and user-defined attributes, including DescriptionAttribute, closed generic query sites, inheritance rules, constructor and named-argument materialization, and the FluentValidation FlagsAttribute pattern. Runtime-selected targets and filters remain diagnosed instead of silently returning incomplete results. #61
  • Added the bounded expression-tree execution profile used by validation libraries, including Expression.Equal, property access, calls, construction, invocation, conversions, and interpreted lambdas. #65
  • Added bounded UnsafeAccessor support for generated constructor, method, and field accessors. #42
  • Added the public System.Security.Cryptography.RandomNumberGenerator surface backed by host-provided secure entropy. #50
  • Completed the portable Interlocked operation family for NetWasm's single-reactor execution model, preserving ordinary .NET return values and edge cases without claiming shared-memory threading. #67
  • Expanded static native C interop for linked Wasm archives, including supported scalar, pointer, by-reference, struct, union, counted-array, UTF-8, SafeHandle, and callback shapes.

Browser hosting and application templates

  • Applications can declare page-owned JavaScript import modules with NetWasmWorkerJavaScriptModule; the SDK bundles them into the generated browser bootstrap under their declared module names. #47
  • Added WIT and JSExport worker templates. The JSExport client provides explicit call, disposal, termination, managed-failure, and pending-call lifecycle behavior. #48
  • Clarified command versus async-command, raw versus component packaging, and when application-owned JavaScript imports require raw output. #46

Diagnostics and failure handling

  • Debug managed stack traces can now include portable-PDB source files and sequence-point line numbers. Missing symbols fall back to method-only or numeric frames. Debug enables rich diagnostics by default; Release includes them only when NetWasmManagedStackTrace is explicitly enabled. The instrumentation, compact lookup data, and sidecar are omitted when disabled. #64
  • Raw and component hosts now preserve managed-failure classification and report the exception type and available message independently of stack-trace instrumentation. #45
  • Unobserved task diagnostics retain the original exception details through finalization while keeping reporting non-terminating. #44
  • dotnet run now propagates guest exit codes and host or contract failures to the outer process. #60

Compiler and runtime fixes

  • Preserved mutable struct receiver and by-reference aliasing when values are captured by exception filters. #40
  • Fixed struct-producing calls in filter funclets by retaining their planned value-frame and temporary layout. #41
  • Fixed exception-region structuring when a protected region and loop share an entry block; this unblocks CborReader.SkipValue and ReadEncodedValue. #63
  • Preserved closed generic substitutions through FluentValidation rule execution instead of producing an open !0 layout. #66
  • Added the invariant date/time formatting and exact DateTimeOffset parsing behavior required by CBOR date tags, including optional fractions, Z, numeric offsets, span overloads, and strict round-trip matching. #62
  • Added the expected CLS declaration to the CoreLib reference assembly while retaining diagnostics for genuinely non-CLS public APIs. #68

SDK and packaging fixes

  • Fixed central package-version and VersionOverride handling during pack. #51
  • Fixed PackagePath handling for omitted, empty, relative, and directory destinations. #52
  • Fixed partial PrivateAssets conversion into nuspec asset filters. #53
  • Fixed analyzer project-reference target selection under netwasm0.1. #54
  • Removed unavailable optional HTTP and LINQ namespaces from the base implicit-using set. #56
  • Documented why AssetTargetFallback and PackageTargetFallback remain unavailable for the exact NetWasm target profile. #55

Qualification and size

The release qualification completed 2,259 compiler/runtime cases plus package-consumer and host validation. The optimized Release Hello World component is 84,653 bytes, which is 140 bytes (+0.17%) above NetWasm 0.5.0’s 84,513-byte result. The increase comes from ArgumentNullException.ThrowIfNull preserving caller-expression parameter names through ParamName and Message, which is observable .NET behavior. Structured exception diagnostics and managed stack-trace instrumentation remain absent from this Release artifact when disabled.

NetWasm 0.6.0-preview.1

Pre-release

Choose a tag to compare

@zion-sati zion-sati released this 04 Oct 16:34
1f68040

NetWasm 0.6 expands the compiler and runtime compatibility surface for real package workloads while preserving closed-world, pay-as-you-use output.

Highlights include bounded custom-attribute queries for framework and user-defined attributes, broader expression-tree and runtime compatibility, static native C interop for linked Wasm archives, source-aware diagnostic stack traces, improved exception reporting, worker-oriented WIT/component support, and expanded SDK templates.

The ordinary Release Hello42 component remains 84,653 bytes with optional rich diagnostics excluded.

This preview publishes the package candidates that will be promoted byte-for-byte to 0.6.0 after verification on NuGet.org.

NetWasm v0.5.0

Choose a tag to compare

@zion-sati zion-sati released this 29 Sep 07:46
e936b0c

What's Changed

Full Changelog: v0.4.3...v0.5.0

NetWasm v0.5.0-preview.1

Pre-release

Choose a tag to compare

@zion-sati zion-sati released this 29 Sep 07:46
e936b0c

What's Changed

Full Changelog: v0.4.3...v0.5.0-preview.1

NetWasm v0.4.3

Choose a tag to compare

@zion-sati zion-sati released this 27 Sep 17:16
400676d

NetWasm 0.4.3 reduces the canonical Console.WriteLine(42) Release component from 91,294 to 84,513 bytes while retaining precise BDWGC garbage collection.

  • Aligns CLI, SDK and browser release packaging around the same size-oriented runtime optimization and final component stripping pipeline.
  • Removes unused runtime compatibility code and excludes the GC no-collection diagnostic hook from ordinary Release builds.
  • Adds a clean-source and clean-package-consumer size canary so those paths must produce the same validated, executable component.
  • Raises the supported .NET 10 SDK floor to 10.0.303 on macOS Arm64 to avoid the upstream CoreCLR TLS crash fixed in newer servicing releases; repository builds use SDK 10.0.401.
  • Makes host-tool downloads resilient to transient upstream throttling and corrects release package version projection order.

NetWasm v0.4.3-preview.1

Pre-release

Choose a tag to compare

@zion-sati zion-sati released this 27 Sep 16:39
400676d

NetWasm 0.4.3-preview.1 is the release candidate for NetWasm 0.4.3.

NetWasm 0.4.3 reduces the canonical Console.WriteLine(42) Release component from 91,294 to 84,513 bytes while retaining precise BDWGC garbage collection.

  • Aligns CLI, SDK and browser release packaging around the same size-oriented runtime optimization and final component stripping pipeline.
  • Removes unused runtime compatibility code and excludes the GC no-collection diagnostic hook from ordinary Release builds.
  • Adds a clean-source and clean-package-consumer size canary so those paths must produce the same validated, executable component.
  • Raises the supported .NET 10 SDK floor to 10.0.303 on macOS Arm64 to avoid the upstream CoreCLR TLS crash fixed in newer servicing releases; repository builds use SDK 10.0.401.
  • Makes host-tool downloads resilient to transient upstream throttling and corrects release package version projection order.