Skip to content

Allow feature gates on resource methods - #700

Open
yordis wants to merge 1 commit into
WebAssembly:mainfrom
yordis:yordis/fix-resource-method-gate
Open

Allow feature gates on resource methods#700
yordis wants to merge 1 commit into
WebAssembly:mainfrom
yordis:yordis/fix-resource-method-gate

Conversation

@yordis

@yordis yordis commented Aug 15, 2026

Copy link
Copy Markdown

The resource-item production does not permit a gate on resource methods, but WASI 0.3 already relies on being able to gate them individually. For example, resource descriptor carries @since on each of its methods, and wasm-tools parses and round-trips that today.

So this is the spec text lagging behind both the tooling and the WASI proposals rather than a feature request. The fix places gate on the containing item list, matching how world-items ::= gate world-definition and interface-items ::= gate interface-definition already do it.

Record fields, enum cases, variant cases and flags are deliberately left alone; wasm-tools rejects gates on those, so the grammar is already correct there.

WASI 0.3 gates individual resource methods and wasm-tools accepts them, but the
grammar as written does not permit it.

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
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.

1 participant