Skip to content

Bump Wasmtime to v48.0.0 prerelease - #3653

Draft
spinframeworkbot wants to merge 8 commits into
mainfrom
bump-wasmtime/prerelease-48.0.0
Draft

Bump Wasmtime to v48.0.0 prerelease#3653
spinframeworkbot wants to merge 8 commits into
mainfrom
bump-wasmtime/prerelease-48.0.0

Conversation

@spinframeworkbot

Copy link
Copy Markdown
Collaborator

Bumps Wasmtime to v48.0.0 prerelease

spinframeworkbot and others added 3 commits August 5, 2026 12:33
Signed-off-by: spinframeworkbot <202838904+spinframeworkbot@users.noreply.github.com>
Signed-off-by: itowlson <ivan.towlson@fermyon.com>
Signed-off-by: itowlson <ivan.towlson@fermyon.com>
@itowlson

itowlson commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

I bumped it to 1.95 and fixed up the low-hanging fruit around filesystem permissions, but there's a big pile of errors around changes to the sockets API that I don't know how to start on.

Comment thread tests/manual/pg-ssl-root-certs/Cargo.toml Outdated
Comment thread examples/open-ai-rust/Cargo.toml Outdated
Signed-off-by: itowlson <ivan.towlson@fermyon.com>
Signed-off-by: itowlson <ivan.towlson@fermyon.com>
Signed-off-by: itowlson <ivan.towlson@fermyon.com>
@itowlson

itowlson commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

I updated the SocketAddrUse stuff based on bytecodealliance/wasmtime#13934, but it needs someone to check it because I am somewhat guessing!

A lot of the upstream sockets stuff has changed from sync to async or from async to sync. For some of it I was able to propagate the change without obvious problems, but there are some cases (I think all implementing RCs) where we are constrained by a sync trait but the underlying API is now async, and my usual kludges for bridging over that feel ill-advised. So @alexcrichton or @dicej I think I am going to need to punt those to you - sorry.

@dicej

dicej commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Thanks for getting this going, @itowlson! I'm addressing the remaining issues and will push an update.

@dicej
dicej force-pushed the bump-wasmtime/prerelease-48.0.0 branch from 2082111 to 7b728be Compare August 7, 2026 14:35
ctx: PrepareContext<T, Self>,
) -> anyhow::Result<InstanceBuilder> {
let mut wasi_ctx = WasiCtxBuilder::new();
wasi_ctx.allow_tcp(true).allow_udp(true);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

One thing on this -- this probably only wants to happen if sockets/addresses are otherwise allowed for this component. Otherwise this is technically a vector by which guests can create fds on the host and may cause minor issues. Would it be possible to make these conditional based on other settings? Or are guests expected to always be able to create a socket and outgoing connections?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Should be possible to extend OutboundAllowedHosts with a "is this protocol ever allowed" method.

Comment on lines -43 to +42
let trap = err
.root_cause() // The error returned is a backtrace. We need the root cause.
.downcast_ref::<I32Exit>()
.expect("trap error was not an I32Exit");
assert_eq!(trap.0, 1);
assert!(format!("{err:?}").contains("command failed"))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This looks a bit suspect to me, is I32Exit no longer showing up? If so that might be a bug

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I've gone back as far as Spin v3.6.0 and Rust 1.90 (and various versions in between), and this test is failing in that version and every version since (and possibly earlier). I have no idea how CI has been green all that time.

This came up during the Wasmtime 46 upgrade as well, but I wrote it off because it only seemed to be happening on my machine and not on CI. Now it's happening in both places, and I can't tell what changed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ah ok if this is just a historical thing then that's fine yeah, I mostly just wasn't aware of anything in 48.0.0 that would have affected this

@dicej dicej Aug 14, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think this could be related to the version of Rust used to build the Wasm code (and consquently the version of WASI-SDK used?) which could influence whether an error exit means returning an err from wasi:cli/run vs. calling wasi:cli/exit{_with_code}, but I haven't had a chance to confirm.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If the above is correct, then probably the best thing to do here is look for an I32Exit or a "command failed", since either could be valid depending on how the component was built.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ah yeah I wouldn't worry much about this, it's definitely unrelated to the 47->48 update which is all I wanted to bottom out

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.

6 participants