Skip to content

Commit 2ae226e

Browse files
authored
Merge pull request #580 from Shopify/lopert.wasm32-wasi-removal
Stop using cargo-wasi
2 parents 6ad2f9e + 8df06a5 commit 2ae226e

File tree

24 files changed

+50
-60
lines changed

24 files changed

+50
-60
lines changed

.github/workflows/rust.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
run: cargo clippy -- -D warnings
2727
- name: Run tests
2828
run: cargo test
29-
- name: Add wasm32-wasi target
30-
run: rustup target add wasm32-wasi
31-
- name: Build with wasm32-wasi target
32-
run: cargo build --release --target wasm32-wasi
29+
- name: Add wasm32-wasip1 target
30+
run: rustup target add wasm32-wasip1
31+
- name: Build with wasm32-wasip1 target
32+
run: cargo build --release --target wasm32-wasip1

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

Lines changed: 2 additions & 2 deletions
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"
17-
path = "target/wasm32-wasi/release/{{handle | replace: " ", "-" | downcase}}.wasm"
16+
command = "cargo build --target=wasm32-wasip1 --release"
17+
path = "target/wasm32-wasip1/release/{{handle | replace: " ", "-" | downcase}}.wasm"
1818
watch = [ "src/**/*.rs" ]
1919

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ description = "t:description"
1313
export = "run"
1414

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

2020
[extensions.ui.paths]

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ description = "t:description"
1313
export = "run"
1414

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

2020
[extensions.ui.paths]

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ description = "t:description"
1313
export = "run"
1414

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

2020
[extensions.ui.paths]

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ description = "t:description"
1313
export = "run"
1414

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

2020
[extensions.ui.paths]

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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ description = "t:description"
1313
export = "run"
1414

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

2020
[extensions.ui.paths]

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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ description = "t:description"
1313
export = "run"
1414

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

2020
[extensions.ui.paths]

0 commit comments

Comments
 (0)