mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 01:41:03 +00:00
Build parachains (#207)
* Fix build of test-chains. * Add test-chains into build and publish scripts
This commit is contained in:
committed by
Robert Habermeier
parent
094b2568b2
commit
14675edcbc
@@ -10,3 +10,4 @@ cd demo/runtime/wasm && ./build.sh && cd ../../..
|
|||||||
cd substrate/executor/wasm && ./build.sh && cd ../../..
|
cd substrate/executor/wasm && ./build.sh && cd ../../..
|
||||||
cd substrate/test-runtime/wasm && ./build.sh && cd ../../..
|
cd substrate/test-runtime/wasm && ./build.sh && cd ../../..
|
||||||
cd polkadot/runtime/wasm && ./build.sh && cd ../../..
|
cd polkadot/runtime/wasm && ./build.sh && cd ../../..
|
||||||
|
cd polkadot/parachain/test-chains && ./build.sh && cd ../../..
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ crate-type = ["cdylib"]
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
polkadot-parachain = { path = "../../", default-features = false }
|
polkadot-parachain = { path = "../../", default-features = false }
|
||||||
wee_alloc = "0.2.0"
|
wee_alloc = "0.4.0"
|
||||||
tiny-keccak = "1.4"
|
tiny-keccak = "1.4"
|
||||||
pwasm-libc = "0.2"
|
pwasm-libc = "0.2"
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
//! Basic parachain that adds a number as part of its state.
|
//! Basic parachain that adds a number as part of its state.
|
||||||
|
|
||||||
#![cfg_attr(not(feature = "std"), no_std)]
|
#![cfg_attr(not(feature = "std"), no_std)]
|
||||||
#![cfg_attr(not(feature = "std"), feature(alloc, core_intrinsics, global_allocator, lang_items))]
|
#![cfg_attr(not(feature = "std"), feature(alloc, core_intrinsics, global_allocator, lang_items, panic_implementation))]
|
||||||
|
|
||||||
#[cfg(not(feature = "std"))]
|
#[cfg(not(feature = "std"))]
|
||||||
extern crate alloc;
|
extern crate alloc;
|
||||||
|
|||||||
@@ -16,19 +16,23 @@
|
|||||||
|
|
||||||
//! Defines WASM module logic.
|
//! Defines WASM module logic.
|
||||||
|
|
||||||
|
use core::intrinsics;
|
||||||
|
|
||||||
use parachain::{self, ValidationResult};
|
use parachain::{self, ValidationResult};
|
||||||
use parachain::codec::Slicable;
|
use parachain::codec::Slicable;
|
||||||
use super::{HeadData, BlockData};
|
use super::{HeadData, BlockData};
|
||||||
|
|
||||||
#[lang = "panic_fmt"]
|
#[panic_implementation]
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern fn panic_fmt(
|
pub fn rust_begin_panic(_info: &::core::panic::PanicInfo) -> ! {
|
||||||
_args: ::core::fmt::Arguments,
|
unsafe {
|
||||||
_file: &'static str,
|
intrinsics::abort()
|
||||||
_line: u32,
|
}
|
||||||
_col: u32,
|
}
|
||||||
) -> ! {
|
|
||||||
use core::intrinsics;
|
#[lang = "oom"]
|
||||||
|
#[no_mangle]
|
||||||
|
pub fn oom() -> ! {
|
||||||
unsafe {
|
unsafe {
|
||||||
intrinsics::abort();
|
intrinsics::abort();
|
||||||
}
|
}
|
||||||
|
|||||||
+13
@@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
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
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
set -e
|
|
||||||
|
|
||||||
rm -rf ./target
|
|
||||||
for i in */
|
|
||||||
do
|
|
||||||
i=${i%/}
|
|
||||||
cd $i
|
|
||||||
|
|
||||||
# TODO: stop using exact nightly when wee-alloc works on normal nightly.
|
|
||||||
RUSTFLAGS="-C link-arg=--import-memory" cargo +nightly-2018-03-07 build --target=wasm32-unknown-unknown --release --no-default-features
|
|
||||||
wasm-gc target/wasm32-unknown-unknown/release/$i.wasm ../../tests/res/$i.wasm
|
|
||||||
cd ..
|
|
||||||
done
|
|
||||||
Binary file not shown.
@@ -4,7 +4,7 @@ set -e
|
|||||||
|
|
||||||
REPO="github.com/paritytech/polkadot-wasm-bin.git"
|
REPO="github.com/paritytech/polkadot-wasm-bin.git"
|
||||||
REPO_AUTH="${GH_TOKEN}:@${REPO}"
|
REPO_AUTH="${GH_TOKEN}:@${REPO}"
|
||||||
SRCS=( "polkadot/runtime/wasm" "substrate/executor/wasm" "demo/runtime/wasm" "substrate/test-runtime/wasm" )
|
SRCS=( "polkadot/runtime/wasm" "substrate/executor/wasm" "demo/runtime/wasm" "substrate/test-runtime/wasm" "polkadot/parachain/test-chains" )
|
||||||
DST=".wasm-binaries"
|
DST=".wasm-binaries"
|
||||||
TARGET="wasm32-unknown-unknown"
|
TARGET="wasm32-unknown-unknown"
|
||||||
UTCDATE=`date -u "+%Y%m%d.%H%M%S.0"`
|
UTCDATE=`date -u "+%Y%m%d.%H%M%S.0"`
|
||||||
|
|||||||
Reference in New Issue
Block a user