Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable -Scommon by default for wasmtime serve #8138

Conversation

alexcrichton
Copy link
Member

This commit enables more WASI interfaces by default with wasmtime serve, notably through the use of the -Scommon flag. This means that the interfaces supported by wasmtime serve are the same as wasmtime run by default.

To fully implement this there's a number of refactorings here:

  • More flags like --dir and --env are moved into RunCommon to be shared between wasmtime serve and wasmtime run, meaning that the serve command can now configure environment variables.

  • A small test has been added as well as infrastructure for running tests with wasmtime serve itself. Previously there were no tests that executed wasmtime serve.

  • The test_programs crate had a small refactoring to avoid double-generation of http bindings.

Closes #8086

This commit enables more WASI interfaces by default with `wasmtime
serve`, notably through the use of the `-Scommon` flag. This means that
the interfaces supported by `wasmtime serve` are the same as `wasmtime
run` by default.

To fully implement this there's a number of refactorings here:

* More flags like `--dir` and `--env` are moved into `RunCommon` to be
  shared between `wasmtime serve` and `wasmtime run`, meaning that the
  `serve` command can now configure environment variables.

* A small test has been added as well as infrastructure for running
  tests with `wasmtime serve` itself. Previously there were no tests
  that executed `wasmtime serve`.

* The `test_programs` crate had a small refactoring to avoid
  double-generation of http bindings.

Closes bytecodealliance#8086
@alexcrichton alexcrichton requested a review from a team as a code owner March 14, 2024 20:32
@alexcrichton alexcrichton requested review from fitzgen and removed request for a team March 14, 2024 20:32
@tschneidereit
Copy link
Member

Thank you for doing this, and fully aligning it with run while you were at it! ❤️

@fitzgen fitzgen requested review from sunfishcode and removed request for fitzgen March 18, 2024 18:50
alexcrichton added a commit to bytecodealliance/meetings that referenced this pull request Mar 25, 2024
@alexcrichton
Copy link
Member Author

I've extracted refactorings here to #8279 and will leave the question of defaults to #8086

@alexcrichton alexcrichton deleted the serve-common-on-by-default branch April 1, 2024 23:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change wasmtime serve to apply -S common by default
2 participants