Skip to content

WasmPayloadBuilder

Namespace: Dotsider.Core.Protocol

Assembly: Dotsider.Core.dll

Builds JSON-ready WebAssembly payloads shared by direct MCP tools, the CLI, and the diagnostics session protocol. The payloads describe raw SDK-produced Wasm modules such as dotnet.native.wasm, not ECMA-335 metadata assemblies.

public static class WasmPayloadBuilder

ObjectWasmPayloadBuilder

Builds a function inventory for a WebAssembly module. Imported functions and file-backed defined functions share the same Wasm function-index space, matching direct call operands and symbol-map entries.

Parameters:

Returns: Object

A JSON-ready function inventory payload.

public static object BuildFunctions(AssemblyAnalyzer analyzer)

Builds a section-table payload for a WebAssembly module. Each section keeps its raw id, display name, file payload offset, and payload size so callers can jump to the bytes that the SDK emitted.

Parameters:

Returns: Object

A JSON-ready section table payload.

public static object BuildSections(AssemblyAnalyzer analyzer)

Builds a compact WebAssembly module summary for protocol surfaces. Returns null when the analyzer is not a raw Wasm module so callers can include it unconditionally beside other binary-kind summaries.

Parameters:

  • analyzer (AssemblyAnalyzer): The analyzer whose raw Wasm summary should be serialized.

Returns: Object

A JSON-ready summary object, or null when the analyzer is not raw Wasm.

public static object? BuildSummary(AssemblyAnalyzer analyzer)