Stream: web-preview

Topic: Rust target


view this post on Zulip Alex Crichton (Nov 13 2026 at 18:21):

I've sent https://github.com/rust-lang/rust/pull/165932 for rust-lang/rust, but https://github.com/rust-lang/libc/pull/5733 is needed as well. In the meantime though locally I've got "hello world" compiling to a component which imports all the right interfaces

view this post on Zulip Ben Visness (Nov 13 2026 at 19:28):

Nice!

view this post on Zulip Ben Visness (Nov 13 2026 at 19:28):

What's the process for updating things as we make revisions to wasi-libc?

view this post on Zulip Alex Crichton (Nov 13 2026 at 19:31):

do you mean like fill out preexisting APIs with a new implementation or add new APIs which want to be used in rust-lang/rust?

view this post on Zulip Alex Crichton (Nov 13 2026 at 19:31):

or like bugfixes?

view this post on Zulip Ben Visness (Nov 13 2026 at 19:31):

Mostly I'm thinking bugfixes or changes to bindings

view this post on Zulip Alex Crichton (Nov 13 2026 at 19:32):

  1. land changes in wasi-libc
  2. update wasi-sdk
  3. make a wasi-sdk release

and I suppose that's it

view this post on Zulip Alex Crichton (Nov 13 2026 at 19:32):

aka "make a new wasi-sdk"

view this post on Zulip Alex Crichton (Nov 13 2026 at 19:33):

being a -Zbuild-std target it means that rust-lang/rust doesn't need any updates, users just need to make sure they're using an up-to-date toolchain to pull in the right libc

view this post on Zulip Ben Visness (Nov 13 2026 at 19:45):

is wasi-sdk somehow downloaded by rustup or something?

view this post on Zulip Alex Crichton (Nov 13 2026 at 20:07):

No it's a manual download everyone has to do

view this post on Zulip Alex Crichton (Nov 13 2026 at 20:08):

the wasm32-wasip2 target, for example though, will bundle libc.a detected at build-time (e.g. in rust-lang/rust's CI), and that grace is not given to wasm32-webp2 as it's a tier 3 target at this time

view this post on Zulip Alex Crichton (Nov 13 2026 at 20:08):

(no binaries provided)

view this post on Zulip Ben Visness (Nov 13 2026 at 20:30):

hm so Rust users are going to have to install wasi-sdk just like C/C++ users?

view this post on Zulip Ben Visness (Nov 13 2026 at 20:31):

or do they just need the sysroot or something?

view this post on Zulip Alex Crichton (Nov 13 2026 at 20:31):

technically just the sysroot, but it's easier to just download wasi-sdk

view this post on Zulip Alex Crichton (Nov 13 2026 at 20:32):

the requirement will go away once the target is tier 2 in rust

view this post on Zulip Ben Visness (Nov 13 2026 at 20:34):

what parts of wasi-sdk is Rust actually using then? is it just libraries or also the tools (e.g. wasm-component-ld)? Because the sysroot doesn't include the tools, right?

view this post on Zulip Alex Crichton (Nov 13 2026 at 20:35):

just libc.a basically, the rust wasm32-wasip3 target vendors the libc.a from the wasi-sdk sysroot

view this post on Zulip Alex Crichton (Nov 13 2026 at 20:35):

rust builds its own version of wasm-component-ld which is manually kept in sync and/or up-to-date


Last updated: Nov 19 2026 at 20:05 UTC