liang.he and GitHub
75bf9797a2
Update type validation in load_table_import() and load_table() ( #4296 )
...
Prevent from value type.
https://webassembly.github.io/spec/core/valid/types.html#table-types
https://webassembly.github.io/gc/core/syntax/types.html#reference-types
2025-06-12 15:01:42 +08:00
YAMAMOTO Takashi and GitHub
5478d267f4
wasi_nn_openvino.c: remove the tensor layout adjustment logic ( #4308 )
...
the logic in question seems like an attempt to work around
some application bugs.
my wild guess is that it was for classification-example.
cf. https://github.com/bytecodealliance/wasmtime/issues/10867
2025-06-12 09:34:14 +08:00
YAMAMOTO Takashi and GitHub
3a087c4244
wamr-wasi-extensions: add a cmake package to provide our wasi extension ( #4344 )
...
* wasi_ephemeral_nn.h: add a convenience wrapper header
* wamr-wasi-extensions: add a cmake package to provide our wasi extension
the sample app was tested with:
* wasmtime
* iwasm with https://github.com/bytecodealliance/wasm-micro-runtime/pull/4308
currently only contains wasi-nn.
maybe it makes sense to add lib-socket things as well.
cf. https://github.com/bytecodealliance/wasm-micro-runtime/issues/4288
2025-06-12 09:33:25 +08:00
Liu Jia and GitHub
928598f1ce
add heap-type check for GC when ref.null ( #4300 )
...
- According to [Link 1](https://webassembly.github.io/gc/core/valid/instructions.html#xref-syntax-instructions-syntax-instr-ref-mathsf-ref-null-mathit-ht ), we must ensure that the heap type is valid when ref.null.
- According to [Link 2](https://webassembly.github.io/gc/core/valid/types.html#heap-types ), a heap type is considered valid if it is either a concrete heap type or an abstract heap type.
However, in this function, the check for abstract heap types (absheaptype) was clearly missing, so this condition needs to be added explicitly in the if statement.
- When GC is disabled, no change is needed.
- When GC is enabled, heap types in WAMR are LEB-encoded values ([Link 3](https://webassembly.github.io/gc/core/appendix/index-types.html )). Therefore, we must use read_leb_int32 to parse the heap type correctly. And we can compute the original type1 using type1 = (uint8)((int32)0x80 + heap_type);.
2025-06-12 09:31:17 +08:00
YAMAMOTO Takashi and GitHub
c932597057
wasi_nn_types.h: remove a seemingly stale comment ( #4348 )
2025-06-12 09:29:59 +08:00
d52f083ac0
build(deps): Bump requests from 2.32.3 to 2.32.4 in /build-scripts ( #4349 )
...
Bumps [requests](https://github.com/psf/requests ) from 2.32.3 to 2.32.4.
- [Release notes](https://github.com/psf/requests/releases )
- [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md )
- [Commits](https://github.com/psf/requests/compare/v2.32.3...v2.32.4 )
---
updated-dependencies:
- dependency-name: requests
dependency-version: 2.32.4
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-12 09:29:33 +08:00
TianlongLiang and GitHub
c4623e2cb5
Enable aot memory64 sw bounds checks by default ( #4350 )
...
- enable aot memory64 sw bounds checks by default
2025-06-12 08:44:45 +08:00
YAMAMOTO Takashi and GitHub
7f968f5926
wasi_socket_ext.c: avoid tls to make this library-friendly ( #4338 )
2025-06-11 07:46:35 +08:00
07c23cb98e
build(deps): Bump github/codeql-action from 3.28.18 to 3.28.19 ( #4346 )
...
Bumps [github/codeql-action](https://github.com/github/codeql-action ) from 3.28.18 to 3.28.19.
- [Release notes](https://github.com/github/codeql-action/releases )
- [Commits](https://github.com/github/codeql-action/compare/v3.28.18...v3.28.19 )
---
updated-dependencies:
- dependency-name: github/codeql-action
dependency-version: 3.28.19
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-11 07:35:56 +08:00
YAMAMOTO Takashi and GitHub
ea5757f1d7
wasi-nn: do not assign wasi_nn_ctx->backend multiple times ( #4329 )
2025-06-09 11:36:31 +08:00
YAMAMOTO Takashi and GitHub
4d6b8dcd5d
wasi_nn.h: make this compatible with wasi_ephemeral_nn ( #4330 )
...
- wasi_nn.h: make this compatible with wasi_ephemeral_nn
cf. https://github.com/bytecodealliance/wasm-micro-runtime/issues/4323
- fix WASM_ENABLE_WASI_EPHEMERAL_NN build
this structure is used by host logic as well.
ideally definitions for wasm and host should be separated.
until it happens, check __wasm__ to avoid the breakage.
2025-06-09 11:36:05 +08:00
liang.he and GitHub
99c75b53db
remove temporary wasi-libc build steps from CI workflows ( #4343 )
...
Ref:
https://github.com/bytecodealliance/wasm-micro-runtime/pull/2465
2025-06-09 11:35:24 +08:00
YAMAMOTO Takashi and GitHub
933f8124b0
wasi-nn: fix the size of tensor->type ( #4333 )
...
* this enum is (@witx tag u8) in witx
* it seems that some wasm modules actually use non-zero padding
and cause errors
* it's a bad practice to use C enum for ABI description anyway
2025-06-06 15:08:18 +08:00
YAMAMOTO Takashi and GitHub
769d16eaab
wasi-nn: move some host-only things out of wasi_nn_types.h ( #4334 )
...
cf. https://github.com/bytecodealliance/wasm-micro-runtime/issues/4324
2025-06-06 15:07:29 +08:00
TianlongLiang and GitHub
350af77b03
Collective fix: fix some typos ( #4337 )
2025-06-06 15:06:57 +08:00
liang.he and GitHub
97e9502bb3
Update Dockerfile for Zephyr SDK and Zephyr-project versioning ( #4335 )
...
Use a minimum manifest to reduce time consumption
2025-06-06 15:05:44 +08:00
liang.he and GitHub
48a97736b3
Update binary compression steps to follow symlinks for actual files ( #4321 )
...
By default, zip follows symbolic links and includes the actual files
or directories they point to in the archive.
2025-06-06 15:05:04 +08:00
liang.he and GitHub
602e86adc3
Add wamrc compilation into Windows CI workflow ( #4327 )
...
+formatting
2025-06-05 11:57:29 +08:00
YAMAMOTO Takashi and GitHub
79cb4366ae
wasi-nn: remove unused wasi_nn_dump_tensor_dimension prototype ( #4325 )
2025-06-05 09:48:28 +08:00
YAMAMOTO Takashi and GitHub
b20ebc2724
wasi_nn.h: add import_name attribute ( #4328 )
...
this would fix undefined symbol errors by making it clear
these functions are imported.
references:
https://github.com/llvm/llvm-project/blob/e2c698c7e836306f1a25c67597ae9e25a1fcc575/llvm/lib/MC/WasmObjectWriter.cpp#L1798-L1799
https://github.com/llvm/llvm-project/blob/e2c698c7e836306f1a25c67597ae9e25a1fcc575/llvm/lib/Object/WasmObjectFile.cpp#L749-L752
https://github.com/llvm/llvm-project/blob/e2c698c7e836306f1a25c67597ae9e25a1fcc575/lld/wasm/Symbols.cpp#L203
https://github.com/llvm/llvm-project/blob/e2c698c7e836306f1a25c67597ae9e25a1fcc575/lld/wasm/Relocations.cpp#L36-L40
2025-06-05 09:48:00 +08:00
YAMAMOTO Takashi and GitHub
85efe08431
wasi-nn: protect the backend lookup table with a lock ( #4319 )
...
this would avoid potential issues when multiple instances happen to
make an attempt to load a backend at the same time.
Fixes: https://github.com/bytecodealliance/wasm-micro-runtime/issues/4314
2025-06-05 09:19:46 +08:00
Zhenwei Jin and GitHub
93ef19b0ca
handle nullable heap reference types in import section ( #4302 )
2025-06-03 13:28:26 +08:00
YAMAMOTO Takashi and GitHub
6a00874f2f
wasi_nn_openvino.c: make this buildable ( #4305 )
2025-06-03 13:28:13 +08:00
YAMAMOTO Takashi and GitHub
61cb97221e
wasi-nn: fix shared library filenames for macOS ( #4306 )
...
tested with openvino
2025-06-03 13:23:19 +08:00
YAMAMOTO Takashi and GitHub
ae6e490ad5
fix wasi-nn abi definitions ( #4307 )
...
sync with a more appropriate version of the definitions.
as we use the "wasi_ephemeral_nn", which is p1-based, it seems
more appropriate to use definitions from witx, not wit.
it's a bit unfortunate p2-based wasi-nn made gratuitous changes
like this from p1.
note: this is an ABI change.
2025-06-03 13:22:48 +08:00
YAMAMOTO Takashi and GitHub
16c46751ac
wasi-nn: remove "backends" argument from detect_and_load_backend() ( #4309 )
...
it seems meaningless and quite confusing to access a table with
two aliases ("lookup" and "backends") within a function.
no functional changes are intended.
2025-06-03 13:22:27 +08:00
YAMAMOTO Takashi and GitHub
1c12a32066
wasi_nn_openvino.c: fix a few printf formats ( #4310 )
2025-06-03 13:21:32 +08:00
liang.he and GitHub
938503af38
Bump uvwasi to latest commit #392e1f1 ( #4312 )
2025-06-03 13:21:17 +08:00
62bb6e8158
build(deps): Bump ossf/scorecard-action from 2.4.1 to 2.4.2 ( #4315 )
...
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action ) from 2.4.1 to 2.4.2.
- [Release notes](https://github.com/ossf/scorecard-action/releases )
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md )
- [Commits](https://github.com/ossf/scorecard-action/compare/f49aabe0b5af0936a0987cfb85d86b75731b0186...05b42c624433fc40578a4040d5cf5e36ddca8cde )
---
updated-dependencies:
- dependency-name: ossf/scorecard-action
dependency-version: 2.4.2
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-03 13:21:05 +08:00
hongxia and GitHub
aa1ff778b9
add load_by_name in wasi-nn ( #4298 )
2025-06-03 06:26:58 +08:00
liang.he and GitHub
2a303861cc
Fix a linking error caused by commit #3580d1 ( #4311 )
...
> **Fix a release-blocking issue**
---
Like:
```
vmlib.lib(blocking_op.obj) : error LNK2019: unresolved external symbol
__imp_wasm_runtime_begin_blocking_op referenced in function
blocking_op_close
[D:\a\wasm-micro-runtime\wasm-micro-runtime\wamr-compiler\build\wamrc.vcxproj]
vmlib.lib(blocking_op.obj) : error LNK2019: unresolved external symbol
__imp_wasm_runtime_end_blocking_op referenced in function
blocking_op_close
[D:\a\wasm-micro-runtime\wasm-micro-runtime\wamr-compiler\build\wamrc.vcxproj]
```
2025-06-02 16:30:51 +08:00
liang.he and GitHub
670aa83985
Bump version to 2.3.1 and update release notes ( #4303 )
2025-06-02 10:45:50 +08:00
liang.he and GitHub
207da7b22f
updating WASI stdio handle initialization and build options for UVWASI ( #4260 )
2025-05-30 07:42:39 +08:00
liang.he and GitHub
3580d1a386
Enable runtime API exposure for MSVC builds ( #4287 )
2025-05-28 20:30:05 +08:00
hongxia and GitHub
3ab9f84026
Dockerfile.vx-delegate build error fix ( #4273 )
...
- specify tensorflow version & bugfix
2025-05-28 20:29:41 +08:00
liang.he and GitHub
7f9e49213e
Enhance type checking for function types in loader and improve error handling ( #4294 )
...
Especially when GC is enabled, a valid item of `module->types` needs additional
checks before casting to WASMFuncType.
Also, avoid overflowing if reftype_map_count is 0.
Additionally, correctly set IN_OSS_FUZZ based on CFLAGS_ENV for sanitizer
configuration. Update ASan and UBSan messages for clarity in non-oss-fuzz
environments.
2025-05-28 20:29:09 +08:00
YAMAMOTO Takashi and GitHub
782c69fe8a
Revert the location to install public headers ( #4295 )
...
This partly reverts "Cmake improvements".
(https://github.com/bytecodealliance/wasm-micro-runtime/pull/4076 )
Recently we changed the location to install public headers.
For example,
Old: include/wasm_export.h
New: include/iwasm/wasm_export.h
For cmake-based user applications using find_package(iwasm),
the cmake package, namely target_include_directories(INSTALL_INTERFACE),
is expected to add necessary compiler options like -isystem automatically.
(See samples/printversion for an example of such user applications.)
However, in reality, not every user application uses cmake.
This commit reverts the location to install public headers
for now, to avoid breakage for non-cmake user applications.
In case we want to re-apply the location change in future,
we should better communicate to the users. (eg. document
migration proceduces in release notes.)
Fixes: https://github.com/bytecodealliance/wasm-micro-runtime/issues/4290
References:
https://cmake.org/cmake/help/latest/prop_tgt/INTERFACE_INCLUDE_DIRECTORIES.html
2025-05-28 09:05:29 +08:00
liang.he and GitHub
21bcf5c75d
Fix Compiler Error C2491 ( #4286 )
...
> Data, static data members, and functions can be declared as `dllimports` but not defined as `dllimports`.
https://learn.microsoft.com/en-us/cpp/error-messages/compiler-errors-1/compiler-error-c2491?view=msvc-170
2025-05-28 09:05:07 +08:00
Alix ANNERAUD and GitHub
c018b8ab98
feat: Add instruction metering for interpreter ( #4122 )
...
- add instruction metering support with execution limit
- initialize instruction execution limit in exec_env
- docs: add instruction metering section to build_wamr documentation
2025-05-26 16:16:42 +08:00
YAMAMOTO Takashi and GitHub
6659a312cf
add a sample to use cmake package ( #4291 )
...
- add a sample to use cmake package
2025-05-23 16:56:21 +08:00
Krisztian and GitHub
b7474b354f
Improve Embedding WAMR guideline ( #4263 ) ( #4284 )
...
* Fix CMakeList example by adding -lm
* Add bh_read_file inclusion to CMakeList
* replace non-existing read_binary_to_buffer() to existing bh_read_file_to_buffer()
* add #include initialization
Signed-off-by: Krisztian Szilvasi <34309983+kr-t@users.noreply.github.com >
2025-05-22 08:24:41 +08:00
76caabede5
build(deps): Bump github/codeql-action from 3.28.17 to 3.28.18 ( #4285 )
...
Bumps [github/codeql-action](https://github.com/github/codeql-action ) from 3.28.17 to 3.28.18.
- [Release notes](https://github.com/github/codeql-action/releases )
- [Commits](https://github.com/github/codeql-action/compare/v3.28.17...v3.28.18 )
---
updated-dependencies:
- dependency-name: github/codeql-action
dependency-version: 3.28.18
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-22 08:24:15 +08:00
ChenWen and GitHub
f4f33b6a76
feat(yml): Add ESP32-P4 and ESP32-C5 support ( #4270 )
...
- Add ESP32-P4 and ESP32-C5 support
- Support for compiler options of different floating-point types in various RISC-V chips
2025-05-19 10:33:09 +08:00
Liu Jia and GitHub
14d09bfb66
Fixed unit tests on X86_32 ( #4279 )
...
* fix unit tests on x86_32
* enbale wasm-c-api unit test on X86_32
* enable aot-stack-frame unit test on X86_32
* add ci: unit tests on X86_32
2025-05-19 10:32:07 +08:00
liang.he and GitHub
e48367c044
Fix SIMD load lane to avoid incompatible pointer types ( #4278 )
2025-05-19 10:31:17 +08:00
c7b2db1832
Update version to 2.3.0 ( #4171 )
...
- Update version to 2.3.0
- Update RELEASE_NOTES.md. Remove commits that forget to squash when PRs were merged, and some updates on commit messages
---------
Co-authored-by: James Marsh <mrshnja@amazon.co.uk >
Co-authored-by: liang.he@intel.com <liang.he@intel.com >
Co-authored-by: TianlongLiang <111852609+TianlongLiang@users.noreply.github.com >
2025-05-14 17:32:00 +08:00
liang.he and GitHub
28702edaf7
Merge commit from fork
2025-05-14 12:43:55 +08:00
Maks Litskevich and GitHub
129dc3a30f
Add select 128 ( #4236 )
...
Add select 128
2025-05-14 12:35:56 +08:00
liang.he and GitHub
8ad47897d1
Add error handling for sgx ci ( #4222 )
...
> Process completed with exit code 143.
It will attempt to run spec test scripts three times if they end with code 143.
It is a known issue with GitHub-hosted runners. Usually, increasing the swap
file can help avoid it. However, sometimes error 143 still occurs. To prevent
confusion, let's capture error 143 and allow the CI to pass.
2025-05-14 11:09:08 +08:00
James Ring and GitHub
70b35f9e60
Check for WASM_ENABLE_SIMDE in a couple more places ( #4266 )
...
For WAMR users who don't use cmake, it's possible that WASM_ENABLE_SIMD
is set when WASM_ENABLE_SIMDE isn't. This was causing build failures.
2025-05-14 10:58:19 +08:00