Skip to content

Commit 56cf001

Browse files
authored
Enable gc, function-references, and exceptions by default (#1732)
This commit enables three new proposals by default in `WasmFeatures` to reflect the stage 4+ status of the proposals.
1 parent 3a451e0 commit 56cf001

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

crates/wasmparser/src/features.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,19 +126,19 @@ define_wasm_features! {
126126
/// The WebAssembly multi memory proposal.
127127
pub multi_memory: MULTI_MEMORY(1 << 12) = true;
128128
/// The WebAssembly exception handling proposal.
129-
pub exceptions: EXCEPTIONS(1 << 13) = false;
129+
pub exceptions: EXCEPTIONS(1 << 13) = true;
130130
/// The WebAssembly memory64 proposal.
131131
pub memory64: MEMORY64(1 << 14) = false;
132132
/// The WebAssembly extended_const proposal.
133133
pub extended_const: EXTENDED_CONST(1 << 15) = true;
134134
/// The WebAssembly component model proposal.
135135
pub component_model: COMPONENT_MODEL(1 << 16) = true;
136136
/// The WebAssembly typed function references proposal.
137-
pub function_references: FUNCTION_REFERENCES(1 << 17) = false;
137+
pub function_references: FUNCTION_REFERENCES(1 << 17) = true;
138138
/// The WebAssembly memory control proposal.
139139
pub memory_control: MEMORY_CONTROL(1 << 18) = false;
140140
/// The WebAssembly gc proposal.
141-
pub gc: GC(1 << 19) = false;
141+
pub gc: GC(1 << 19) = true;
142142
/// The WebAssembly [custom-page-sizes
143143
/// proposal](https://github.com/WebAssembly/custom-page-sizes).
144144
pub custom_page_sizes: CUSTOM_PAGE_SIZES(1 << 20) = false;

tests/roundtrip.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -598,8 +598,9 @@ impl TestState {
598598
for part in test.iter().filter_map(|t| t.to_str()) {
599599
match part {
600600
"testsuite" => {
601-
features = WasmFeatures::default();
602-
features.remove(WasmFeatures::COMPONENT_MODEL);
601+
features = WasmFeatures::wasm2();
602+
features |= WasmFeatures::TAIL_CALL;
603+
features |= WasmFeatures::EXTENDED_CONST;
603604

604605
// NB: when these proposals are merged upstream in the spec
605606
// repo then this should be removed. Currently this hasn't

0 commit comments

Comments
 (0)