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

Add docs for passing complex data types #475

Merged
merged 5 commits into from
Sep 11, 2023
Merged

Conversation

jeffcharles
Copy link
Collaborator

Description of the change

Adds documentation containing some code examples for using complex data types like byte arrays, strings, and structured data in Wasm functions.

Why am I making this change?

We've identified that lots of folks extending Javy struggle with how to do this so hopefully having some documentation will make it easier for them.

Checklist

  • I've updated the relevant CHANGELOG files if necessary. Changes to javy-cli and javy-core do not require updating CHANGELOG files.
  • I've updated the relevant crate versions if necessary. Versioning policy for library crates
  • I've updated documentation including crate documentation if necessary.

Copy link
Member

@saulecabrera saulecabrera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally looks good. It might be also useful to:

  • Add, perhaps at the end of the complex-data-types-in-wasm-functions.md, that passing structured data between the host and guest could be solved at a higher level if Javy implemented support for the component model, but that we haven't gotten to it yet.
  • Add some .wat examples along with all the Rust code that you've included (even if it's just the signature of the functions) with the hope of making the examples easier to understand.

docs/complex-data-types-in-wasm-functions.md Outdated Show resolved Hide resolved
@jeffcharles jeffcharles merged commit cc31b0e into main Sep 11, 2023
14 checks passed
@jeffcharles jeffcharles deleted the jc.complex-data-docs branch September 11, 2023 18:31
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

Successfully merging this pull request may close these issues.

2 participants