Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Should have the ability to select a world from a wit file with multiple worlds #202

Open

Description

With a simple wit file like it not possible to select a world. The last one in the file is selected and used. So in the case the bindings are generated for queue-world.

package hyperlight:worlds;
interface http-interface {
 record request {
 params: list<string>
 }
 record response {
 body: string
 }
 handle-request: func(event: request) -> response;
}
interface queue-interface {
 record message {
 data: string
 }
 record output {
 messages: list<string>
 }
 handle-message: func(msg: message) -> output;
}
world http-world {
 export http-interface;
}
world queue-world {
 export queue-interface;
}

For instance, I added queue world after getting bindings working for http-world and now get the following error. If Swap the worlds it works.

error[E0433]: failed to resolve: could not find `HttpWorldExports` in `worlds`
 --> src/main.rs:123:69
 |
123 | let instance = bindings::hyperlight::worlds::HttpWorldExports::http_interface(&mut wrapped);

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /