static contract in c

This commit is contained in:
NikVolf
2017-04-27 23:18:54 +03:00
parent 3df0243f6a
commit 5df3164400
2 changed files with 78 additions and 8 deletions
+13 -8
View File
@@ -9,17 +9,22 @@ if [ ${file: -3} == ".rs" ]
then
# Rust is compiled with rustc
rustc $file -o out/contract.js -O --target wasm32-unknown-emscripten
# Allocator replacer
cargo run --manifest-path=./../ext/Cargo.toml --release -- ./out/contract.wasm ./out/contract.wasm
# Symbols optimizer
cargo run --manifest-path=./../opt/Cargo.toml --release -- ./out/contract.wasm ./out/contract.wasm
# Gas injector
cargo run --manifest-path=./../gas/Cargo.toml --release -- ./out/contract.wasm ./out/contract.wasm
else
# c/c++ can be compiled directly by emcc
emcc $file -Os -s WASM=1 -s SIDE_MODULE=1 -o out/contract.wasm
# Gas injector
cargo run --manifest-path=./../gas/Cargo.toml --release -- ./out/contract.wasm ./out/contract.wasm
fi
# Gas injector
cargo run --manifest-path=./../gas/Cargo.toml --release -- ./out/contract.wasm ./out/contract.wasm
# Allocator replacer
cargo run --manifest-path=./../ext/Cargo.toml --release -- ./out/contract.wasm ./out/contract.wasm
# Symbols optimizer
cargo run --manifest-path=./../opt/Cargo.toml --release -- ./out/contract.wasm ./out/contract.wasm