wasmtime removed the rights system in 9.0. So for example WasiCtx::push_dir
doesn't take any capabilities arguments anymore. However I still want to push a directory that is read only. How am I supposed to do this with 9.0?
huh, there was supposed to be a ReadOnlyDir(Box<dyn WasiDir>) which impl'd WasiDir in a manner that made the tree read-only
but i dont know where it has gone to
apparently that was never in the wasmtime repo, it was just in the preview2-prototyping repo and i had assumed it had originated upstream
we'll have to add these to wasi-common for the next release, but in the meantime you should be able to define and impl these in your own crate https://github.com/bytecodealliance/preview2-prototyping/commit/486fbeec74e039984333657b0f5f34e6bc009ae6
that source text might not be literally compatible anymore, though
and also you may want to add checks to e.g. open_file and open_dir to fail early if its trying to create
also please beware that there is probably still a filesystem bug lurking in 9.0.2. i discovered something late on friday and then it was time to go have a weekend, so itll have to wait until tuesday.
sorry. this has not been a shining release for our wasi work. in focusing on the new shiny stuff (the preview 2 implementation) i have messed up the old stuff.
Thanks for the very detailed reply :)
Great to hear that a solution is meant to be in place / will be added. I think adding the type myself is probably too error prone, so I think I'll stay on 8.0 for now and skip over 9.0.
CryZe has marked this topic as resolved.
Last updated: Dec 23 2024 at 13:07 UTC