# Offerlyst: ONE automatic app discount per shop runs this function, which evaluates every running offer. # Rust (not JS): the JS build needed 39M instructions just to read a 200-line cart (limit 11M). See README. api_version = "2026-07" [[extensions]] name = "t:name" handle = "bundle-discount" uid = "208e9edf-8b9b-6b74-3f3a-539fdede2328f859a084" type = "function" description = "t:description" [[extensions.targeting]] target = "cart.lines.discounts.generate.run" input_query = "src/cart_lines_discounts_generate_run.graphql" export = "cart_lines_discounts_generate_run" # Collection ids, exclusion tags and the guard time come from this discount metafield (written by the app). input_variables = { namespace = "$app", key = "function-vars" } [extensions.build] command = "cargo build --target=wasm32-unknown-unknown --release" path = "target/wasm32-unknown-unknown/release/bundle-discount.wasm" watch = ["src/**/*.rs"]