Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
run: cargo clippy -- -D warnings
- name: Run tests
run: cargo test
- name: Add wasm32-wasi target
run: rustup target add wasm32-wasi
- name: Build with wasm32-wasi target
run: cargo build --release --target wasm32-wasi
- name: Add wasm32-wasip1 target
run: rustup target add wasm32-wasip1
- name: Build with wasm32-wasip1 target
run: cargo build --release --target wasm32-wasip1
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ description = "t:description"
export = "run"

[extensions.build]
command = "cargo wasi build --release"
path = "target/wasm32-wasi/release/{{handle | replace: " ", "-" | downcase}}.wasm"
command = "cargo build --target=wasm32-wasip1 --release"
path = "target/wasm32-wasip1/release/{{handle | replace: " ", "-" | downcase}}.wasm"
watch = [ "src/**/*.rs" ]

Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ description = "t:description"
export = "run"

[extensions.build]
command = "cargo wasi build --release"
path = "target/wasm32-wasi/release/bundles_cart_transform.wasm"
command = "cargo build --target=wasm32-wasip1 --release"
path = "target/wasm32-wasip1/release/bundles_cart_transform.wasm"
watch = [ "src/**/*.rs" ]

[extensions.ui.paths]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ description = "t:description"
export = "run"

[extensions.build]
command = "cargo wasi build --release"
path = "target/wasm32-wasi/release/{{handle | replace: " ", "-" | downcase}}.wasm"
command = "cargo build --target=wasm32-wasip1 --release"
path = "target/wasm32-wasip1/release/{{handle | replace: " ", "-" | downcase}}.wasm"
watch = [ "src/**/*.rs" ]

[extensions.ui.paths]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ description = "t:description"
export = "run"

[extensions.build]
command = "cargo wasi build --release"
path = "target/wasm32-wasi/release/{{handle | replace: " ", "-" | downcase}}.wasm"
command = "cargo build --target=wasm32-wasip1 --release"
path = "target/wasm32-wasip1/release/{{handle | replace: " ", "-" | downcase}}.wasm"
watch = [ "src/**/*.rs" ]

[extensions.ui.paths]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ description = "t:description"
export = "run"

[extensions.build]
command = "cargo wasi build --release"
path = "target/wasm32-wasi/release/{{handle | replace: " ", "-" | downcase}}.wasm"
command = "cargo build --target=wasm32-wasip1 --release"
path = "target/wasm32-wasip1/release/{{handle | replace: " ", "-" | downcase}}.wasm"
watch = [ "src/**/*.rs" ]

[extensions.ui.paths]
Expand Down
6 changes: 2 additions & 4 deletions discounts/rust/discounts-allocator/default/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@

- [Install Rust](https://www.rust-lang.org/tools/install)
- On Windows, Rust requires the [Microsoft C++ Build Tools](https://docs.microsoft.com/en-us/windows/dev-environment/rust/setup). Be sure to select the _Desktop development with C++_ workload when installing them.
- Install [`cargo-wasi`](https://bytecodealliance.github.io/cargo-wasi/)
- `cargo install cargo-wasi`

## Building the function

You can build this individual function using `cargo wasi`.
You can build this individual function using `cargo build`.

```shell
cargo wasi build --release
cargo build --target=wasm32-wasip1 --release
```

The Shopify CLI `build` command will also execute this, based on the configuration in `shopify.extension.toml`.
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ description = "t:description"
export = "run"

[extensions.build]
command = "cargo wasi build --release"
path = "target/wasm32-wasi/release/{{handle | replace: " ", "-" | downcase}}.wasm"
command = "cargo build --target=wasm32-wasip1 --release"
path = "target/wasm32-wasip1/release/{{handle | replace: " ", "-" | downcase}}.wasm"
watch = [ "src/**/*.rs" ]

[extensions.ui.paths]
Expand Down
6 changes: 2 additions & 4 deletions discounts/rust/order-discounts/default/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@

- [Install Rust](https://www.rust-lang.org/tools/install)
- On Windows, Rust requires the [Microsoft C++ Build Tools](https://docs.microsoft.com/en-us/windows/dev-environment/rust/setup). Be sure to select the _Desktop development with C++_ workload when installing them.
- Install [`cargo-wasi`](https://bytecodealliance.github.io/cargo-wasi/)
- `cargo install cargo-wasi`

## Building the function

You can build this individual function using `cargo wasi`.
You can build this individual function using `cargo build`.

```shell
cargo wasi build --release
cargo build --target=wasm32-wasip1 --release
```

The Shopify CLI `build` command will also execute this, based on the configuration in `shopify.extension.toml`.
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ description = "t:description"
export = "run"

[extensions.build]
command = "cargo wasi build --release"
path = "target/wasm32-wasi/release/{{handle | replace: " ", "-" | downcase}}.wasm"
command = "cargo build --target=wasm32-wasip1 --release"
path = "target/wasm32-wasip1/release/{{handle | replace: " ", "-" | downcase}}.wasm"
watch = [ "src/**/*.rs" ]

[extensions.ui.paths]
Expand Down
6 changes: 2 additions & 4 deletions discounts/rust/product-discounts/default/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@

- [Install Rust](https://www.rust-lang.org/tools/install)
- On Windows, Rust requires the [Microsoft C++ Build Tools](https://docs.microsoft.com/en-us/windows/dev-environment/rust/setup). Be sure to select the _Desktop development with C++_ workload when installing them.
- Install [`cargo-wasi`](https://bytecodealliance.github.io/cargo-wasi/)
- `cargo install cargo-wasi`

## Building the function

You can build this individual function using `cargo wasi`.
You can build this individual function using `cargo build`.

```shell
cargo wasi build --release
cargo build --target=wasm32-wasip1 --release
```

The Shopify CLI `build` command will also execute this, based on the configuration in `shopify.extension.toml`.
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ description = "t:description"
export = "run"

[extensions.build]
command = "cargo wasi build --release"
path = "target/wasm32-wasi/release/{{handle | replace: " ", "-" | downcase}}.wasm"
command = "cargo build --target=wasm32-wasip1 --release"
path = "target/wasm32-wasip1/release/{{handle | replace: " ", "-" | downcase}}.wasm"
watch = [ "src/**/*.rs" ]

[extensions.ui.paths]
Expand Down
6 changes: 2 additions & 4 deletions discounts/rust/shipping-discounts/default/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@

- [Install Rust](https://www.rust-lang.org/tools/install)
- On Windows, Rust requires the [Microsoft C++ Build Tools](https://docs.microsoft.com/en-us/windows/dev-environment/rust/setup). Be sure to select the _Desktop development with C++_ workload when installing them.
- Install [`cargo-wasi`](https://bytecodealliance.github.io/cargo-wasi/)
- `cargo install cargo-wasi`

## Building the function

You can build this individual function using `cargo wasi`.
You can build this individual function using `cargo build`.

```shell
cargo wasi build --release
cargo build --target=wasm32-wasip1 --release
```

The Shopify CLI `build` command will also execute this, based on the configuration in `shopify.extension.toml`.
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ description = "t:description"
export = "run"

[extensions.build]
command = "cargo wasi build --release"
path = "target/wasm32-wasi/release/{{handle | replace: " ", "-" | downcase}}.wasm"
command = "cargo build --target=wasm32-wasip1 --release"
path = "target/wasm32-wasip1/release/{{handle | replace: " ", "-" | downcase}}.wasm"
watch = [ "src/**/*.rs" ]

[extensions.ui.paths]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ description = "t:description"
export = "run"

[extensions.build]
command = "cargo wasi build --release"
path = "target/wasm32-wasi/release/{{handle | replace: " ", "-" | downcase}}.wasm"
command = "cargo build --target=wasm32-wasip1 --release"
path = "target/wasm32-wasip1/release/{{handle | replace: " ", "-" | downcase}}.wasm"
watch = [ "src/**/*.rs" ]

[extensions.ui.paths]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ type = "local_pickup_delivery_option_generator"
api_version = "unstable"

[build]
command = "cargo wasi build --release"
path = "target/wasm32-wasi/release/{{name | replace: " ", "-" | downcase}}.wasm"
command = "cargo build --target=wasm32-wasip1 --release"
path = "target/wasm32-wasip1/release/{{name | replace: " ", "-" | downcase}}.wasm"
watch = [ "src/**/*.rs" ]

[ui.paths]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ description = "t:description"
export = "run"

[extensions.build]
command = "cargo wasi build --release"
path = "target/wasm32-wasi/release/{{handle | replace: " ", "-" | downcase}}.wasm"
command = "cargo build --target=wasm32-wasip1 --release"
path = "target/wasm32-wasip1/release/{{handle | replace: " ", "-" | downcase}}.wasm"
watch = [ "src/**/*.rs" ]

[extensions.ui.paths]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ input_query = "src/run.graphql"
export = "run"

[extensions.build]
command = "cargo wasi build --release"
path = "target/wasm32-wasi/release/{{handle | replace: "-", "_" | downcase}}.wasm"
command = "cargo build --target=wasm32-wasip1 --release"
path = "target/wasm32-wasip1/release/{{handle | replace: "-", "_" | downcase}}.wasm"
watch = ["src/**/*.rs"]

[extensions.ui.paths]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ title = "cart merge expand"
api_version = "2024-04"

[build]
command = "cargo wasi build --release"
path = "target/wasm32-wasi/release/bundle_cart_transform.wasm"
command = "cargo build --target=wasm32-wasip1 --release"
path = "target/wasm32-wasip1/release/bundle_cart_transform.wasm"
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ type = "function"
export = "run"

[extensions.build]
command = "cargo wasi build --release"
path = "target/wasm32-wasi/release/delivery-customization-rust.wasm"
command = "cargo build --target=wasm32-wasip1 --release"
path = "target/wasm32-wasip1/release/delivery-customization-rust.wasm"
watch = [ "src/**/*.rs" ]

[extensions.ui.paths]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@

- [Install Rust](https://www.rust-lang.org/tools/install)
- On Windows, Rust requires the [Microsoft C++ Build Tools](https://docs.microsoft.com/en-us/windows/dev-environment/rust/setup). Be sure to select the _Desktop development with C++_ workload when installing them.
- Install [`cargo-wasi`](https://bytecodealliance.github.io/cargo-wasi/)
- `cargo install cargo-wasi`

## Building the function

You can build this individual function using `cargo wasi`.
You can build this individual function using `cargo build`.

```shell
cargo wasi build --release
cargo build --target=wasm32-wasip1 --release
```

The Shopify CLI `build` command will also execute this, based on the configuration in `shopify.extension.toml`.
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ type = "function"
export = "run"

[extensions.build]
command = "cargo wasi build --release"
path = "target/wasm32-wasi/release/product-discount-rust.wasm"
command = "cargo build --target=wasm32-wasip1 --release"
path = "target/wasm32-wasip1/release/product-discount-rust.wasm"
watch = ["src/**/*.rs"]

[extensions.ui.paths]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ type = "function"
export = "run"

[extensions.build]
command = "cargo wasi build --release"
path = "target/wasm32-wasi/release/optional-add-ons-rust.wasm"
command = "cargo build --target=wasm32-wasip1 --release"
path = "target/wasm32-wasip1/release/optional-add-ons-rust.wasm"
watch = [ "src/**/*.rs" ]

[extensions.ui.paths]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ type = "function"
export = "run"

[extensions.build]
command = "cargo wasi build --release"
path = "target/wasm32-wasi/release/payment-customization.wasm"
command = "cargo build --target=wasm32-wasip1 --release"
path = "target/wasm32-wasip1/release/payment-customization.wasm"
watch = [ "src/**/*.rs" ]

[extensions.ui.paths]
Expand Down
Loading