Skip to content

Avoid WASI 0.2 imports on wasm32-wasip3 target - #260

Open
Snowiiii wants to merge 2 commits into
bytecodealliance:mainfrom
Snowiiii:pure-wasip3
Open

Snowiiii wants to merge 2 commits into
bytecodealliance:mainfrom
Snowiiii:pure-wasip3

Conversation

@Snowiiii

Copy link
Copy Markdown
Contributor
  • Use wasi:cli/environment@0.3.0 and skip the wasi_snapshot_preview1 reactor adapter on wasip3 targets so generated components carry zero WASI 0.2.x imports.
  • Auto-select wasm32-wasip3 when the target world imports or exports wasi:*@0.3.x.

Closes #258

@dicej dicej left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks, @Snowiiii. This looks reasonable to me.

Two thoughts:

  • We might not need wasi-preview1-component-adapter at all anymore, even for wasm32-wasip2. I think recent versions of wasi-libc have been fully updated to no longer use WASIp1 imports for either the wasm32-wasip2 or wasm32-wasip3 targets, in which case this would be a good opportunity to remove the adapter entirely. Would you be interested in trying that? If not, I can make a follow-up PR.
  • We should tweak the doc comment for command::Componentize::target to mention that worlds which import or export WASIp3 interfaces will cause the wasm32-wasip3 target to be used by default in addition to any use of async features.

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.

wasm32-wasip3 target uses WASI preview 2 bindings

2 participants