-
Notifications
You must be signed in to change notification settings - Fork 261
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
Update Wasmtime to 20.0.2 #2512
Conversation
279fe6d
to
36f0a0b
Compare
@@ -21,7 +21,7 @@ concurrency: | |||
|
|||
env: | |||
CARGO_TERM_COLOR: always | |||
RUST_VERSION: 1.74 | |||
RUST_VERSION: 1.75 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should bump the MSRV in Cargo.toml if this is now needed.
36f0a0b
to
c247b69
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - some small observations, but nothing that should block merging this.
wasi_builder: impl FnOnce(WasiCtxBuilder) -> WasiCtxBuilder, | ||
) -> Store<Context> { | ||
wasi_builder: impl FnOnce(&mut WasiCtxBuilder) -> Result<()>, | ||
) -> Result<Store<Context>> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems we unwrap this result in the caller. Perhaps we should just keep this infallible and unwrap (or better yet expect
) in the closures?
crates/trigger-http/src/lib.rs
Outdated
@@ -715,7 +723,9 @@ impl OutboundWasiHttpHandler for HttpRuntimeData { | |||
"self".into() | |||
}; | |||
eprintln!("To allow requests, add 'allowed_outbound_hosts = [\"{}\"]' to the manifest component section.", host); | |||
anyhow::bail!("destination-not-allowed (error 1)") | |||
return Err(HttpError::trap(anyhow::anyhow!( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I realize we were trapping before, but I do wonder if we should be returning HTTP-request-denied
instead.
This commit updates the Wasmtime version used by Spin from 18.0.4 to 20.0.2. No motivation beyond keeping things up-to-date. This involved a number of minor WASI refactorings such as moving some items around and some refactorings around the `wasmtime-wasi-http` traits-and-types. Notably the chained handler was switched from `anyhow::Result` to `wasmtime_wasi_http::HttpResult` which helps make more explicit which errors are traps and which are normal error codes. Also update the MSRV of Spin to 1.75 as that's what Wasmtime requires Signed-off-by: Alex Crichton <[email protected]>
e0a582c
to
f973c6d
Compare
This commit updates the Wasmtime version used by Spin from 18.0.4 to 20.0.2. No motivation beyond keeping things up-to-date. This involved a number of minor WASI refactorings such as moving some items around and some refactorings around the
wasmtime-wasi-http
traits-and-types. Notably the chained handler was switched fromanyhow::Result
towasmtime_wasi_http::HttpResult
which helps make more explicit which errors are traps and which are normal error codes.