Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Use rust to write functions and report errors when deploying the shopify app.

Use rust to write functions and report errors when deploying the shopify app.

ymq
Shopify Partner
28 0 19

rustc 1.78.0 (9b00956e5 2024-04-29)

cargo 1.78.0 (54d8815d0 2024-03-26)

cargo-wasi 0.1.28 (e811d4889b 2023-06-12)

Node.js v20.13.0.

npm 10.5.2

 

The above is my environment.

I copied exactly the code from https://shopify.dev/docs/apps/selling-strategies/discounts/experience/getting-started.

Then run shopify app deploy.

But got this error:
Running validation...
Error: The function extension "rust-test" hasn't compiled the wasm in the expected path: C:/Users/Windows/Desktop/extension/cart/extensions/rust-test/target/wasm32-wasi/ release/rust-test.wasm

Reply 1 (1)

Nick_Wesselman
Shopify Staff
171 43 73

Was there a build error? Is there a file at the specified path? You might double check the expected path in your extension toml.

 

What happens if you `shopify app function build` from the extension folder?

Nick Wesselman | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog