Trim wasmtime serve
's default world
#7597
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit aims to address a discrepancy in Wasmtime where the world supported by
wasmtime serve
is too large today. This includes WIT interfaces which are not specified inwasi:http/proxy
such aswasi:filesystem/types
, aka access to a filesystem.This commit slims down
wasmtime serve
to, by default, only supporting thewasi:http/proxy
world. Like withwasmtime run
various CLI flags can be passed to enable more interfaces, however:-Scommon
- this enables "common" interfaces such aswasi:filesystem
,wasi:sockets
, andwasi:cli/*
.-Snn
- this enables wasi-nnIt's expected that more will get extended here over time too.
This change is enabled by a third build of the adapter, a "proxy" mode. In this mode most functions are cfg'd to return
ERRNO_NOTSUP
to indicate that the runtime does not support it. Notably this includes the filesystem, arguments, and environment variables.This change is tested by updating all
api_proxy*
tests to use this new adapter which is now required that many previous interfaces are no longer present by default in the proxy world.