-
Notifications
You must be signed in to change notification settings - Fork 30
Closed
Description
Currently, wac uses a predefined set of Wasm features when creating a Validator.
Specifically, it enables the component_model feature alongside the defaults,
wac/crates/wac-types/src/package.rs
Lines 203 to 206 in d0eb3d4
| let mut validator = Validator::new_with_features(WasmFeatures { | |
| component_model: true, | |
| ..Default::default() | |
| }); |
wac/crates/wac-graph/src/graph.rs
Lines 1228 to 1231 in d0eb3d4
| Validator::new_with_features(WasmFeatures { | |
| component_model: true, | |
| ..Default::default() | |
| }) |
When this configuration doesn't contain, for example gc, wac fails to validate when it runs against the Wasm components that depend on gc.
(Context: I'm trying to support Wasm Component in Scala (using WasmGC), and struggled to use wac with it)
proposal
- (1) Allow to specify which wasm features to be enabled (using
--featuresflag aswasm-toolsdoes), or - (2) Enable all features as I do in the workaround below
Workaround
A workaround involves modifying the Validator to use WasmFeatures::all():
- Validator::new_with_features(WasmFeatures {
- component_model: true,
- ..Default::default()
- })
+ Validator::new_with_features(WasmFeatures::all())Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels