alexcrichton opened PR #8138 from alexcrichton:serve-common-on-by-default to bytecodealliance:main:
This commit enables more WASI interfaces by default with
wasmtime serve, notably through the use of the-Scommonflag. This means that the interfaces supported bywasmtime serveare the same aswasmtime runby default.To fully implement this there's a number of refactorings here:
More flags like
--dirand--envare moved intoRunCommonto be shared betweenwasmtime serveandwasmtime run, meaning that theservecommand can now configure environment variables.A small test has been added as well as infrastructure for running tests with
wasmtime serveitself. Previously there were no tests that executedwasmtime serve.The
test_programscrate had a small refactoring to avoid double-generation of http bindings.Closes #8086
<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
alexcrichton requested fitzgen for a review on PR #8138.
alexcrichton requested wasmtime-core-reviewers for a review on PR #8138.
tschneidereit commented on PR #8138:
Thank you for doing this, and fully aligning it with
runwhile you were at it! :heart:
fitzgen requested sunfishcode for a review on PR #8138.
alexcrichton closed without merge PR #8138.
alexcrichton commented on PR #8138:
I've extracted refactorings here to https://github.com/bytecodealliance/wasmtime/pull/8279 and will leave the question of defaults to https://github.com/bytecodealliance/wasmtime/issues/8086
Last updated: Dec 13 2025 at 21:03 UTC