Solved

Rust cart validation API

Dardan1
Shopify Partner
9 0 4

Hi so I am following the steps here: https://shopify.dev/docs/apps/checkout/validation/server-side I am using the Rust setup steps and I am on step 1.8 after I copied the Rust code and now I am trying to deploy my app and I am expecting: 'A message from the CLI displays and indicates that your cart-checkout-validation function is live.' but I keep getting this error when trying to deploy https://pastebin.com/wAB4rV3S. So I was wondering if anyone could help me out with this problem please. PS. I tried these with JavaScript and it works fine but I need this to work for Rust Thanks

Accepted Solution (1)
Liam
Shopify Staff
2731 302 783

This is an accepted solution.

Hi again Dardan1 - so our team has looked into this and it appears you need to 

either upgrade wasm-opt to 0.1.28 or downgrade Rust to 1.69.0 . Please try this and let us know if it's resolved this issue!
 
Best,
 

Liam | Developer Advocate @ 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 Shopify.dev or the Shopify Web Design and Development Blog

View solution in original post

Replies 3 (3)

Liam
Shopify Staff
2731 302 783

Hi Dardan1 - just to confirm is your instance of the CLI logged into a store that has the checkout extensibility developer preview enabled?

Liam | Developer Advocate @ 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 Shopify.dev or the Shopify Web Design and Development Blog

Dardan1
Shopify Partner
9 0 4

Hi Liam - Thanks for the reply, yes my store does have the checkout extensibility developer preview enabled and my CLI is logged into this store. The problem appears to be with the shopify function in main.rs and that the `wasm-opt` failed to execute (all attached in the pastebin above)

 

Thanks

Liam
Shopify Staff
2731 302 783

This is an accepted solution.

Hi again Dardan1 - so our team has looked into this and it appears you need to 

either upgrade wasm-opt to 0.1.28 or downgrade Rust to 1.69.0 . Please try this and let us know if it's resolved this issue!
 
Best,
 

Liam | Developer Advocate @ 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 Shopify.dev or the Shopify Web Design and Development Blog