Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can we have more examples that cover resource, record, etc. #139

Open
chaosprint opened this issue Jun 2, 2024 · 2 comments
Open

Can we have more examples that cover resource, record, etc. #139

chaosprint opened this issue Jun 2, 2024 · 2 comments

Comments

@chaosprint
Copy link

chaosprint commented Jun 2, 2024

I looked for the repo of wit-bindgen and cargo-component, and there are several examples of designing import, export, and func. But they are basically at the level of helloworld and adder.

But how to create a struct similar to Rust? The docs mention resource, interface, record, etc., but there are no examples to explain how to write wit and bind at the Rust level.

It's basically some expansion to the current tutorial.

@itowlson
Copy link
Collaborator

itowlson commented Jun 3, 2024

I ran into this just the other day! I will try to capture what I did, although it will be Rust-only at this stage.

@itowlson
Copy link
Collaborator

itowlson commented Jun 4, 2024

@chaosprint It might take us a bit to decide on how we want to organise things, but if you want to know about resources pronto, see #140. I'll have a look at putting something similar together for records, which I hope will be a lot simpler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants