Skip to content

Conversation

@mssalemi
Copy link
Contributor

@mssalemi mssalemi commented Apr 2, 2025

Issue: https://github.com/shop/issues-shopifyvm/issues/32

Add support for Wasm API provider in function-runner

This PR adds support for the Wasm API provider in the function-runner

Changes

  • Added detection for shopify_function_v0.0.1 provider
  • Integrated MessagePack transcoding for modules that use either provider:
    • Converts JSON input to MessagePack before passing to functions
    • Converts MessagePack output back to JSON for display
  • added uses_wasm_api_provider helper to check if function is using WASM api

Testing

cargo run -- -f '/Users/mehdisalemi/src/github.com/Shopify/function-runner/tests/fixtures/build/wasm_api_function.merged.wasm' -i 'tests/fixtures/input/wasm_api_function_input.json'

@mssalemi mssalemi force-pushed the ms.add-wasm-api-support-to-function-runner branch from 113b900 to 2d2711e Compare April 2, 2025 18:32
@mssalemi mssalemi force-pushed the ms.add-wasm-api-support-to-function-runner branch from 2d2711e to 8e0e619 Compare April 2, 2025 18:32
@mssalemi mssalemi closed this Apr 14, 2025
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.

1 participant