mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-27 12:54:42 +00:00
Remove plugin build script in favor of build.rs plugin builder
This commit is contained in:
parent
0bdbbdd9b6
commit
1dd92c3c28
1 changed files with 0 additions and 46 deletions
|
@ -1,46 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# echo "Clearing cached plugins..."
|
||||
# cargo clean --manifest-path plugins/Cargo.toml
|
||||
|
||||
echo "Building Wasm plugins..."
|
||||
# cargo build --release --target wasm32-unknown-unknown --manifest-path plugins/Cargo.toml
|
||||
cargo build --release --target wasm32-wasi --manifest-path plugins/Cargo.toml
|
||||
|
||||
echo
|
||||
echo "Extracting binaries..."
|
||||
rm -rf plugins/bin
|
||||
mkdir plugins/bin
|
||||
|
||||
for f in plugins/target/wasm32-wasi/release/*.wasm
|
||||
do
|
||||
name=$(basename $f)
|
||||
cp $f plugins/bin/$name
|
||||
echo "- Extracted plugin $name"
|
||||
done
|
||||
|
||||
echo
|
||||
echo "Creating .wat versions (for human inspection)..."
|
||||
|
||||
for f in plugins/bin/*.wasm
|
||||
do
|
||||
name=$(basename $f)
|
||||
base=$(echo $name | sed "s/\..*//")
|
||||
wasm2wat $f --output plugins/bin/$base.wat
|
||||
echo "- Converted $base.wasm -> $base.wat"
|
||||
done
|
||||
|
||||
echo
|
||||
echo "Optimizing plugins using wasm-opt..."
|
||||
|
||||
for f in plugins/bin/*.wasm
|
||||
do
|
||||
name=$(basename $f)
|
||||
wasm-opt -Oz $f --output $f
|
||||
echo "- Optimized $name"
|
||||
done
|
||||
|
||||
echo
|
||||
echo "Done!"
|
Loading…
Reference in a new issue