-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Labels
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);