mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 07:41:08 +00:00
Use --export-table from the latest LLD (#316)
* Remove unused build.sh * Don't use wasm-export-table anymore. * Rebuild binaries. * Fix build script.
This commit is contained in:
committed by
Gav Wood
parent
f982801ed7
commit
fed50df6ed
@@ -73,7 +73,6 @@ rustup update nightly
|
||||
rustup target add wasm32-unknown-unknown --toolchain nightly
|
||||
rustup update stable
|
||||
cargo install --git https://github.com/alexcrichton/wasm-gc
|
||||
cargo install --git https://github.com/pepyakin/wasm-export-table.git
|
||||
sudo apt install cmake pkg-config libssl-dev
|
||||
```
|
||||
|
||||
|
||||
BIN
Binary file not shown.
Binary file not shown.
@@ -11,9 +11,3 @@ rustup update stable
|
||||
# Install wasm-gc. It's useful for stripping slimming down wasm binaries.
|
||||
command -v wasm-gc || \
|
||||
cargo +nightly install --git https://github.com/alexcrichton/wasm-gc
|
||||
|
||||
# At the moment of writing, rustc still uses LLD 6 which produces wasm binaries
|
||||
# that don't export a table. Meanwhile, we are waiting for LLD 7 to come
|
||||
# in rustc we could use this handy little tool.
|
||||
command -v wasm-export-table || \
|
||||
cargo +nightly install --git https://github.com/pepyakin/wasm-export-table.git
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
rm -rf ./target
|
||||
for i in */
|
||||
do
|
||||
i=${i%/}
|
||||
cd $i
|
||||
|
||||
RUSTFLAGS="-C link-arg=--import-memory" cargo +nightly build --target=wasm32-unknown-unknown --release --no-default-features
|
||||
wasm-gc target/wasm32-unknown-unknown/release/$i.wasm ../../tests/res/$i.wasm
|
||||
cd ..
|
||||
done
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
@@ -1,11 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
cargo +nightly build --target=wasm32-unknown-unknown --release
|
||||
RUSTFLAGS="-C link-arg=--export-table" cargo +nightly build --target=wasm32-unknown-unknown --release
|
||||
for i in test
|
||||
do
|
||||
# Add export of the default table under name 'table'.
|
||||
wasm-export-table target/wasm32-unknown-unknown/release/runtime_$i.wasm target/wasm32-unknown-unknown/release/runtime_$i.table.wasm
|
||||
cp target/wasm32-unknown-unknown/release/runtime_$i.table.wasm target/wasm32-unknown-unknown/release/runtime_$i.wasm
|
||||
wasm-gc target/wasm32-unknown-unknown/release/runtime_$i.wasm target/wasm32-unknown-unknown/release/runtime_$i.compact.wasm
|
||||
done
|
||||
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Reference in New Issue
Block a user