### Please confirm that you have:
- [x] Searched [existing issues](.) to see if… your issue is a duplicate. (If you’ve found a duplicate issue, feel free to add additional information in a comment on it.)
- [x] Reproduced the issue in [the latest CLI version](https://www.npmjs.com/package/@shopify/cli).
### In which of these areas are you experiencing a problem?
Function
### Expected behavior
I tried to upgrade our Rust cart transform function to `shopify_function` 1.x by following the [official guide](https://shopify.dev/docs/apps/build/functions/programming-languages/rust-for-functions#updating-existing-function-to-using-shopify_function-1-0-0-and-higher).
While the build succeeds and the function seems to be working fine in the dev store, I couldn't test it because the function runner throws the following error:
```bash
cat ./tests/fixtures/input-01.json | npm exec -- shopify app function run
Error: unknown import: `shopify_function_v1::shopify_function_input_get_interned_obj_prop` has not been defined
── external error ─────────────────────────────────────────────────────────────────────
Error coming from `/Users/user/app/node_modules/@shopify/cli/bin/function-runner-v9.0.0 -f
/Users/user/app/extensions/cart-merge/target/wasm32-wasip1/release/cart_transform.wasm --export run --schema-path
/Users/user/app/extensions/cart-merge/schema.graphql --query-path
/Users/user/app/extensions/cart-merge/src/run.graphql`
Command failed with exit code 1: /Users/user/app/node_modules/@shopify/cli/bin/function-runner-v9.0.0 -f
/Users/user/app/extensions/cart-merge/target/wasm32-wasip1/release/cart_transform.wasm --export run --schema-path
/Users/user/app/extensions/cart-merge/schema.graphql --query-path
/Users/user/app/extensions/cart-merge/src/run.graphql
───────────────────────────────────────────────────────────────────────────────────────
```
When I generate a new extension and try to run the function runner, I get slightly different error:
```bash
cat ./tests/fixtures/input-01.json | npm exec -- shopify app function run
Error: unknown import: `shopify_function_v1::shopify_function_context_new` has not been defined
── external error ────────────────────────────────────────────────────────────────────
Error coming from `/Users/user/app/node_modules/@shopify/cli/bin/function-runner-v9.0.0 -f
/Users/user/app/extensions/cart-transformer/target/wasm32-wasip1/release/cart-transformer.wasm --input
./input.json --export run --schema-path /Users/user/app/extensions/cart-transformer/schema.graphql --query-path
/Users/user/app/extensions/cart-transformer/src/run.graphql`
Command failed with exit code 1: /Users/user/app/node_modules/@shopify/cli/bin/function-runner-v9.0.0 -f
/Users/user/app/extensions/cart-transformer/target/wasm32-wasip1/release/cart-transformer.wasm --input
./input.json --export run --schema-path /Users/user/app/extensions/cart-transformer/schema.graphql --query-path
/Users/user/app/extensions/cart-transformer/src/run.graphql
──────────────────────────────────────────────────────────────────────────────────────
```
### Actual behavior
The function runner outputs the result of the function run without errors.
### Verbose output
<details>
<summary>Verbose output</summary>
```
2025-06-28T04:59:11.270Z: Running command app function run
2025-06-28T04:59:11.273Z: Running system process in background:
· Command: /Users/user/.asdf/installs/nodejs/22.13.0/bin/node /Users/user/app/node_modules/.bin/shopify notifications list --ignore-errors
· Working directory: /Users/user/app/extensions/cart-merge
2025-06-28T04:59:11.279Z: Notifications to show: 0
2025-06-28T04:59:11.290Z: Reading cached app information for directory ../.....
2025-06-28T04:59:11.290Z: Reading the content of file at ../../shopify.app.toml...
2025-06-28T04:59:11.293Z: Reading the content of file at ../../shopify.app.toml...
2025-06-28T04:59:11.294Z: Ensuring that the user is authenticated with the Partners API with the following scopes:
[]
2025-06-28T04:59:11.294Z: Getting session store...
2025-06-28T04:59:11.296Z: Validating existing session against the scopes:
[
"openid",
"https://api.shopify.com/auth/shop.admin.graphql",
"https://api.shopify.com/auth/shop.admin.themes",
"https://api.shopify.com/auth/partners.collaborator-relationships.readonly",
"https://api.shopify.com/auth/shop.storefront-renderer.devtools",
"https://api.shopify.com/auth/partners.app.cli.access",
"https://api.shopify.com/auth/destinations.readonly",
"https://api.shopify.com/auth/organization.store-management",
"https://api.shopify.com/auth/organization.on-demand-user-access",
"https://api.shopify.com/auth/organization.apps.manage"
]
For applications:
{
"partnersApi": {
"scopes": []
}
}
2025-06-28T04:59:11.296Z: - Token validation -> It's expired: false
2025-06-28T04:59:11.297Z: Getting partner account info from cache
2025-06-28T04:59:11.303Z: Sending "Partners" GraphQL request:
query FindApp($apiKey: String!) {
app(apiKey: $apiKey) {
id
title
apiKey
organizationId
apiSecretKeys {
secret
}
appType
grantedScopes
applicationUrl
redirectUrlWhitelist
requestedAccessScopes
webhookApiVersion
embedded
posEmbedded
preferencesUrl
gdprWebhooks {
customerDeletionUrl
customerDataRequestUrl
shopDeletionUrl
}
appProxy {
subPath
subPathPrefix
url
}
developmentStorePreviewEnabled
disabledFlags
}
}
With variables:
{
"apiKey": "*****"
}
With request headers:
- User-Agent: Shopify CLI; v=3.81.2
- Keep-Alive: timeout=30
- Sec-CH-UA-PLATFORM: darwin
- Content-Type: application/json
to https://partners.shopify.com/api/cli/graphql
2025-06-28T04:59:12.148Z: Request to https://partners.shopify.com/api/cli/graphql completed in 845 ms
With response headers:
- cache-control: max-age=0, private, must-revalidate
- content-type: application/json; charset=utf-8
- etag: W/"e6d3d8654be593516bf32f82cf5218b0"
- server-timing: processing;dur=607, socket_queue;dur=4.136, util;dur=1.4, cfRequestDuration;dur=700.999975
- x-request-id: c8fe11f8-48b8-4bfc-864f-13ce8d1755e3-1751086751
2025-06-28T04:59:12.154Z: Sending "Partners" GraphQL request:
query FindOrganization($id: ID!) {
organizations(id: $id, first: 1) {
nodes {
id
businessName
}
}
}
With variables:
{
"id": "1810186"
}
With request headers:
- User-Agent: Shopify CLI; v=3.81.2
- Keep-Alive: timeout=30
- Sec-CH-UA-PLATFORM: darwin
- Content-Type: application/json
to https://partners.shopify.com/api/cli/graphql
2025-06-28T04:59:12.303Z: Sending "Partners" GraphQL request:
query fetchSpecifications($apiKey: String!) {
extensionSpecifications(apiKey: $apiKey) {
name
externalName
externalIdentifier
identifier
gated
experience
options {
managementExperience
registrationLimit
}
features {
argo {
surface
}
}
validationSchema {
jsonSchema
}
}
}
With variables:
{
"apiKey": "*****"
}
With request headers:
- User-Agent: Shopify CLI; v=3.81.2
- Keep-Alive: timeout=30
- Sec-CH-UA-PLATFORM: darwin
- Content-Type: application/json
to https://partners.shopify.com/api/cli/graphql
2025-06-28T04:59:12.504Z: Request to https://partners.shopify.com/api/cli/graphql completed in 201 ms
With response headers:
- cache-control: max-age=0, private, must-revalidate
- content-type: application/json; charset=utf-8
- etag: W/"bcbe5b1226f10a383d2bb27acd61bb7d"
- server-timing: processing;dur=63, socket_queue;dur=2.36, util;dur=0.5, cfRequestDuration;dur=164.999962
- x-request-id: 78859d52-6931-4402-9105-997256953675-1751086752
2025-06-28T04:59:12.512Z: The following extension specifications were defined locally but not found in the remote specifications: payments_extension, tax_calculation
2025-06-28T04:59:12.514Z: Reading the content of file at ../../shopify.app.dev.toml...
2025-06-28T04:59:12.515Z: Reading the content of file at ../../.gitignore...
2025-06-28T04:59:12.517Z: Reading the .env file at ../../.env
2025-06-28T04:59:12.517Z: Reading the content of file at ../../.env...
2025-06-28T04:59:12.520Z: Reading the content of file at shopify.extension.toml...
2025-06-28T04:59:12.520Z: Reading the content of file at ../support-link/shopify.extension.toml...
2025-06-28T04:59:12.520Z: Reading the content of file at ../product-configuration/shopify.extension.toml...
2025-06-28T04:59:12.520Z: Reading the content of file at ../product-bundles/shopify.theme.extension.toml...
2025-06-28T04:59:12.524Z: Reading the content of file at shopify.extension.toml...
2025-06-28T04:59:12.524Z: Reading the content of file at ../support-link/shopify.extension.toml...
2025-06-28T04:59:12.524Z: Reading the content of file at ../product-configuration/shopify.extension.toml...
2025-06-28T04:59:12.553Z: Reading the content of file at ../../package.json...
2025-06-28T04:59:12.553Z: Reading the content of file at ../../package.json...
2025-06-28T04:59:12.555Z: Running system process:
· Command: npm prefix
· Working directory: /Users/user/app
2025-06-28T04:59:12.764Z: Obtaining the dependency manager in directory ../.....
2025-06-28T04:59:12.764Z: Reading the content of file at ../../package.json...
2025-06-28T04:59:12.765Z: Reading the content of file at ../../.shopify/project.json...
2025-06-28T04:59:12.870Z: Reading the content of file at ../../web/shopify.web.toml...
2025-06-28T04:59:12.870Z: Reading the content of file at ../../web/background/shopify.web.toml...
2025-06-28T04:59:12.870Z: Reading the content of file at ../../web/frontend/shopify.web.toml...
2025-06-28T04:59:13.006Z: Notifications to show: 0
2025-06-28T04:59:13.008Z: Reading cached app information for directory /Users/user/app/extensions/cart-merge...
2025-06-28T04:59:13.008Z: Storing app information for directory /Users/user/app/extensions/cart-merge:{
"appId": "c67a1ac83e7476f3a1bd2366e1583d6b",
"title": "app",
"directory": "/Users/user/app/extensions/cart-merge",
"orgId": "1810186"
}
2025-06-28T04:59:13.015Z: Using export 'run'. Use the --export flag or an interactive terminal to select a different export.
2025-06-28T04:59:13.016Z: Running system process:
· Command: /Users/user/app/node_modules/@shopify/cli/bin/function-runner-v9.0.0 -f /Users/user/app/extensions/cart-merge/target/wasm32-wasip1/release/cart_transform.wasm --export run --schema-path /Users/user/app/extensions/cart-merge/schema.graphql --query-path /Users/user/app/extensions/cart-merge/src/run.graphql
· Working directory: /Users/user/app/extensions/cart-merge
Error: unknown import: `shopify_function_v1::shopify_function_input_get_interned_obj_prop` has not been defined
── external error ─────────────────────────────────────────────────────────────────────
Error coming from `/Users/user/app/node_modules/@shopify/cli/bin/function-runner-v9.0.0 -f
/Users/user/app/extensions/cart-merge/target/wasm32-wasip1/release/cart_transform.wasm --export run --schema-path
/Users/user/app/extensions/cart-merge/schema.graphql --query-path
/Users/user/app/extensions/cart-merge/src/run.graphql`
Command failed with exit code 1: /Users/user/app/node_modules/@shopify/cli/bin/function-runner-v9.0.0 -f
/Users/user/app/extensions/cart-merge/target/wasm32-wasip1/release/cart_transform.wasm --export run --schema-path
/Users/user/app/extensions/cart-merge/schema.graphql --query-path
/Users/user/app/extensions/cart-merge/src/run.graphql
───────────────────────────────────────────────────────────────────────────────────────
2025-06-28T04:59:13.211Z: Running system process:
· Command: npm prefix
· Working directory: /Users/user/app/extensions/cart-merge
2025-06-28T04:59:13.398Z: Obtaining the dependency manager in directory ../.....
2025-06-28T04:59:13.764Z: Request to https://monorail-edge.shopifysvc.com/v1/produce completed in 170 ms
With response headers:
- x-request-id: 37d8fe14-1e68-4e74-a8f6-4484f655b1db
2025-06-28T04:59:13.764Z: Analytics event sent: {
"command": "app function run",
"time_start": 1751086751270,
"time_end": 1751086753207,
"total_time": 1937,
"success": false,
"cli_version": "3.81.2",
"ruby_version": "",
"node_version": "22.13.0",
"is_employee": false,
"uname": "darwin arm64",
"env_ci": false,
"env_plugin_installed_any_custom": false,
"env_plugin_installed_shopify": "[\"@shopify/cli\"]",
"env_shell": "zsh",
"env_device_id": "22ad1fc11865fe96dfcea5c35b7c9849751ba114",
"env_cloud": "localhost",
"env_package_manager": "npm",
"env_is_global": false,
"env_auth_method": "device_auth",
"env_is_wsl": false,
"cmd_app_warning_api_key_deprecation_displayed": false,
"cmd_app_all_configs_any": true,
"cmd_app_all_configs_clients": "{\"shopify.app.dev.toml\":\"76ac7e06c40ee32bb1b13628af6d320b\",\"shopify.app.toml\":\"c67a1ac83e7476f3a1bd2366e1583d6b\"}",
"cmd_app_linked_config_used": true,
"cmd_app_linked_config_name": "shopify.app.toml",
"cmd_app_linked_config_git_tracked": true,
"cmd_app_linked_config_source": "cached",
"project_type": "ruby",
"app_extensions_any": true,
"app_extensions_breakdown": "{\"function\":1,\"theme\":1,\"admin_link\":1,\"ui_extension\":1}",
"app_extensions_count": 4,
"app_extensions_custom_layout": false,
"app_extensions_function_any": true,
"app_extensions_function_count": 1,
"app_extensions_theme_any": true,
"app_extensions_theme_count": 1,
"app_extensions_ui_any": true,
"app_extensions_ui_count": 1,
"app_name_hash": "712f0f78c5820cd8c110d08d88d98df635c759d1",
"app_path_hash": "b62224530bc449c7043fbd269bdb6548493fae53",
"app_scopes": "[\"read_orders\",\"read_themes\",\"write_cart_transforms\",\"write_products\",\"write_publications\"]",
"app_web_backend_any": true,
"app_web_backend_count": 1,
"app_web_custom_layout": false,
"app_web_framework": "rails",
"app_web_frontend_any": true,
"app_web_frontend_count": 1,
"env_package_manager_workspaces": false,
"partner_id": 1810186,
"api_key": "****",
"cmd_app_reset_used": false,
"cmd_all_timing_network_ms": 1046,
"cmd_all_timing_prompts_ms": 0,
"cmd_all_launcher": "npm",
"cmd_all_topic": "app function",
"cmd_all_plugin": "@shopify/app",
"cmd_all_verbose": true,
"cmd_all_path_override": true,
"cmd_all_path_override_hash": "d17722565cd88234798258581a93cf99caeee5ec",
"cmd_all_last_graphql_request_id": "78859d52-6931-4402-9105-997256953675-1751086752",
"cmd_all_timing_active_ms": 890,
"cmd_all_exit": "expected_error",
"user_id": "f0b1051f-3d71-45ed-9940-05ac68c3a770",
"request_ids": [
"c8fe11f8-48b8-4bfc-864f-13ce8d1755e3-1751086751",
"78859d52-6931-4402-9105-997256953675-1751086752"
],
"args": "--verbose",
"error_message": "Command failed with exit code 1: /Users/user/app/node_modules/@shopify/cli/bin/function-runner-v9.0.0 -f /Users/user/app/extensions/cart-merge/target/wasm32-wasip1/release/cart_transform.wasm --export run --schema-path /Users/user/app/extensions/cart-merge/schema.graphql --query-path /Users/user/app/extensions/cart-merge/src/run.graphql",
"app_name": "app",
"env_plugin_installed_all": "[\"@shopify/cli\"]",
"metadata": "{\"extraPublic\":{},\"extraSensitive\":{}}"
}
2025-06-28T04:59:13.777Z: Reporting handled error to Bugsnag: Command failed with exit code 1: /Users/user/app/node_modules/@shopify/cli/bin/function-runner-v9.0.0 -f /Users/user/app/extensions/cart-merge/target/wasm32-wasip1/release/cart_transform.wasm --export run --schema-path /Users/user/app/extensions/cart-merge/schema.graphql --query-path /Users/user/app/extensions/cart-merge/src/run.graphql
2025-06-28T04:59:14.117Z: Running system process:
· Command: npm prefix
· Working directory: /Users/user/app/extensions/cart-merge
2025-06-28T04:59:14.311Z: Obtaining the dependency manager in directory ../.....
```
</details>
### Reproduction steps
1. Generate a new cart transformer function using `npm run shopify app generate extension`
2. Build function using `cargo build --target wasm32-wasip1 --release`
3. Run function using `cat input.json | npm exec -- shopify app function run`
### Operating System
macos 15.5 (24F74)
### Shopify CLI version (`shopify --version`)
3.81.2
### Shell
zsh
### Node version (run `node -v` if you're not sure)
v22.13.0
### What language and version are you using in your application?
Ruby 3.4.1, Rust 1.84.0