component-docs icon indicating copy to clipboard operation
component-docs copied to clipboard

Remove command component from Calculator Tutorial

Open kate-goldenring opened this issue 7 months ago • 0 comments

Instead of composing with a command component, the calculator world could export wasi:cli/run itself:

package docs:[email protected];

interface calculate {
    enum op {
        add,
    }
    eval-expression: func(op: op, x: u32, y: u32) -> u32;
}

world calculator {
    export calculate;
    import docs:adder/[email protected];
}

world app {
    import calculate;
    export wasi:cli/run; <--- suggested addition
}

kate-goldenring avatar Apr 09 '25 15:04 kate-goldenring