Hi, I’ve been having a rough time trying to find a solution to this so I’ll seek for some help.
In a gist, I’m aware that there are limits for size and instructions as far as any language goes but I’m trying to re-do my Typescript function in Rust to see if this can be achieved. My business logic envisages JWT validation and therefore crypto functions, which I’d like to make use through jwt_simple - Rust
Issue stems from the fact that as soon as I fetch my PEM and try to ES256PublicKey::from_pem
it and then verify a token with public_key.verify_token::<NoCustomClaims>
the wasm blows up and I get over the 256 KB limit.
At this point I’m trying to implement the tips from the docs but having a hard time at it: Rust for Functions
In particular, how would I go and use wasm-snip
part in the deploy? Should I include that command in the extension.toml somehow? I have ran the command via terminal and the decrease in size is noticeable but how would I go then to just release that .wasm instead of the one that gets recompiled when I shopify app deploy
?
Thanks