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

Support dirs/env vars in wasmtime serve #8279

Merged

Conversation

alexcrichton
Copy link
Member

  • 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.

* 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.
@alexcrichton alexcrichton requested a review from a team as a code owner April 1, 2024 23:47
@alexcrichton alexcrichton requested review from fitzgen and removed request for a team April 1, 2024 23:47
@fitzgen
Copy link
Member

fitzgen commented Apr 2, 2024

Did we resolve the discussion in #8086 about whether we actually want to do this kind of thing or not?

@alexcrichton
Copy link
Member Author

As #8086 is just about the default. This PR doesn't change the defaults, it just enables -Scli to be somewhat useful on wasmtime serve as previously you couldn't configure environment variables, preopens, etc.

@fitzgen
Copy link
Member

fitzgen commented Apr 2, 2024

Ah okay, gotcha. Taking a look now.

Copy link
Member

@fitzgen fitzgen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@fitzgen fitzgen added this pull request to the merge queue Apr 2, 2024
Merged via the queue into bytecodealliance:main with commit 8267095 Apr 2, 2024
19 checks passed
@alexcrichton alexcrichton deleted the serve-support-more-flags branch April 2, 2024 18:36
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.

2 participants