Picking up on CLI virtualization conversation from https://bytecodealliance.zulipchat.com/#narrow/stream/409526-jco/topic/Flattening.20components
I'm not entirely following you with regards to streams, but that's fine; I think I just need to experiment a bit and come back with more context and a better understanding of the design. I think I have an okay grasp of the overall approach but it's a system which has a lot of subtleties to it around the edges (it took me a while to realize that you can't use wasm-tools compose
to connect a component's imports and exports simultaneously to one of its dependencies).
certainly, prototyping is the way to go
do you know if WASI-Virt has seen much deployment yet? my assumption is no considering it was not really usable with the rest of the toolkit until my PR was merged a few days ago, but just to check
it's definitely early for the project, and has rough edges still, but it's at the integration phase of development where issues to make those improvements is really welcome.
I've tested the current main branch of WASI-Virt with YoWASP projects (Yosys only I think, but they're all the same) and everything seems to work fine so I think I'd like to put it to production use soon
I think my main questions at this point are:
cargo install --git
or are there binary builds?I don't know much about who's deploying it at the moment, but we are looking to see it used more widely at this point and to maintain it, as long as users are aware it has some rough edges.
oh I see, wasmtime-py does support components, it's just not in the docs, only in the README. I'll see if I can use that, that would be really helpful for me to be able to get rid of my homegrown FS virtualization layer
yeah it might be time to publish WASI-Virt to crates.io now that we are finally on the latest preview2
and yeah I'm quite happy to polish those rough edges, I've plenty of compiler engineering experience so none of it is intimidating
yeah it would be a really great help at this point I think for the project
One minor detail, we aren't quite aligned with WASI Preview 2 at the moment; https://github.com/bytecodealliance/WASI-Virt/pull/43 is one of two steps to finish the remaining things, though it's hitting an odd wasm-encoder error that I haven't yet debugged yet.
I'm very excited about it, especially thinking about the point where I can move on from shipping individual toolchain components to their compositions. eventually I want to be able to ship the entire FPGA toolchain as one huge wasm file runnable with wasmtime or something
... I say "FPGA toolchain" but really that includes python (frontend) and clang (simulation compiler) too. loads of fun to have
it's pushing "OS distribution" a little at that point
I know some Microsoft folks had a Python build for preview1, which may well adapt over to preview2 okay, could ask for the link if you'd like to test it out
Guy Bedford said:
I know some Microsoft folks had a Python build for preview1, which may well adapt over to preview2 okay, could ask for the link if you'd like to test it out
I'm assuming I'm the "Microsoft folks [which] had a Python build for preview1" and said builds are https://github.com/brettcannon/cpython-wasi-build/releases
Thanks for sharing, makes for a great test case!
^^^ Just tested that as a Wasm component with jco run
against our new preview2 implementation and can confirm it all works :)
Screenshot-2024-01-24-at-5.28.03-PM.png
Last updated: Dec 23 2024 at 12:05 UTC