Skip to content

Implementing multiple worlds #203

@jsturtevant

Description

@jsturtevant

It doesn't seem possible today to register multiple worlds. For instance, if I wanted my app to support both wasi:cli and wasi:http.

I thought it might be possible to create two different modules and then register them like:

    let rt = cli::bindings::register_host_functions(&mut sb, state);
    let rt = http::bindings::register_host_functions(&mut rt, state);

This doesn't work due to export WIT_WORLD which must be set to one and will only generate guest bindings for one of them.

The work around for now is combine the worlds into one world.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions