@Guy Bedford What do you think of maybe writing a (minimal?) guide on how to contribute a single Wasi API implementation? I'd love it if we had a basic doc we could point people at saying: "this is how you add an API"
I think more generally, having guides on working with WIT and JS implementations would be the better focus here over preview2 / WASI implementations
Improving guide material here would definitely be great to see though
Hello guys. I'm trying to contribute to jco (to support GC instructions inside the transpiler), but I have the problem of building the project locally.
I get such weird compilation errors from serde
, zerocopy
, and other deps like no standard enum variants like Ok
, Error
, Some
, etc.
I went through the guide and installed all the possible things, but nothing helped.
Did somebody face it?
I haven't encountered any issues of that kind; I'm sorry
Maybe if you can post the actual error we can take a look?
One of them:
error[E0425]: cannot find function, tuple struct or tuple variant `Some` in this scope
--> /Users/Artem.Kobzar/.cargo/registry/src/index.crates.io-6f17d22bba15001f/zerocopy-0.7.32/src/lib.rs:4282:13
|
4282 | Some((r, rest))
| ^^^^ not found in this scope
Some errors have detailed explanations: E0405, E0408, E0412, E0425, E0433, E0463, E0531.
error: could not compile `zerocopy` (lib) due to 345 previous errors
okay; something seems really wrong there
can you run cargo clean
and then try building again?
I did it multiple times :sad:
ooffff
I'm looking at the list of issues, and there doesn't seem to be any mention of an issue like what you're seeing for zerocopy
: https://github.com/google/zerocopy/issues?q=is%3Aissue
I feel like there is no stdlib, but I also did run rustup target add wasm32-wasi
multiple times
This makes me suspect it might be something local to your environment
if you run cargo version
, what do you see?
in the project's repo
cargo: 1.76.0
So, I deleted rustc, cargo, and rustup; installed rustup again, and it seems like it works. Sorry for disturbing, such a weird situation :melting_face:
@Alex Crichton might be a good person to chat to here about GC instruction support in Wasmtime-environ (the base on top of which Jco bindgen is implemented)
I just explored, and it seems like it should be supported already:
wit-parser
wasmparser
and turns on all available features (including GC): https://github.com/bytecodealliance/wasm-tools/blob/main/crates/wit-parser/src/decoding.rs#L47Oh, okay. I've found the root cause. You use wasmtime-environ
create that doesn't support GC at all.
Last updated: Dec 23 2024 at 13:07 UTC