Skip to content
Snippets Groups Projects
Commit fed50df6 authored by Sergey Pepyakin's avatar Sergey Pepyakin Committed by Gav Wood
Browse files

Use --export-table from the latest LLD (#316)

* Remove unused build.sh

* Don't use wasm-export-table anymore.

* Rebuild binaries.

* Fix build script.
parent f982801e
Branches
No related merge requests found
Showing
with 1 addition and 24 deletions
......@@ -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
```
......
No preview for this file type
No preview for this file type
......@@ -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
#!/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
No preview for this file type
No preview for this file type
#!/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
No preview for this file type
No preview for this file type
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