Skip to content

Commit 3d47f77

Browse files
committed
update build to use wasm32-wasip1 target
1 parent 903bc37 commit 3d47f77

File tree

23 files changed

+28
-38
lines changed

23 files changed

+28
-38
lines changed

checkout/rust/cart-checkout-validation/default/shopify.extension.toml.liquid

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ description = "t:description"
1313
export = "run"
1414

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

checkout/rust/cart-transform/bundles/shopify.extension.toml.liquid

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ description = "t:description"
1313
export = "run"
1414

1515
[extensions.build]
16-
command = "cargo wasi build --release"
16+
command = "cargo build --target=wasm32-wasip1 --release"
1717
path = "target/wasm32-wasi/release/bundles_cart_transform.wasm"
1818
watch = [ "src/**/*.rs" ]
1919

checkout/rust/cart-transform/default/shopify.extension.toml.liquid

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ description = "t:description"
1313
export = "run"
1414

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

checkout/rust/delivery-customization/default/shopify.extension.toml.liquid

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ description = "t:description"
1313
export = "run"
1414

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

checkout/rust/payment-customization/default/shopify.extension.toml.liquid

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ description = "t:description"
1313
export = "run"
1414

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

discounts/rust/discounts-allocator/default/README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,13 @@
44

55
- [Install Rust](https://www.rust-lang.org/tools/install)
66
- 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.
7-
- Install [`cargo-wasi`](https://bytecodealliance.github.io/cargo-wasi/)
8-
- `cargo install cargo-wasi`
97

108
## Building the function
119

12-
You can build this individual function using `cargo wasi`.
10+
You can build this individual function using `cargo build`.
1311

1412
```shell
15-
cargo wasi build --release
13+
cargo build --target=wasm32-wasip1 --release
1614
```
1715

1816
The Shopify CLI `build` command will also execute this, based on the configuration in `shopify.extension.toml`.

discounts/rust/discounts-allocator/default/shopify.extension.toml.liquid

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ description = "t:description"
1313
export = "run"
1414

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

discounts/rust/order-discounts/default/README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,13 @@
44

55
- [Install Rust](https://www.rust-lang.org/tools/install)
66
- 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.
7-
- Install [`cargo-wasi`](https://bytecodealliance.github.io/cargo-wasi/)
8-
- `cargo install cargo-wasi`
97

108
## Building the function
119

12-
You can build this individual function using `cargo wasi`.
10+
You can build this individual function using `cargo build`.
1311

1412
```shell
15-
cargo wasi build --release
13+
cargo build --target=wasm32-wasip1 --release
1614
```
1715

1816
The Shopify CLI `build` command will also execute this, based on the configuration in `shopify.extension.toml`.

discounts/rust/order-discounts/default/shopify.extension.toml.liquid

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ description = "t:description"
1313
export = "run"
1414

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

discounts/rust/product-discounts/default/README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,13 @@
44

55
- [Install Rust](https://www.rust-lang.org/tools/install)
66
- 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.
7-
- Install [`cargo-wasi`](https://bytecodealliance.github.io/cargo-wasi/)
8-
- `cargo install cargo-wasi`
97

108
## Building the function
119

12-
You can build this individual function using `cargo wasi`.
10+
You can build this individual function using `cargo build`.
1311

1412
```shell
15-
cargo wasi build --release
13+
cargo build --target=wasm32-wasip1 --release
1614
```
1715

1816
The Shopify CLI `build` command will also execute this, based on the configuration in `shopify.extension.toml`.

0 commit comments

Comments
 (0)