Skip to content

feat: standalone CMake build against a released WasmEdge SDK #24

Description

@0yi0

Part of the C++ plugin migration (upstream: WasmEdge/WasmEdge#3840). Depends on the source import (see Relationships).

In the core repo, plugins build via in-tree CMake infrastructure (wasmedge_add_library, wasmedge_add_executable, WASMEDGE_PLUGIN_* options, in-tree include paths). Make them build standalone against an installed WasmEdge release — currently 0.17.0 — so plugin maintainers never track unreleased master.

  • Top-level CMakeLists.txt with one WASMEDGE_PLUGIN_<NAME> option per plugin, all OFF by default (build only what you ask for — keeps the CI matrix per-plugin).
  • cmake/ helpers to locate the WasmEdge SDK: honor WASMEDGE_INCLUDE_DIR / WASMEDGE_LIB_DIR hints, with an optional fallback that fetches the official release tarball for the pinned version.
  • Port the helper functions the plugin CMakeLists rely on (wasmedge_add_library, wasmedge_add_executable, wasmedge_setup_target, …) into cmake/Helper.cmake with the in-tree assumptions removed.
  • Port the test scaffolding (gtest setup from test/plugins/CMakeLists.txt) so plugin test suites can build.
  • When porting test/plugins/CMakeLists.txt, drop or disable its unconditional add_subdirectory(wasi_logging): the test references target wasmedgePluginWasiLogging, which was not imported — upstream builds wasi_logging as a temporary built-in from lib/plugin/wasi_logging + include/plugin/wasi_logging, outside the import scope of feat: import plugin sources and tests from WasmEdge core with git history #23. Keep it disabled until that target exists here (or the matching sources are imported). Found in review: feat: import plugin sources, tests, and CI utils from WasmEdge core #44 (comment)
  • Pin the minimum WasmEdge version in one place and document the upgrade policy in README: plugins sync to new WasmEdge APIs only when WasmEdge cuts a release.
  • Acceptance: cmake -GNinja -Bbuild -DWASMEDGE_PLUGIN_ZLIB=ON && cmake --build build configures and compiles the zlib plugin against the installed 0.17.0 SDK on Linux. (Full pilot — tests + CI — is the follow-up pilot issue.)

🤖 Generated by Claude Fable 5 with Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestmigrationWasmEdge/WasmEdge#3840 plugin migration

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions