Stream: wasi

Topic: ✔ wasm32-wasip2 component size


view this post on Zulip Yoshua Wuyts (Sep 04 2024 at 16:44):

Heya, I just recompiled my sample project using the new beta wasm32-wasip2 Rust target. I was expecting the size of it to drop compared to the wasm32-wasip1 target with the shim, but somewhat counter-intuitively it hasn't?

view this post on Zulip Yoshua Wuyts (Sep 04 2024 at 16:45):

I'm not sure what my question here is, heh. I guess I was expecting the final size to shrink because we're no longer compiling interfaces twice + translating between them - but it seems like that might not be the case?

view this post on Zulip Yoshua Wuyts (Sep 04 2024 at 16:47):

(not that I think code size is a particularly important metric - but figured I'd still mention it?)

view this post on Zulip Joel Dice (Sep 04 2024 at 16:59):

wasm32-wasip2 still generally relies on the shim (wasm-component-ld has built-in copies of each shim variant), and will continue to until wasi-libc is fully ported to use WASIp2 natively. Currently it only uses WASIp2 for socket support, and WASIp1 for everything else, hence the need for the shim.

view this post on Zulip Yoshua Wuyts (Sep 04 2024 at 16:59):

ohhh, I see!

view this post on Zulip Yoshua Wuyts (Sep 04 2024 at 16:59):

okay that makes sense to me

view this post on Zulip Yoshua Wuyts (Sep 04 2024 at 17:00):

ty!

view this post on Zulip Notification Bot (Sep 04 2024 at 17:00):

Yoshua Wuyts has marked this topic as resolved.

view this post on Zulip Jeff Parsons (Sep 04 2024 at 22:17):

Not sure about the etiquette around posting on "resolved" "topics", but...

Wasip2 networking support is pretty close to landing, so I assume this will change soon: https://github.com/rust-lang/rust/pull/129638

One of the improvements of the wasm32-wasip2 target over wasm32-wasip1 is better support for networking. Right now, p2 is just re-using the std::net implementation from p1. This PR adds a new net m...

Last updated: Dec 23 2024 at 13:07 UTC