Sign in

    mwac

    WAC (WebAssembly Compositions) composer for the Component Model

    wasm
    webassembly
    component-model
    wac
    composition
    Download zip
    Author
    Version
    0.1.2
    License
    Apache-2.0
    Last updated
    8 months ago
    Downloads
    66K

    #mwac

    A WebAssembly Component Model composition tool written in MoonBit.

    Parses WAC (WebAssembly Compositions) .wac scripts and composes multiple WebAssembly Components into a single component via plug/compose.

    #Features

    • .wac script parsing and resolution
    • Component Model binary (.wasm) parsing (import/export extraction, type analysis)
    • plug — satisfy a component's imports with another component's exports
    • compose — compose multiple components based on a WAC script
    • Dead Code Elimination (prune unused instances)
    • WIT interface type compatibility checking

    #Project Structure

    src/ ├── component/ # Component Model binary parser, plug, encoder └── composer/ # WAC parser, resolver, composer, DCE examples/ ├── hello/ # Single component example ├── compose/ # Multi-component composition example ├── core-module/ # Core Module plug example └── wac/ # WAC script example

    #WAC Script Example

    package example:composition; let hello = new example:hello {}; let greeter = new example:greeter { hello: hello.hello, }; export greeter.greet;

    #Development

    just # check + test just fmt # format code just check # type check just test # run tests just run # run main

    #Dependencies

    #License

    Apache-2.0