Sign in

    wasm_component

    Portable WebAssembly Component Model syntax and validation

    wasm
    webassembly
    component-model
    wit
    Download zip
    Author
    Version
    0.17.1
    License
    Apache-2.0
    Last updated
    yesterday
    Downloads
    1K

    Dependencies

    #wasm_component

    Portable syntax, binary decoding, canonical ABI modeling, validation, and text tooling for the WebAssembly Component Model.

    The module is independent of Wasmoon runtime objects, JIT execution, WASI, and native host bindings. Product runtimes consume its validated component model through their own adapters.

    Milky2018/wasmoon/component is the Wasmoon runtime facade, and Milky2018/wasmoon/wit_binding adapts a resolved portable WIT world to a live Wasmoon component instance.

    #Packages

    • Milky2018/wasm_component: component types, binary decoding, and canonical ABI helpers.
    • Milky2018/wasm_component/validator: component validation and immutable validation evidence.
    • Milky2018/wasm_component/text: Component Model text parsing and encoding.
    • Milky2018/wasm_component/wit: WIT parsing, resolution, formatting, and Component Model encoding and decoding.

    CanonicalAbiPlan

    A value's ABI representation in its defining type environment. Flat output may be bounded by the caller's ABI arity limit; memory layout never expands fixed-length lists. An absent layout means the value exceeds the supported addressable area, while its bounded call signature can still be inspected.

    ComponentDecl

    A subset of component type declarations (enough for WIT-encoded components).

    InstanceDecl

    A subset of instance type declarations (enough for wasmtime/component-spec).

    canonical_discriminant_layout

    fn canonical_discriminant_layout(case_count : Int) -> (Int, Int)

    canonical_flat_types

    Return the Canonical ABI flat core value types for one component value.

    pointer_type must be I32 or I64 and represents the selected canonical memory. None means the type index is invalid, recursive, or does not name a value type. max_flat bounds the returned prefix when only an ABI arity threshold is needed; it avoids expanding large fixed lists.

    canonical_lift_core_func_type

    Return the Canonical ABI core signature consumed by canon lift.

    More than sixteen flat parameters use one indirect pointer. A result with more than one flat value is returned as a pointer to the result area.

    canonical_lower_core_func_type

    Return the Canonical ABI core signature produced by canon lower.

    More than sixteen flat parameters use one indirect pointer. A result with more than one flat value appends an indirect result pointer to the core parameters.

    canonical_memory_layout

    fn canonical_memory_layout(ty :
    ValType
    , types : Array[
    TypeDef
    ?], mem_is_64 : Bool) -> (Int, Int)?

    canonical_value_contains_memory

    sniff_binary_kind

    fn sniff_binary_kind(bytes : Bytes) ->
    BinaryKind
    ?

    Source Files

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io