Stream: jco

Topic: Contributing Guide


view this post on Zulip Yoshua Wuyts (Oct 17 2023 at 19:05):

@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"

view this post on Zulip Guy Bedford (Oct 17 2023 at 19:15):

I think more generally, having guides on working with WIT and JS implementations would be the better focus here over preview2 / WASI implementations

view this post on Zulip Guy Bedford (Oct 17 2023 at 19:15):

Improving guide material here would definitely be great to see though

view this post on Zulip Artem Kobzar (Mar 07 2024 at 17:06):

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?

view this post on Zulip Yoshua Wuyts (Mar 07 2024 at 17:20):

I haven't encountered any issues of that kind; I'm sorry

view this post on Zulip Yoshua Wuyts (Mar 07 2024 at 17:20):

Maybe if you can post the actual error we can take a look?

view this post on Zulip Artem Kobzar (Mar 07 2024 at 17:21):

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

view this post on Zulip Yoshua Wuyts (Mar 07 2024 at 17:22):

okay; something seems really wrong there

view this post on Zulip Yoshua Wuyts (Mar 07 2024 at 17:22):

can you run cargo clean and then try building again?

view this post on Zulip Artem Kobzar (Mar 07 2024 at 17:23):

I did it multiple times :sad:

view this post on Zulip Yoshua Wuyts (Mar 07 2024 at 17:23):

ooffff

view this post on Zulip Yoshua Wuyts (Mar 07 2024 at 17:24):

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

Contribute to google/zerocopy development by creating an account on GitHub.

view this post on Zulip Artem Kobzar (Mar 07 2024 at 17:24):

I feel like there is no stdlib, but I also did run rustup target add wasm32-wasi multiple times

view this post on Zulip Yoshua Wuyts (Mar 07 2024 at 17:24):

This makes me suspect it might be something local to your environment

view this post on Zulip Yoshua Wuyts (Mar 07 2024 at 17:25):

if you run cargo version, what do you see?

view this post on Zulip Yoshua Wuyts (Mar 07 2024 at 17:25):

in the project's repo

view this post on Zulip Artem Kobzar (Mar 07 2024 at 17:25):

cargo: 1.76.0

view this post on Zulip Artem Kobzar (Mar 07 2024 at 17:36):

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:

view this post on Zulip Guy Bedford (Mar 07 2024 at 17:52):

@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)

view this post on Zulip Artem Kobzar (Mar 07 2024 at 18:09):

I just explored, and it seems like it should be supported already:

view this post on Zulip Artem Kobzar (Mar 08 2024 at 09:09):

Oh, okay. I've found the root cause. You use wasmtime-environ create that doesn't support GC at all.


Last updated: Nov 22 2024 at 16:03 UTC