-
Notifications
You must be signed in to change notification settings - Fork 15
Support WASM Api #460
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
Support WASM Api #460
Conversation
6658614 to
cc411d2
Compare
adampetro
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if it would make sense to create a Codec enum like:
enum Codec {
Json,
Msgpack,
}and then select a codec based on conditions, then put all of the conditional codec logic into methods on Codec, such as:
impl Codec {
fn transcode_from_json_bytes(&self, bytes: Vec<u8>) -> `anyhow::Result<Vec<u8>>` {
match self {
Self::Json => Ok(bytes),
Self::Msgpack => {
todo!()
}
}
}
}3e3ef79 to
b0786c0
Compare
97e9e7c to
f728a5f
Compare
5de7479 to
a804934
Compare
3258dcb to
7bd4fd0
Compare
saulecabrera
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, I think after the last two comments are resolved we can land this.
saulecabrera
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for iterating on this. Approving from my end, I'll leave the final approval to @andrewhassan, given the latest comments.
adampetro
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's squash the commits before merging
|
And hold off on merging for the finalized initial version of the provider module |
e9b12e9 to
469de76
Compare
9bddef5 to
0a99983
Compare
a33ddba to
d331604
Compare
9a31447 to
b0447d9
Compare
Wasm API Support for function-runner
Closes: https://github.com/shop/issues-shopifyvm/issues/32
Function-runner now detects when a module is using the Wasm API by checking if it imports modules with names starting with
shopify_function_v.When a Wasm API function is detected:
For output handling:
🎩 Tophat
WASM API
JAVY_V2
Testing
echo.trampolined.wasmfunctionnote: todo - test everything else is still working as expected