Commit 8c422a2
Change how wasm features/gc support work in
This commit aims to address bytecodealliance#11450 in complementary but somewhat
orthogonal ways. First a new `Config::gc_support` option is added which
is hooked up to the CLI as `-Wgc-support`. This option controls the
wasmparser-internal `GC_TYPES` feature. Its default value, like before,
is `cfg!(feature = "gc")` and additionally enabling it requires the `gc`
crate feature to be enabled.
This commit then additionally updates how wasm features are processed
during validating a deserialized module to only require enabled features
to be enabled in the host. Previously modules that disabled a feature
but the feature was enabled in the host would fail to deserialize. All
WebAssembly proposals are additive, however, so it's always ok to
disable a feature and then load it into a module that enables the wasm
proposal.
Closes bytecodealliance#11450Config (bytecodealliance#11463)1 parent d041d93 commit 8c422a2
File tree
3 files changed
+39
-68
lines changed- crates
- cli-flags/src
- wasmtime/src
- engine
3 files changed
+39
-68
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
403 | 403 | | |
404 | 404 | | |
405 | 405 | | |
| 406 | + | |
| 407 | + | |
406 | 408 | | |
407 | 409 | | |
408 | 410 | | |
| |||
990 | 992 | | |
991 | 993 | | |
992 | 994 | | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
993 | 999 | | |
994 | 1000 | | |
995 | 1001 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2226 | 2226 | | |
2227 | 2227 | | |
2228 | 2228 | | |
2229 | | - | |
2230 | | - | |
| 2229 | + | |
2231 | 2230 | | |
2232 | 2231 | | |
2233 | 2232 | | |
| 2233 | + | |
| 2234 | + | |
| 2235 | + | |
| 2236 | + | |
2234 | 2237 | | |
2235 | 2238 | | |
2236 | 2239 | | |
| |||
2675 | 2678 | | |
2676 | 2679 | | |
2677 | 2680 | | |
| 2681 | + | |
| 2682 | + | |
| 2683 | + | |
| 2684 | + | |
| 2685 | + | |
| 2686 | + | |
| 2687 | + | |
| 2688 | + | |
| 2689 | + | |
| 2690 | + | |
| 2691 | + | |
| 2692 | + | |
| 2693 | + | |
| 2694 | + | |
2678 | 2695 | | |
2679 | 2696 | | |
2680 | 2697 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
376 | 376 | | |
377 | 377 | | |
378 | 378 | | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | | - | |
397 | | - | |
398 | | - | |
399 | | - | |
400 | 379 | | |
401 | 380 | | |
402 | | - | |
403 | | - | |
404 | | - | |
405 | | - | |
406 | | - | |
407 | | - | |
408 | | - | |
409 | | - | |
410 | | - | |
411 | | - | |
412 | | - | |
413 | | - | |
414 | | - | |
415 | | - | |
416 | | - | |
417 | | - | |
418 | | - | |
419 | | - | |
420 | | - | |
421 | | - | |
422 | | - | |
423 | | - | |
424 | | - | |
425 | | - | |
426 | | - | |
427 | | - | |
428 | | - | |
429 | | - | |
430 | | - | |
431 | | - | |
432 | | - | |
433 | | - | |
434 | | - | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
435 | 388 | | |
| 389 | + | |
436 | 390 | | |
437 | 391 | | |
438 | 392 | | |
439 | 393 | | |
440 | 394 | | |
441 | 395 | | |
442 | 396 | | |
443 | | - | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
444 | 400 | | |
445 | 401 | | |
446 | | - | |
447 | | - | |
448 | | - | |
449 | 402 | | |
450 | 403 | | |
451 | 404 | | |
| |||
647 | 600 | | |
648 | 601 | | |
649 | 602 | | |
650 | | - | |
651 | | - | |
652 | | - | |
653 | | - | |
654 | | - | |
655 | | - | |
656 | | - | |
657 | | - | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
658 | 606 | | |
659 | 607 | | |
660 | 608 | | |
| |||
0 commit comments