Skip to content

WASI P3 docs#182

Closed
itowlson wants to merge 1 commit intospinframework:mainfrom
itowlson:wasi-p3
Closed

WASI P3 docs#182
itowlson wants to merge 1 commit intospinframework:mainfrom
itowlson:wasi-p3

Conversation

@itowlson
Copy link
Contributor

@itowlson itowlson commented Mar 5, 2026

I'm going to drop these bits out in multiple commits with a view to making them easier to review, although I'm pretty sure my laziness with git will thwart that noble aim before too long.

So this initial commit is just the instance reuse stuff and I'll deal to other bits over time.

@itowlson itowlson requested a review from dicej March 5, 2026 00:29
Copy link

@dicej dicej left a comment

Choose a reason for hiding this comment

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

Looks great; thanks for doing this! Just a couple of optional comments inline.

This reminds me that we need still need to nail down the "preventing instance reuse" story in Spin and Wasmtime. For example, we've discussed using backpressure_inc in combination with graceful shutdown ending with a call to wasi:cli/exit#exit, but I'm not sure Spin is quite ready for that yet; it might log an alarming message when the instance exits, failing to distinguish it from other kinds of traps. And in any case, we should document this somewhere upstream (e.g. in the wasi-http spec) before we declare the Spin implementation finished.

I'll open an issue on the WASI repo.


The exact details depend on your component.

A WASI P2 component is _never_ subject to instance reuse. (This includes all triggers other than HTTP.)
Copy link

Choose a reason for hiding this comment

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

We could mention here that future versions of Spin might support optionally enabling consecutive reuse for P2 components.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I noodled around with some words for this but none of them felt very actionable to me, so I'm going to pass on this for now. I've just softened "never" to "not" to avoid any implication that P2 components will never ever ever see reuse.

@dicej
Copy link

dicej commented Mar 5, 2026

Per my comment above, I've opened an issue about documenting instance reuse on the WASI repo: WebAssembly/WASI#898

Signed-off-by: itowlson <ivan.towlson@fermyon.com>
@itowlson
Copy link
Contributor Author

Talked to @mikkelhegn and we might want to hold off on these until we fork the 4.x docs and can have them be all-P3, instead of awkwardly mixing P2 and P3 docs.

@itowlson
Copy link
Contributor Author

Folded this into #183

@itowlson itowlson closed this Mar 23, 2026
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.

2 participants