This commit improves the Wasmer runtime's ability to select the
appropriate engine based on WebAssembly features:
- Add detection of WebAssembly features from WebC packages
- Extract Wasm features from command metadata or binary analysis
- Implement engine selection based on detected features
- Refactor type imports from wasmer_compiler::types to wasmer_types
- Add feature annotation support in package manifests
- Improve error messages in WebC package conversion
- Update webc dependency from 8.0 to 9.0
- General code quality improvements (using first() instead of get(0),
is_empty() instead of len() == 0)
This enables more intelligent backend selection when running WebC
packages,ensuring the appropriate compiler features are enabled based
on module requirements.
Signed-off-by: Charalampos Mitrodimas <charalampos@wasmer.io>
This commit moves the WebAssembly feature detection functionality from
the CLI to the types crate, making it more widely accessible for use
by other parts of the codebase.
Changes:
- Add `detect_from_wasm` method to `Features` struct in
`lib/types/features.rs`
- Update CLI's `detect_features_from_wasm` to use the new centralized
method
- Add new WebAssembly feature flags to CLI's `WasmFeatures` struct:
- tail_call
- module_linking
- multi_memory
- memory64
- exceptions
- Remove unsupported feature checks (relaxed_simd, extended_const)
- Improve feature detection logic with better validation and error
handling
This change improves code organization by:
- Centralizing feature detection logic in one place
- Making the feature detection functionality reusable
- Maintaining consistent feature detection across the codebase
- Improving maintainability by reducing code duplication
Signed-off-by: Charalampos Mitrodimas <charalampos@wasmer.io>
(Work in progress) macOS uses a different scheme for exception handling
in Mach-O; in contrast with the "usual" .eh_frame mechanism, Mach-O has
a `compact_unwind` section in which EH-related metadata are embedded.
This commit begins the effort to support it in its entirety. On the path
to that end, it also adds GOT-based relocations, which are necessary for
Mach-O object files.