Skip to content

Add runtime::spawn for WASIp3 - #156

Merged
pchickey merged 1 commit into
bytecodealliance:mainfrom
adamrk:abk/runtime-p3
Sep 16, 2026
Merged

pchickey merged 1 commit into
bytecodealliance:mainfrom
adamrk:abk/runtime-p3

Conversation

@adamrk

@adamrk adamrk commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Implements spawn for the WASIp3 target.

Resolves #152

@adamrk adamrk mentioned this pull request Sep 16, 2026
Comment thread src/runtime/mod.rs
});
});
runnable.schedule();
task

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a little disappointed that wasip3::spawn_local can't return a handle, and I haven't explored why we can't add that in wit-bindgen, but I assume thats a problem too big to solve right now. My biggest concern here is that if we're relying on the CM task's context to take care of disambiguating context at the host (i.e. the CDN-Loop problem), we need the not-yet-existing guest functionality for getting and setting task context.

I guess we have to roll with this because its the only way for now? But lets also make sure we follow up on the task context set/get soon.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made the change to have spawn_local return a handle already here: bytecodealliance/wit-bindgen#1710 (comment) , so we can switch to that in a follow up after both wit-bindgen and wasip3 are released. But yes we should also still follow up on the context get/set separately.

@pchickey
pchickey merged commit 097effa into bytecodealliance:main Sep 16, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement runtime on WASIp3

2 participants