feat: import plugin sources, tests, and CI utils from WasmEdge core#44
Conversation
Signed-off-by: vincent <vincent@secondstate.io>
Use -DWASMEDGE_PLUGIN_WASI_NN_RUST_MODEL=squeezenet or whisper for switch plugin model Signed-off-by: vincent <vincent@secondstate.io>
* update hostfunc's fromTuple to update Span of ValInterface * add emplace helper * fix `Wit` type converter, it still convert `vector` rather than `List` Signed-off-by: Lîm Tsú-thuàn <dannypsnl@secondstate.io>
Signed-off-by: Lîm Tsú-thuàn <dannypsnl@secondstate.io>
Signed-off-by: grorge <g97116@yahoo.com>
Signed-off-by: grorge <g97116@yahoo.com>
Signed-off-by: grorge <g97116@yahoo.com>
Signed-off-by: grorge <g97116@yahoo.com>
Signed-off-by: grorge <g97116@yahoo.com>
Signed-off-by: vincent <vincent@secondstate.io>
Signed-off-by: YiYing He <yiying@secondstate.io>
Signed-off-by: YiYing He <yiying@secondstate.io>
Signed-off-by: Shen-Ta Hsieh <ibmibmibm.tw@gmail.com>
Signed-off-by: grorge <g97116@yahoo.com>
Signed-off-by: hydai <z54981220@gmail.com>
Signed-off-by: grorge <g97116@yahoo.com>
* update piper patch to support static linking piper-phonemize and espeak-ng and support using system onnxruntime Signed-off-by: PeterD1524 <qaz246135@gmail.com> * force BUILD_SHARED_LIBS OFF and CMAKE_POSITION_INDEPENDENT_CODE ON for piper Signed-off-by: PeterD1524 <qaz246135@gmail.com> * avoid unwanted targets from piper Signed-off-by: PeterD1524 <qaz246135@gmail.com> * add onnxruntime install script Signed-off-by: PeterD1524 <qaz246135@gmail.com> * update piper patch to use PRIVATE scope for target-specific commands to avoid include and link pollution Signed-off-by: PeterD1524 <qaz246135@gmail.com> * add clean include directory for piper disable tests for piper_phonemize use normal variable instead of CACHE for piper FetchContent Signed-off-by: PeterD1524 <qaz246135@gmail.com> * remove unnecessary target_include_directories Signed-off-by: PeterD1524 <qaz246135@gmail.com> * install onnxruntime in workflow Signed-off-by: PeterD1524 <qaz246135@gmail.com> * remove the `-ubuntu` suffix because this should also be used in the manylinux(CentOS) distributions Signed-off-by: PeterD1524 <qaz246135@gmail.com> * remove redundant lines will be done later by `wasmedge_setup_wasinn_target(wasmedgePluginWasiNN)` Signed-off-by: PeterD1524 <qaz246135@gmail.com> * find onnxruntime early and fail if not found Signed-off-by: PeterD1524 <qaz246135@gmail.com> --------- Signed-off-by: PeterD1524 <qaz246135@gmail.com>
Signed-off-by: grorge <g97116@yahoo.com>
Signed-off-by: grorge <g97116@yahoo.com>
Signed-off-by: dm4 <dm4@secondstate.io>
Signed-off-by: hydai <z54981220@gmail.com>
…NN Piper CI (#3622) * install onnxruntime in manylinux_2_28-plugins-deps for WASI-NN Piper CI Signed-off-by: PeterD1524 <qaz246135@gmail.com> * update utils/wasi-nn/install-onnxruntime.sh to support both x86_64 and aarch64 Signed-off-by: PeterD1524 <qaz246135@gmail.com> --------- Signed-off-by: PeterD1524 <qaz246135@gmail.com>
* enable wasi_nn-piper build for manylinux_2_28_x86_64 Signed-off-by: PeterD1524 <qaz246135@gmail.com> * update piper patch to allow passing CMAKE_POSITION_INDEPENDENT_CODE to espeak-ng It worked on ubuntu before because gcc on ubuntu (wasmedge/wasmedge:ubuntu-build-gcc) is configured with --enable-default-pie. This will turn R_X86_64_32S into R_X86_64_PC32. gcc on wasmedge/wasmedge:manylinux_2_28_x86_64-plugins-deps is not configured with --enable-default-pie, so the error `libespeak-ng.a(case.c.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC` will occur. The configuration of gcc can be obtained by running `gcc -v`. As a result, passing CMAKE_POSITION_INDEPENDENT_CODE=ON to espeak-ng to compile with -fPIC is required. Some references: https://stackoverflow.com/a/46493456 https://stackoverflow.com/a/6093910 https://www.ucw.cz/~hubicka/papers/abi/node19.html Signed-off-by: PeterD1524 <qaz246135@gmail.com> * enable wasi_nn-piper build for manylinux_2_28_aarch64 Signed-off-by: PeterD1524 <qaz246135@gmail.com> --------- Signed-off-by: PeterD1524 <qaz246135@gmail.com>
Signed-off-by: grorge <g97116@yahoo.com>
Signed-off-by: YiYing He <yiying@secondstate.io>
Signed-off-by: YiYing He <yiying@secondstate.io>
Signed-off-by: Lîm Tsú-thuàn <dannypsnl@secondstate.io>
Signed-off-by: Lîm Tsú-thuàn <dannypsnl@secondstate.io>
Signed-off-by: dm4 <dm4@secondstate.io>
…nd spdlog Signed-off-by: PeterD1524 <qaz246135@gmail.com>
feat(wasi-nn): support HIP backend for llama.cpp Signed-off-by: Khushi <khushisingh82072@gmail.com>
…ckend (#4622) Signed-off-by: Divyansh Khatri <divyanshkhatri200102@gmail.com>
…4634) fix: install espeak-ng-data for Piper backend tests in CI Signed-off-by: Divyansh Khatri <divyanshkhatri200102@gmail.com>
… changes (#4443) feat(wasi-nn): upgrade Piper backend to use new upstream Signed-off-by: Divyansh Khatri <divyanshkhatri200102@gmail.com>
* fix(plugin): correct timeout unit conversion in process plugin The timeout calculation divided microseconds by 1000000 (converting to seconds) instead of 1000 (converting to milliseconds). Since the seconds part is already multiplied by 1000 to convert to milliseconds, the microseconds part should also be in milliseconds. This gave the timeout only second-level granularity instead of the intended millisecond-level granularity, making sub-second timeouts effectively zero. Signed-off-by: Yi LIU <yi@quantstamp.com> * test(plugin): add process plugin timeout precision test Signed-off-by: Yi LIU <yi@quantstamp.com> --------- Signed-off-by: Yi LIU <yi@quantstamp.com>
Signed-off-by: YiYing He <yiying@secondstate.io>
Assisted-by: Codex (OpenAI) Signed-off-by: grorge <g97116@yahoo.com>
Signed-off-by: grorge <g97116@yahoo.com>
chore: fix some minor issues Signed-off-by: purelualight <purelualight@outlook.com>
Assisted-by: OpenAI Codex (GPT-5.5) Signed-off-by: hydai <z54981220@gmail.com> Co-authored-by: YiYing He <yiying@secondstate.io>
…n (#4910) Signed-off-by: Pranjal Kole <pranjal.kole7@gmail.com>
… (#4913) Signed-off-by: Pranjal Kole <pranjal.kole7@gmail.com>
Signed-off-by: hydai <z54981220@gmail.com>
…s (#4923) imdecode/imshow/imwrite/imencode fetched the input buffer with getPointer<char*>, which only validates one byte, then read a guest-controlled length past it (host out-of-bounds read). Switch to getSpan<char>(Ptr, Len) and reject a short span, matching the output-buffer check already present in imencode. Signed-off-by: aizu-m <aizumusheer2@gmail.com>
WasiNNSetInput already retrieves the tensor data through Tensor.Tensor before constructing the RPC request. This change reuses that existing span when calling RPCTensor.set_data() instead of retrieving the pointer and length again from WasiTensor. The behavior for valid inputs remains unchanged. Signed-off-by: Yashika <ssyashika1311@gmail.com>
Signed-off-by: vishal2005025 <vishalmalyan2005@gmail.com>
…776) * feat(wasi_crypto): implement managed keypair generation for EDDSA - Implemented keypairGenerateManaged for EDDSA algorithms in ctx.cpp. - Added comprehensive positive and negative tests in asymmetric.cpp. - Integrated NOT_IMPLEMENTED verification for unsupported algorithms. - Updated notimplement.cpp to reflect the new implementation. - Removed unrelated formatting and typo fixes to minimize PR noise. Signed-off-by: ShigrafS <shigrafsalik@proton.me> * fix(test): resolve type mismatch in managed keypair generation test - Use std::optional<__wasi_options_t> instead of __wasi_opt_options_t to match helper function signature. - Pass InvaildHandle directly as an optional value. Signed-off-by: ShigrafS <shigrafsalik@proton.me> * style(wasi_crypto): format code using clang-format-20 Signed-off-by: SHIGRAF SALIK <140247389+ShigrafS@users.noreply.github.com> * test(wasi_crypto): refactor managed keypair tests to follow project patterns - Define ManagedNegativeCheck lambda for data-driven negative testing. - Integrate managed keypair negative tests into the main Asymmetric suite. - Replace manual EXPECT_EQ with WASI_CRYPTO_EXPECT_FAILURE macro in notimplement.cpp. Assisted-by: Gemini (Google) Signed-off-by: ShigrafS <shigrafsalik@proton.me> --------- Signed-off-by: ShigrafS <shigrafsalik@proton.me> Signed-off-by: SHIGRAF SALIK <140247389+ShigrafS@users.noreply.github.com>
Rename the constructor parameters that shadowed the inherited Env member to HostEnv, in both the HostFunction base and its subclasses. Assisted-by: Claude (Anthropic) Signed-off-by: hydai <z54981220@gmail.com>
Rename parameters and locals that shadowed members, types, or outer-scope bindings across the MLX base module, embedding, linear, and pooling layers, the whisper tokenizer and decoder, and the VLM cache, and give the pooling constructor parameters semantic names. Assisted-by: Claude (Anthropic) Signed-off-by: hydai <z54981220@gmail.com>
Implement Eddsa::PublicKey::verify() using EVP_PKEY_public_check. Part of #2669. Signed-off-by: Parth Dagia <parth.24bcs10414@sst.scaler.com>
Check results and options (maintainer decision needed)(revised after reviewing the DCO app's documented mechanisms) DCO — 95/623 flaggedRoot cause: upstream squash-merges rewrite the commit author to the contributor's GitHub noreply identity while the Options, in increasing order of formality:
Lint — clang-format only (commitlint passed)Violations are confined to Options:
Merge mechanicsBoth options below produce linear history with no merge commit, and both end with GitHub marking this PR merged (a fast-forward push to
RecommendationDCO option 1 (override button) + Lint option 1 (config follow-up) + Merge option 1 (CLI fast-forward) to preserve the reviewed SHAs. DCO option 2 is the right choice instead if an in-history certification record is preferred over check metadata. 🤖 Generated by Claude Fable 5 with Claude Code |
Review FindingsMedium:
|
|
Re: review findings — both verified, and tracked per the suggested resolution (import fidelity kept; no change to this branch). Medium —
Resolution: tracked as a checklist item in #24 (the issue that ports Low — bash The PR description's Non-goals / afterwards section now records both findings and where they're tracked. 🤖 Generated by Claude Fable 5 with Claude Code |
Resolution summary (post-merge record)Merged 2026-06-12 by CLI fast-forward. How each option set from the options comment resolved:
All leftovers from this PR, plus an import-guidelines doc capturing the verified recipe end-to-end, are consolidated in #45. 🤖 Generated by Claude Fable 5 with Claude Code |
PR summary
Implements #23 (epic #22; upstream WasmEdge/WasmEdge#3840): imports the C++ plugin sources, their tests, and plugin-related CI utilities from WasmEdge/WasmEdge with git history, rebased linearly onto
main— no merge commit required.Implementation design
d67087e(2026-06-11)git filter-repoover:plugins,test/plugins,thirdparty/wasi_crypto,utils/docker,utils/ffmpeg,utils/opencvmini,utils/wasi-crypto,utils/wasi-nn,utils/wasi-test,utils/build_libpiper.sh→ 623 commits, 0 merges (linear)git rebase --onto main --root --empty=drop --committer-date-is-author-date: replays all 623 commits onto main — original authors, dates, messages, and DCO sign-offs preserved; committer rewritten (rebase semantics); every replayed tree keeps main's existing filesimport/wasmedge-masterDesign decisions
git push origin import/wasmedge-master:main) — preserves reviewed SHAs and auto-marks this PR merged. The "Rebase and merge" button also works but rewrites all 623 SHAs againplugins/restructure — e.g.plugins/wasi_cryptocarries 34 commits; earlier history remains reachable upstream. Same precedent as the 2024 import (feat: Initialization #1)git blamecontinuityCommit slicing
No authored commits — this PR is exactly the 623 filtered upstream commits replayed onto main. Follow-ups land in separate PRs (#24 build system, #25 pilot).
Test plan
(no build/test execution — imported sources are not expected to build standalone yet; that is #24)
plugins/(15 plugins) +test/plugins/+thirdparty/wasi_crypto+ selectedutils/— 493 files, none outside expected pathsgit rev-list --count main..HEAD= 623; root commit's parent = main headfd798bcgit log --oneline -- plugins/wasi_crypto | wc -l= 34;git blame plugins/wasi_crypto/ctx.hshows original upstream authorsgrorge→Han-Wen Tsao). Not introduced by this import; see options in the PR comment belowthirdparty/wasi_crypto/api.hpp(generated from witx),test/plugins/wasm_bpf/assets/bpf-sources/(test fixtures),test/plugins/wasi_crypto/asymmetric.cpp— paths upstream does not format-enforce, plus probable clang-format version drift. commitlint did not flag — the predicted risk did not materializeNon-goals / afterwards
WASMEDGE_PLUGIN_*wiring → feat: standalone CMake build against a released WasmEdge SDK #24; tests + CI → feat: pilot migration: wasmedge_zlib end-to-end (build, tests, CI) #25 and per-plugin issues; README plugin table → feat: pilot migration: wasmedge_zlib end-to-end (build, tests, CI) #25test/plugins/wasi_loggingis imported without itswasmedgePluginWasiLoggingtarget — upstream builds wasi_logging as a built-in fromlib/plugin/wasi_logging+include/plugin/wasi_logging, outside this import's scope; feat: standalone CMake build against a released WasmEdge SDK #24 must keep that test dir disabled until the target exists. Broken bash[[ ! -v "${VAR}" ]]checks inutils/wasi-nn/*.sh→ fix tracked in feat: migrate wasi_nn #31VALIDATE_GIT_COMMITLINTmay fail on historical upstream commit subjects. Options: tolerate red Lint on this PR, or temporarily setVALIDATE_GIT_COMMITLINT: false. Decision deferred to reviewCloses #23
🤖 Generated by Claude Fable 5 with Claude Code