Skip to content

Commit 6805ab1

Browse files
authored
Enable all features in targets subcommand (#2290)
Avoids the need to add a bunch of feature flags to this subcommand.
1 parent 46f768a commit 6805ab1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/wit-component/src/targets.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use crate::encoding::encode_world;
22
use anyhow::{Context, Result};
33
use wasm_encoder::{ComponentBuilder, ComponentExportKind, ComponentTypeRef};
4-
use wasmparser::Validator;
4+
use wasmparser::{Validator, WasmFeatures};
55
use wit_parser::{Resolve, WorldId};
66

77
/// This function checks whether `component_to_test` correctly conforms to the world specified.
@@ -36,7 +36,7 @@ pub fn targets(resolve: &Resolve, world: WorldId, component_to_test: &[u8]) -> R
3636

3737
let bytes = root_component.finish();
3838

39-
Validator::new()
39+
Validator::new_with_features(WasmFeatures::all())
4040
.validate_all(&bytes)
4141
.context("failed to validate encoded bytes")?;
4242

0 commit comments

Comments
 (0)