1802 Commits

Author SHA1 Message Date
27183347d8 Merge pull request #5443 from wasmerio/run-500-enable-c_api-backends-to-be-used-in-wasmers-implementation
Enable multiple backends supported by the api crate to be used in the c-api as well
2025-03-12 11:31:07 +01:00
b4dfba4bd1 fix(api): Change v8-specific clang flags for bindgen 2025-03-12 10:50:09 +01:00
a1a05508c2 fix(api): Try adding specific clang flags in bindgen for v8 2025-03-12 10:10:34 +01:00
662a4698d5 fix(api): Try adding specific clang flags in bindgen for v8 for imports 2025-03-11 18:38:05 +01:00
3ea5a7eb93 fix(api): Run test on issue_5444 on sys only 2025-03-11 18:22:58 +01:00
28a80cc111 chore: Make linter happy 2025-03-11 18:16:36 +01:00
b7cd7a4a38 fix(api): Correctly check and detect unaligned pointer accesses in WasmSliceAccess 2025-03-11 18:16:15 +01:00
145a804db1 chore: Make linter happy 2025-03-10 16:28:57 +01:00
6fe4229e08 fix(api/wamr): Use default instantiation mechanism for wamr 2025-03-10 16:26:11 +01:00
933095e65c fix(api/build/wamr): Don't re-download if dir is already there 2025-03-10 16:25:49 +01:00
4a877b76ae fix(api): Use Cranelift, Singlepass, LLVM and Headless in BackendKind::default() 2025-03-10 15:30:04 +01:00
3a9958359c fix(api): Don't use backend kind to drive BackendEngine::default() 2025-03-10 15:29:41 +01:00
32304e98b8 fix(wasmi): Implement missing checks when instantiating memory 2025-03-10 15:29:13 +01:00
6d97d1cfd5 fix(wamr): Implement missing checks when instantiating memory 2025-03-10 15:29:01 +01:00
8a475c322d fix(wamr): Implement validate 2025-03-10 15:28:42 +01:00
50e0b295d7 fix(wamr): Bump and lock to stable version of WAMR 2025-03-10 15:27:26 +01:00
950691132b fix(wamr): Fix missing checks in Instance::imports() 2025-03-10 15:27:02 +01:00
84179223ed fix(v8): Correct math error in Module::deserialize 2025-03-10 15:26:27 +01:00
f75f5b7737 fix(v8): Add proper checks when creating memory 2025-03-10 15:24:57 +01:00
af313b308a fix(v8): Fix missing null checks in imports() 2025-03-10 10:49:59 +01:00
b880f76dce fix(api): Make dep wat entail wasmparser 2025-03-07 11:25:58 +01:00
2c31a42f5a fix(api): Use module.exports() to drive the order of InstanceHandle::get_exports() in c_api backends 2025-03-07 11:25:58 +01:00
c8592476a3 chore: Make linter happy 2025-03-07 11:25:12 +01:00
7aec83bc69 fix(api): Make sys::default_engine() public 2025-03-07 11:23:39 +01:00
f08cd32ca4 fix(api): Use BackendKind::default() to drive the decision of the default backend
... so that we don't have to build an engine to find out which engine is
the default one per the enabled features.
2025-03-07 11:23:39 +01:00
eada9fb0c1 fix(api): Minor changes to doc comments 2025-03-07 11:23:38 +01:00
a1e1cc86b1 Release 6.0.0-beta.1 2025-03-07 07:11:49 +01:00
b711bb5ce6 chore: Make linter happy 2025-03-06 17:58:43 +01:00
f8016c6b57 fix(jsc): Use wasmer_types import rather than wasmer_vm reexports 2025-03-06 17:53:48 +01:00
f5c6425e3d fix(api): Make wasmer-vm, wasmer-compiler optional, adjust feature flags 2025-03-06 16:38:59 +01:00
a2a9581201 fix(api): Remove unnecessary js-specific code 2025-03-06 16:38:58 +01:00
5776f40581 fix(v8): Remove unused import 2025-03-06 16:38:57 +01:00
fec4e30c6d feat(types): Move WebAssembly feature detection to types crate
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>
2025-03-06 14:23:38 +01:00
78eca7958d Move target back into wasmer_types 2025-03-06 11:09:51 +01:00
ea975efe80 Improved features 2025-03-06 00:50:01 +01:00
2d70299635 Improved support for Backends 2025-03-05 21:56:54 +01:00
2a5bc9a00d api: add wasm_compiler to JS dependencies
Signed-off-by: Charalampos Mitrodimas <charalampos@wasmer.io>
2025-03-05 17:42:37 +01:00
71b8cef770 feat: automatically select backend based on WASM features
1. Feature Detection:
  - Added ability to detect required Wasm features from module
    binaries
  - Implemented feature checking in RuntimeOptions with wasmparser
    integration
  - Added support for detecting exceptions and other advanced features

2. Backend Selection:
  - Implemented intelligent backend selection based on required
    features
  - Added support for querying supported/default features per backend
  - Enhanced RuntimeOptions to filter and select compatible backends

3. Engine Enhancements:
  - Added default_features_for_target and
    supported_features_for_target methods
  - Implemented backend-specific feature support matrices
  - Improved engine initialization with feature awareness

4. CLI Improvements:
  - Enhanced run command to use feature-based backend selection

Signed-off-by: Charalampos Mitrodimas <charalampos@wasmer.io>
2025-03-05 17:38:20 +01:00
e6e3d50af0 fix(api): Add missing loupe::MemoryUsage impls
These were forgotten in a recent refactor.
2025-02-26 15:31:32 +01:00
8a37633137 Release 6.0.0-alpha.2 2025-02-26 08:53:28 +01:00
b1e1974de6 Update "Build Status" in READMEs 2025-02-24 17:45:06 +01:00
a4382567d0 Release 6.0.0-alpha.1 2025-02-18 13:22:12 +01:00
fb6cb2c25c Merge pull request #5391 from wasmerio/fix-build-6.0.0-alpha1
chore: Prepare build scripts for release
2025-02-14 17:22:53 +01:00
04430fc927 chore: Prepare build scripts for release 2025-02-14 16:26:48 +01:00
71ad15330d fix(api): Relay to BackendModule when creating a Module 2025-02-14 15:23:08 +01:00
bebb86a173 fix: Remove the IoCompileError type in module/inner.rs (BackendModule) 2025-02-14 15:11:03 +01:00
1ff6126e4c chore: Fix doc comments 2025-02-14 15:00:51 +01:00
79a9139286 chore: Make linter happy 2025-02-13 17:45:31 +01:00
7226caa60e fix(v8): Add special case to wasm_c_api type to wasmer type conversion 2025-02-13 17:41:52 +01:00
242bbdfa2c fix(v8): Fix build.rs 2025-02-13 16:29:44 +01:00