Skip to content

Tutorial don't work #188

@feelingsonice

Description

@feelingsonice

Following the first part of the tutorial described here in Rust and running cargo component build --release simply don't work:

warning: `add` (lib) generated 1 warning
    Finished `release` profile [optimized] target(s) in 0.13s
    Creating component target/wasm32-wasip1/release/add.wasm
error: failed to decode world from module

Caused by:
    0: module was not valid
    1: failed to find export of function `add`

Tried a few versions:

package example:component;

world example {
    export add: func(x: s32, y: s32) -> s32;
}

and

package component:example;

world example {
    export add: func(x: s32, y: s32) -> s32;
}

I'm guessing it's outdated?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions