FYI, once https://github.com/dotnet/runtimelab/pull/2614 is ready and merged, the NativeAOT-LLVM toolchain will target WASIp2 directly and therefore generate components itself, meaning there's no need to run wasm-tools component new afterward.
This has been an interesting exercise, since it's pretty much the first toolchain to use WASI-SDK's wasm32-wasip2 target in a non-trivial way, which has required patching a few things up here and there. The upshot is that .NET is helping pave the way for really good WASIp2 support in the next WASI-SDK release, which should make the transition easier for other languages and tools (e.g. CPython).
will need to update the componentize-dotnet to skip that step if on .net 9?
I think we'll want componentize-dotnet to skip it no matter what. Although I'm a bit fuzzy on the relationship between the dotnet you build with and the <PackageReference Include="runtime.linux-arm64.Microsoft.DotNet.ILCompiler.LLVM" Version="9.0.0-*"> package reference. Can you use the ILC version 9.0.0-* with a dotnet earlier than 9? Does any of this work with dotnet 8?
yes, this should all work with dotnet 8, if there are breaking changes, which I don't think dotnet does much, if it all, then it could cause a problem, e.g. you compiled against an API that you thought did "A", but we compiled against the same API that was changed to do "B".
I don't think that happens though
Makes sense. I think that (once my PR is merged) runtime.linux-arm64.Microsoft.DotNet.ILCompiler.LLVM will create a component regardless of whether it's used with dotnet 8 or 9, so componentize-dotnet should not try to use wasm-tools component new in any case.
Will we still need to adapt the component to point at cli, reactor and proxy adapters? Or does that get built in automatically after the pr linked?
wasm-component-ld (which now ships as part of WASI-SDK) takes care of that, so yeah, it will happen automatically.
cool! Do potentially wanto still include wasmtools binary in componetize-dotnet for things like https://github.com/dicej/dotnet9-wasi-http-example/blob/1941836215e0301ccf7738c9008ae29d0f0d143b/build.sh#L20? Is it common or maybe improtant to run a strip on release builds?
Stripping can definitely reduce the size of the component, which is nice, but I don't think that needs to be a built-in feature of componentize-dotnet necessarily.
Having the binary there makes it easy to add an addtioinal step, I might keep it there and document how you would extend your build to do that type of thing
I opened https://github.com/bytecodealliance/componentize-dotnet/issues/26 to track this update to compontize-dotnet
Last updated: Dec 06 2025 at 06:05 UTC