Skip to content

Commit da6f55c

Browse files
vados-cosmonicgfxclaude
committed
feat(bindgen): configure wasmparser for wasm 3.0 support
This commit enables wasm 3.0 spec features and wide arithmetic features, as introduced by the PR against Jco by Wado compiler maintainers. (see: #1346) (see https://github.com/WebAssembly/spec/tree/main/specification/wasm-3.0) Co-Authored-By: FUJI Goro <g.psy.va@gmail.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent f1a364d commit da6f55c

File tree

1 file changed

+3
-6
lines changed
  • crates/js-component-bindgen/src

1 file changed

+3
-6
lines changed

crates/js-component-bindgen/src/lib.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -128,17 +128,14 @@ pub fn transpile(component: &[u8], opts: TranspileOpts) -> Result<Transpiled> {
128128
// This does not require the correct execution of the related features post-transpilation,
129129
// but without the right features specified, components won't load at all.
130130
let mut validator = wasmtime_environ::wasmparser::Validator::new_with_features(
131-
WasmFeatures::WASM2
131+
WasmFeatures::WASM3
132+
| WasmFeatures::WIDE_ARITHMETIC
132133
| WasmFeatures::COMPONENT_MODEL
133134
| WasmFeatures::CM_ASYNC
134135
| WasmFeatures::CM_ASYNC_BUILTINS
135136
| WasmFeatures::CM_ASYNC_STACKFUL
136137
| WasmFeatures::CM_ERROR_CONTEXT
137-
| WasmFeatures::CM_FIXED_SIZE_LIST
138-
| WasmFeatures::EXCEPTIONS
139-
| WasmFeatures::EXTENDED_CONST
140-
| WasmFeatures::MEMORY64
141-
| WasmFeatures::MULTI_MEMORY,
138+
| WasmFeatures::CM_FIXED_SIZE_LIST,
142139
);
143140

144141
let mut types = ComponentTypesBuilder::new(&validator);

0 commit comments

Comments
 (0)