![]() |
VOOZH | about |
dotnet add package WACS.ComponentModel.Parser --version 0.2.2
NuGet\Install-Package WACS.ComponentModel.Parser -Version 0.2.2
<PackageReference Include="WACS.ComponentModel.Parser" Version="0.2.2" />
<PackageVersion Include="WACS.ComponentModel.Parser" Version="0.2.2" />Directory.Packages.props
<PackageReference Include="WACS.ComponentModel.Parser" />Project file
paket add WACS.ComponentModel.Parser --version 0.2.2
#r "nuget: WACS.ComponentModel.Parser, 0.2.2"
#:package WACS.ComponentModel.Parser@0.2.2
#addin nuget:?package=WACS.ComponentModel.Parser&version=0.2.2Install as a Cake Addin
#tool nuget:?package=WACS.ComponentModel.Parser&version=0.2.2Install as a Cake Tool
AOT-safe binary parser for WebAssembly Component Model
.component.wasm files. Pure byte walker — no reflection, no
Reflection.Emit, no analyzers required at consumer build time.
Multi-targets net8.0 (AOT-marked) and netstandard2.1.
Split out from
WACS.ComponentModel
so harness / runtime consumers can load components under NativeAOT
or Unity IL2CPP without dragging in the full reflective
ComponentInstance + ComponentBridge surface.
If all you need is "give me a .component.wasm and tell me what's
inside" — types, imports, exports, embedded core modules, the
wit-component custom-section blob — this is the package. If you
need to actually instantiate and invoke a component, layer
WACS.ComponentModel on top.
using Wacs.ComponentModel.Runtime;
using Wacs.ComponentModel.Runtime.Parser;
byte[] bytes = File.ReadAllBytes("hello.component.wasm");
using var ms = new MemoryStream(bytes);
ComponentModule cm = ComponentBinaryParser.Parse(ms);
// Top-level sections in file order
foreach (RawComponentSection s in cm.RawSections)
Console.WriteLine($"{s.Id}: {s.Payload.Length} bytes");
// Embedded core-wasm binaries
foreach (byte[] coreBytes in cm.CoreModuleBinaries)
{
// Feed to Wacs.Core's BinaryModuleParser, or to wasm-tools, etc.
}
The parser produces:
ComponentModule — the parsed container; RawSections,
SectionsOf(id), CoreModuleBinaries, NestedComponentBinaries.TypeSectionReader, ImportSectionReader,
ExportSectionReader, CanonSectionReader,
InstanceSectionReader, CoreInstanceSectionReader,
AliasSectionReader, CustomSectionReader.ComponentBinaryReader — primitive byte walker; LEB128,
preamble check, section framing.| Package | Role |
|---|---|
WACS.ComponentModel.Parser |
this — pure byte walker → ComponentModule |
WACS.ComponentModel |
Builds on the parser; canonical-ABI lift/lower, ComponentInstance.Instantiate, resource handles, ComponentBridge |
WACS.ComponentModel.Harness.Lib |
Build-time IL emitter that consumes ComponentModule to emit typed {World}Harness assemblies |
WACS.ComponentModel.Harness.Runtime |
AOT-safe runtime support emitted harnesses link against |
WACS.Transpiler.Lib |
AOT WASM→IL transpiler; consumes the embedded core modules via this parser |
net8.0 target is annotated IsAotCompatible=true; the
parser is verified by the WACS AOT acceptance gate
(AotAcceptanceTests) — no new IL warnings.netstandard2.1 target is offered for analyzers and other
build-time tooling that can't take a net8.0 dependency.byte[] payloads themselves; section payloads are sliced
out of the input stream once, then handed to per-section
readers on demand.Apache-2.0
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 netstandard2.1 is compatible. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
Showing the top 3 NuGet packages that depend on WACS.ComponentModel.Parser:
| Package | Downloads |
|---|---|
|
WACS.ComponentModel
WebAssembly Component Model support for WACS. Provides the WIT IDL parser, component types, canonical ABI lift/lower, component instantiation, and the host binding surface for running .component.wasm modules on the WACS runtime and AOT transpiler. |
|
|
WACS.ComponentModel.Harness.Runtime
AOT-safe runtime support for typed WIT harnesses emitted by WACS.ComponentModel.Harness.Lib. Carries canonical-ABI memory readers / writers, string lift+lower for UTF-8/UTF-16/Latin1, the WitContract typed model for runtime + compile-time validation, and WitContractMismatchException. No reflection — every type here is callable from harness IL transpiled by NativeAOT or Unity IL2CPP. |
|
|
WACS.ComponentModel.Harness.Lib
Build-time IL emitter for typed WIT harnesses. Takes a WIT contract (either as a directory of `.wit` files or a pre-parsed CtPackage set) and emits a .NET assembly containing the typed harness class with `LoadFrom(byte[])` + per-export typed methods. Two ergonomic surfaces over one emit core: `EmitToFile` / `EmitToStream` for persisted .dll output (the `wacs harness gen` flow) and `EmitInMemory` for immediate consumption (the `wacs run --wit-dir` flow). Targets net9.0 to use PersistedAssemblyBuilder for the AOT-clean save+load round-trip. |
This package is not used by any popular GitHub repositories.