Commit 22c4b2d3 authored by Andrew Jones's avatar Andrew Jones Committed by Hero Bird

[examples] add +nightly toolchain to examples build scripts (#150)

parent 7bfc9a0b
......@@ -7,7 +7,7 @@ PROJNAME={{name}}
# rm Cargo.lock
CARGO_INCREMENTAL=0 &&
cargo build --no-default-features --release --features generate-api-description --target=wasm32-unknown-unknown --verbose
cargo +nightly build --no-default-features --release --features generate-api-description --target=wasm32-unknown-unknown --verbose
wasm2wat -o target/$PROJNAME.wat target/wasm32-unknown-unknown/release/$PROJNAME.wasm
cat target/$PROJNAME.wat | sed "s/(import \"env\" \"memory\" (memory (;0;) 2))/(import \"env\" \"memory\" (memory (;0;) 2 16))/" > target/$PROJNAME-fixed.wat
wat2wasm -o target/$PROJNAME.wasm target/$PROJNAME-fixed.wat
......
......@@ -10,7 +10,7 @@ PROJNAME=erc20
cargo clean
rm Cargo.lock
CARGO_INCREMENTAL=0 cargo build --release --target=wasm32-unknown-unknown --verbose
CARGO_INCREMENTAL=0 cargo +nightly build --no-default-features --release --target=wasm32-unknown-unknown --verbose
wasm2wat -o target/$PROJNAME.wat target/wasm32-unknown-unknown/release/$PROJNAME.wasm
cat target/$PROJNAME.wat | sed "s/(import \"env\" \"memory\" (memory (;0;) 2))/(import \"env\" \"memory\" (memory (;0;) 2 16))/" > target/$PROJNAME-fixed.wat
wat2wasm -o target/$PROJNAME.wasm target/$PROJNAME-fixed.wat
......
......@@ -7,7 +7,7 @@ PROJNAME=erc20
# cargo clean
# rm Cargo.lock
CARGO_INCREMENTAL=0 cargo build --no-default-features --release --features generate-api-description --target=wasm32-unknown-unknown --verbose
CARGO_INCREMENTAL=0 cargo +nightly build --no-default-features --release --features generate-api-description --target=wasm32-unknown-unknown --verbose
wasm2wat -o target/$PROJNAME.wat target/wasm32-unknown-unknown/release/$PROJNAME.wasm
cat target/$PROJNAME.wat | sed "s/(import \"env\" \"memory\" (memory (;0;) 2))/(import \"env\" \"memory\" (memory (;0;) 2 16))/" > target/$PROJNAME-fixed.wat
wat2wasm -o target/$PROJNAME.wasm target/$PROJNAME-fixed.wat
......
......@@ -5,8 +5,8 @@ PROJNAME=events
# cargo clean
# rm Cargo.lock
CARGO_INCREMENTAL=0 cargo build --release --features generate-api-description --target=wasm32-unknown-unknown --verbose
CARGO_INCREMENTAL=0 cargo +nightly build --no-default-features --release --features generate-api-description --target=wasm32-unknown-unknown --verbose
wasm2wat -o target/$PROJNAME.wat target/wasm32-unknown-unknown/release/$PROJNAME.wasm
cat target/$PROJNAME.wat | sed "s/(import \"env\" \"memory\" (memory (;0;) 2))/(import \"env\" \"memory\" (memory (;0;) 2 16))/" > target/$PROJNAME-fixed.wat
wat2wasm -o target/$PROJNAME.wasm target/$PROJNAME-fixed.wat
wasm-prune --exports call,deploy target/$PROJNAME.wasm target/$PROJNAME-pruned.wasm
\ No newline at end of file
wasm-prune --exports call,deploy target/$PROJNAME.wasm target/$PROJNAME-pruned.wasm
......@@ -7,7 +7,7 @@ PROJNAME=flipper
# cargo clean
# rm Cargo.lock
CARGO_INCREMENTAL=0 cargo build --release --features generate-api-description --target=wasm32-unknown-unknown --verbose
CARGO_INCREMENTAL=0 cargo +nightly build --no-default-features --release --features generate-api-description --target=wasm32-unknown-unknown --verbose
wasm2wat -o target/$PROJNAME.wat target/wasm32-unknown-unknown/release/$PROJNAME.wasm
cat target/$PROJNAME.wat | sed "s/(import \"env\" \"memory\" (memory (;0;) 2))/(import \"env\" \"memory\" (memory (;0;) 2 16))/" > target/$PROJNAME-fixed.wat
wat2wasm -o target/$PROJNAME.wasm target/$PROJNAME-fixed.wat
......
......@@ -8,7 +8,7 @@
PROJNAME=erc20
#cargo clean
#rm Cargo.lock
CARGO_INCREMENTAL=0 cargo build --release --target=wasm32-unknown-unknown --verbose
CARGO_INCREMENTAL=0 cargo +nightly build --no-default-features --release --target=wasm32-unknown-unknown --verbose
wasm2wat -o target/$PROJNAME.wat target/wasm32-unknown-unknown/release/$PROJNAME.wasm
cat target/$PROJNAME.wat | sed "s/(import \"env\" \"memory\" (memory (;0;) 2))/(import \"env\" \"memory\" (memory (;0;) 2 16))/" > target/$PROJNAME-fixed.wat
wat2wasm -o target/$PROJNAME.wasm target/$PROJNAME-fixed.wat
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment