Skip to content

Commit 0fb35a2

Browse files
authored
Clean-up example application READMEs and Cargo config (linera-io#1996)
* Remove custom test runner configuration The custom Wasm test runner no longer exists. * Update build commands in example README files Ensure that the Wasm target is specified.
1 parent 307fd22 commit 0fb35a2

File tree

11 files changed

+12
-16
lines changed

11 files changed

+12
-16
lines changed

.cargo/config.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
[target.wasm32-unknown-unknown]
2-
# Requires running `cargo build --release --bin linera-wasm-test-runner` once first.
3-
runner = "target/release/linera-wasm-test-runner"
4-
51
[target.aarch64-unknown-linux-gnu]
62
linker = "aarch64-linux-gnu-gcc"
73

examples/amm/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ OWNER_AMM=7136460f0c87ae46f966f898d494c4b40c4ae8c527f4d1c0b1fa0f7cff91d20f
6161
Now we have to publish and create the fungible applications. The flag `--wait-for-outgoing-messages` waits until a quorum of validators has confirmed that all sent cross-chain messages have been delivered.
6262

6363
```bash
64-
(cd examples/fungible && cargo build --release)
64+
(cd examples/fungible && cargo build --release --target wasm32-unknown-unknown)
6565

6666
FUN1_APP_ID=$(linera --wait-for-outgoing-messages \
6767
publish-and-create examples/target/wasm32-unknown-unknown/release/fungible_{contract,service}.wasm \
@@ -79,7 +79,7 @@ FUN2_APP_ID=$(linera --wait-for-outgoing-messages \
7979
--json-parameters "{ \"ticker_symbol\": \"FUN2\" }" \
8080
)
8181

82-
(cd examples/amm && cargo build --release)
82+
(cd examples/amm && cargo build --release --target wasm32-unknown-unknown)
8383
AMM_APPLICATION_ID=$(linera --wait-for-outgoing-messages \
8484
publish-and-create examples/target/wasm32-unknown-unknown/release/amm_{contract,service}.wasm \
8585
--json-parameters "{\"tokens\":["\"$FUN1_APP_ID\"","\"$FUN2_APP_ID\""]}" \

examples/amm/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ OWNER_AMM=7136460f0c87ae46f966f898d494c4b40c4ae8c527f4d1c0b1fa0f7cff91d20f
6363
Now we have to publish and create the fungible applications. The flag `--wait-for-outgoing-messages` waits until a quorum of validators has confirmed that all sent cross-chain messages have been delivered.
6464
6565
```bash
66-
(cd examples/fungible && cargo build --release)
66+
(cd examples/fungible && cargo build --release --target wasm32-unknown-unknown)
6767
6868
FUN1_APP_ID=$(linera --wait-for-outgoing-messages \
6969
publish-and-create examples/target/wasm32-unknown-unknown/release/fungible_{contract,service}.wasm \
@@ -81,7 +81,7 @@ FUN2_APP_ID=$(linera --wait-for-outgoing-messages \
8181
--json-parameters "{ \"ticker_symbol\": \"FUN2\" }" \
8282
)
8383
84-
(cd examples/amm && cargo build --release)
84+
(cd examples/amm && cargo build --release --target wasm32-unknown-unknown)
8585
AMM_APPLICATION_ID=$(linera --wait-for-outgoing-messages \
8686
publish-and-create examples/target/wasm32-unknown-unknown/release/amm_{contract,service}.wasm \
8787
--json-parameters "{\"tokens\":["\"$FUN1_APP_ID\"","\"$FUN2_APP_ID\""]}" \

examples/counter/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ OWNER_1=7136460f0c87ae46f966f898d494c4b40c4ae8c527f4d1c0b1fa0f7cff91d20f
4646
Now, compile the `counter` application WebAssembly binaries, publish and create an application instance.
4747

4848
```bash
49-
(cd examples/counter && cargo build --release)
49+
(cd examples/counter && cargo build --release --target wasm32-unknown-unknown)
5050

5151
APPLICATION_ID=$(linera publish-and-create \
5252
examples/target/wasm32-unknown-unknown/release/counter_{contract,service}.wasm \

examples/counter/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ OWNER_1=7136460f0c87ae46f966f898d494c4b40c4ae8c527f4d1c0b1fa0f7cff91d20f
4848
Now, compile the `counter` application WebAssembly binaries, publish and create an application instance.
4949
5050
```bash
51-
(cd examples/counter && cargo build --release)
51+
(cd examples/counter && cargo build --release --target wasm32-unknown-unknown)
5252
5353
APPLICATION_ID=$(linera publish-and-create \
5454
examples/target/wasm32-unknown-unknown/release/counter_{contract,service}.wasm \

examples/fungible/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Now, compile the `fungible` application WebAssembly binaries, and publish them a
6363
bytecode:
6464

6565
```bash
66-
(cd examples/fungible && cargo build --release)
66+
(cd examples/fungible && cargo build --release --target wasm32-unknown-unknown)
6767

6868
BYTECODE_ID=$(linera publish-bytecode \
6969
examples/target/wasm32-unknown-unknown/release/fungible_{contract,service}.wasm)

examples/fungible/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Now, compile the `fungible` application WebAssembly binaries, and publish them a
6565
bytecode:
6666
6767
```bash
68-
(cd examples/fungible && cargo build --release)
68+
(cd examples/fungible && cargo build --release --target wasm32-unknown-unknown)
6969
7070
BYTECODE_ID=$(linera publish-bytecode \
7171
examples/target/wasm32-unknown-unknown/release/fungible_{contract,service}.wasm)

examples/native-fungible/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Compile the `native-fungible` application WebAssembly binaries, and publish them
2626
bytecode:
2727

2828
```bash
29-
(cd examples/native-fungible && cargo build --release)
29+
(cd examples/native-fungible && cargo build --release --target wasm32-unknown-unknown)
3030

3131
BYTECODE_ID="$(linera publish-bytecode \
3232
examples/target/wasm32-unknown-unknown/release/native_fungible_{contract,service}.wasm)"

examples/native-fungible/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Compile the `native-fungible` application WebAssembly binaries, and publish them
2828
bytecode:
2929
3030
```bash
31-
(cd examples/native-fungible && cargo build --release)
31+
(cd examples/native-fungible && cargo build --release --target wasm32-unknown-unknown)
3232
3333
BYTECODE_ID="$(linera publish-bytecode \
3434
examples/target/wasm32-unknown-unknown/release/native_fungible_{contract,service}.wasm)"

examples/non-fungible/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ linera_spawn_and_read_wallet_variables linera net up --testing-prng-seed 37
4040
Compile the `non-fungible` application WebAssembly binaries, and publish them as an application bytecode:
4141

4242
```bash
43-
(cd examples/non-fungible && cargo build --release)
43+
(cd examples/non-fungible && cargo build --release --target wasm32-unknown-unknown)
4444

4545
BYTECODE_ID=$(linera publish-bytecode \
4646
examples/target/wasm32-unknown-unknown/release/non_fungible_{contract,service}.wasm)

0 commit comments

Comments
 (0)