mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-01-08 22:28:12 -05:00
contract: Strip built WASM binaries using wasm-strip from the wabt toolkit
This commit is contained in:
@@ -55,13 +55,14 @@ The following dependencies are also required:
|
||||
| alsa-lib | libasound2-dev |
|
||||
| openssl | libssl-dev |
|
||||
| sqlcipher | libsqlcipher-dev |
|
||||
| wabt | wabt |
|
||||
|
||||
Users of Debian-based systems (e.g. Ubuntu) can simply run the
|
||||
following to install the required dependencies:
|
||||
|
||||
```shell
|
||||
# apt-get update
|
||||
# apt-get install -y git make gcc pkg-config libasound2-dev libssl-dev libsqlcipher-dev
|
||||
# apt-get install -y git make gcc pkg-config libasound2-dev libssl-dev libsqlcipher-dev wabt
|
||||
```
|
||||
|
||||
Alternatively, users can try using the automated script under `contrib`
|
||||
|
||||
@@ -22,7 +22,7 @@ setup_mac() {
|
||||
}
|
||||
|
||||
setup_apt() {
|
||||
apt_deps="git cmake make gcc g++ pkg-config libasound2-dev libclang-dev libssl-dev libsqlcipher-dev libsqlite3-dev"
|
||||
apt_deps="git cmake make gcc g++ pkg-config libasound2-dev libclang-dev libssl-dev libsqlcipher-dev libsqlite3-dev wabt"
|
||||
$1 install $apt_deps || return 1
|
||||
}
|
||||
|
||||
|
||||
@@ -42,6 +42,7 @@ $(WASM_BIN): $(WASM_SRC) $(PROOFS_BIN)
|
||||
RUSTFLAGS="$(RUSTFLAGS)" $(CARGO) build --target=$(WASM_TARGET) \
|
||||
--release --package $(PKGNAME)
|
||||
cp -f ../../../target/$(WASM_TARGET)/release/$@ $@
|
||||
wasm-strip $@
|
||||
|
||||
test-stake-unstake: all
|
||||
RUSTFLAGS="$(RUSTFLAGS)" $(CARGO) test --target=$(RUST_TARGET) \
|
||||
|
||||
@@ -42,6 +42,7 @@ $(WASM_BIN): $(WASM_SRC) $(PROOFS_BIN)
|
||||
RUSTFLAGS="$(RUSTFLAGS)" $(CARGO) build --target=$(WASM_TARGET) \
|
||||
--release --package $(PKGNAME)
|
||||
cp -f ../../../target/$(WASM_TARGET)/release/$@ $@
|
||||
wasm-strip $@
|
||||
|
||||
test-integration: all
|
||||
RUSTFLAGS="$(RUSTFLAGS)" $(CARGO) test --target=$(RUST_TARGET) \
|
||||
|
||||
@@ -42,6 +42,7 @@ $(WASM_BIN): $(WASM_SRC) $(PROOFS_BIN)
|
||||
RUSTFLAGS="$(RUSTFLAGS)" $(CARGO) build --target=$(WASM_TARGET) \
|
||||
--release --package $(PKGNAME)
|
||||
cp -f ../../../target/$(WASM_TARGET)/release/$@ $@
|
||||
wasm-strip $@
|
||||
|
||||
test-integration: all
|
||||
RUSTFLAGS="$(RUSTFLAGS)" $(CARGO) test --target=$(RUST_TARGET) \
|
||||
|
||||
@@ -21,7 +21,6 @@ use darkfi_contract_test_harness::{init_logger, Holder, TestHarness};
|
||||
use log::info;
|
||||
|
||||
#[test]
|
||||
#[ignore]
|
||||
fn deploy_integration() -> Result<()> {
|
||||
smol::block_on(async {
|
||||
init_logger();
|
||||
|
||||
@@ -42,6 +42,7 @@ $(WASM_BIN): $(WASM_SRC) $(PROOFS_BIN)
|
||||
RUSTFLAGS="$(RUSTFLAGS)" $(CARGO) build --target=$(WASM_TARGET) \
|
||||
--release --package $(PKGNAME)
|
||||
cp -f ../../../target/$(WASM_TARGET)/release/$@ $@
|
||||
wasm-strip $@
|
||||
|
||||
test-integration: all
|
||||
RUSTFLAGS="$(RUSTFLAGS)" $(CARGO) test --target=$(RUST_TARGET) \
|
||||
|
||||
Reference in New Issue
Block a user