embed-rust bindgen - #107
Merged
Merged
Conversation
krisbitney
marked this pull request as ready for review
September 11, 2023 14:14
krisbitney
requested review from
cbrzn,
dOrgJelli and
namesty
as code owners
September 11, 2023 14:14
dOrgJelli
requested changes
Sep 12, 2023
dOrgJelli
left a comment
Contributor
There was a problem hiding this comment.
Can we avoid making a whole new set of wraps for this, and instead just add this as a feature within the existing abi-bindgen wraps?
Contributor
Author
Yes, I'll make the changes tomorrow |
# Conflicts: # implementations/app-rust/build/wrap.wasm
dOrgJelli
approved these changes
Oct 2, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a new interface
embed-bindgenand a Rust implementation. The implementations are expected to be called fromwrap-abi-bindgenapp binding implementations as an optional way to add embedded Wasm wraps to generated types. This PR adds only the Rust implementation, along with modifications to the app-rust bindings wrap to add support for embeds.The
rust-embed-bindgenwrap was e2e tested locally, using the app/rust template in the CLI repo, to ensure correct Rust syntax.Questions
The CI is not currently passing because the wraps were set to depend on wrapscan URIs. I can't upload to wrapscan. Should I use IPFS URIs for now?
Also, I did not add embedded serialized compiled Wasm modules. For that, I think we need a Rust client plugin that performs compilation and serialization.
See also
The Polywrap CLI has also been updated to add a
--embedoption to the codegen command: polywrap/wrap-cli#1893Also see polywrap/wrap-cli#1703