Skip to content

Commit

Permalink
Wasm build error (paritytech#426)
Browse files Browse the repository at this point in the history
* Wasm build error

* Add chainx_runtime_compact.wasm
  • Loading branch information
gguoss authored Mar 19, 2019
1 parent db728e3 commit 5632908
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
Binary file not shown.
2 changes: 1 addition & 1 deletion cli/src/genesis_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ pub fn testnet_genesis(genesis_spec: GenesisSpec) -> GenesisConfig {

GenesisConfig {
consensus: Some(ConsensusConfig {
code: include_bytes!("./chainx_runtime_wasm.compact.wasm").to_vec(),
code: include_bytes!("./chainx_runtime.compact.wasm").to_vec(),
authorities: endowed
.iter()
.cloned()
Expand Down
2 changes: 1 addition & 1 deletion executor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ pub use substrate_executor::NativeExecutor;
use substrate_executor::native_executor_instance;

native_executor_instance!(pub Executor, chainx_runtime::api::dispatch, chainx_runtime::native_version,
include_bytes!("../../runtime/wasm/target/wasm32-unknown-unknown/release/chainx_runtime_wasm.compact.wasm"));
include_bytes!("../../runtime/wasm/target/wasm32-unknown-unknown/release/chainx_runtime.compact.wasm"));
5 changes: 3 additions & 2 deletions runtime/wasm/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ if cargo --version | grep -q "nightly"; then
else
CARGO_CMD="cargo +nightly"
fi
$CARGO_CMD build --target=wasm32-unknown-unknown --release
for i in chainx_runtime_wasm

CARGO_INCREMENTAL=0 RUSTFLAGS="-C link-arg=--export-table" $CARGO_CMD build --target=wasm32-unknown-unknown --release
for i in chainx_runtime
do
wasm-gc target/wasm32-unknown-unknown/release/$i.wasm target/wasm32-unknown-unknown/release/$i.compact.wasm
done

0 comments on commit 5632908

Please sign in to comment.