Stream: git-wasmtime

Topic: wasmtime / PR #13157 Improve c-api behavior when used as ...


view this post on Zulip Wasmtime GitHub notifications bot (Apr 21 2026 at 00:47):

lethalbit opened PR #13157 from lethalbit:aki/wasmtime-cmake-noinstall to bytecodealliance:main:

Hey it's me again!

I expect a bit of deliberation on this as it changes some default behaviour, and could likely be massaged a bit to be a bit better in a way that I'm likely not thinking of, but here's the gist.

This PR adds one new CMake option and changes the default behavior when being used as a subproject.

First, off, the WASMTIME_ALWAYS_INSTALL option was added, to override the new behavior and keep it working like it was previously.

Next, we check to see if the wasmtime cmake project is being used as a subproject (e.g. it was loaded up with add_subdirectory) if so, then we disable the installation of the headers and static library artifacts. However if BUILD_SHARED_LIBS is enabled, even as a subproject we always install the shared object artifact. If WASMTIME_ALWAYS_INSTALL is set, then regardless we install everything as before.

If keeping old behaviour as a default is prefered, then it would be easy enough to flip things around and rename WASMTIME_ALWAYS_INSTALL and have it turn-off installing things when being used as a subproject. I know changing defaults out from under people is not very nice, but my personal opinion on this is that this is generally how well-behaved subprojects are expected to act anyway.

Either way, look forward to your feedback and thoughts!

view this post on Zulip Wasmtime GitHub notifications bot (Apr 21 2026 at 00:47):

lethalbit requested alexcrichton for a review on PR #13157.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 21 2026 at 00:47):

lethalbit requested wasmtime-core-reviewers for a review on PR #13157.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 21 2026 at 05:32):

github-actions[bot] added the label wasmtime:c-api on PR #13157.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 21 2026 at 14:46):

alexcrichton submitted PR review:

Seems reasonable to me, thanks!

view this post on Zulip Wasmtime GitHub notifications bot (Apr 21 2026 at 14:46):

alexcrichton added PR #13157 Improve c-api behavior when used as a CMake subproject to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 21 2026 at 15:17):

alexcrichton merged PR #13157.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 21 2026 at 15:17):

alexcrichton removed PR #13157 Improve c-api behavior when used as a CMake subproject from the merge queue.


Last updated: May 03 2026 at 22:13 UTC