mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 22:11:02 +00:00
committed by
thiolliere
parent
0b0a42b717
commit
21cb1e9f45
@@ -9,9 +9,8 @@ build = "build.rs"
|
||||
[dependencies]
|
||||
|
||||
[build-dependencies]
|
||||
wasm-builder-runner = { package = "substrate-wasm-builder-runner", version = "1.0.2" }
|
||||
wasm-builder-runner = { package = "substrate-wasm-builder-runner", version = "1.0.3" }
|
||||
|
||||
[features]
|
||||
default = [ "std" ]
|
||||
no_std = []
|
||||
std = []
|
||||
|
||||
@@ -19,7 +19,7 @@ use wasm_builder_runner::{build_current_project_with_rustflags, WasmBuilderSourc
|
||||
fn main() {
|
||||
build_current_project_with_rustflags(
|
||||
"wasm_binary.rs",
|
||||
WasmBuilderSource::Crates("1.0.5"),
|
||||
WasmBuilderSource::Crates("1.0.7"),
|
||||
"-C link-arg=--import-memory",
|
||||
);
|
||||
}
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
//! Basic parachain that executes forever.
|
||||
|
||||
#![no_std]
|
||||
#![cfg_attr(feature = "no_std", feature(core_intrinsics, lang_items, core_panic_info, alloc_error_handler))]
|
||||
#![cfg_attr(not(feature = "std"), feature(core_intrinsics, lang_items, core_panic_info, alloc_error_handler))]
|
||||
|
||||
// Make the WASM binary available.
|
||||
#[cfg(feature = "std")]
|
||||
include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));
|
||||
|
||||
#[cfg(feature = "no_std")]
|
||||
#[cfg(not(feature = "std"))]
|
||||
#[panic_handler]
|
||||
#[no_mangle]
|
||||
pub fn panic(_info: &core::panic::PanicInfo) -> ! {
|
||||
@@ -32,7 +32,7 @@ pub fn panic(_info: &core::panic::PanicInfo) -> ! {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "no_std")]
|
||||
#[cfg(not(feature = "std"))]
|
||||
#[alloc_error_handler]
|
||||
#[no_mangle]
|
||||
pub fn oom(_: core::alloc::Layout) -> ! {
|
||||
@@ -41,7 +41,7 @@ pub fn oom(_: core::alloc::Layout) -> ! {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "no_std")]
|
||||
#[cfg(not(feature = "std"))]
|
||||
#[no_mangle]
|
||||
pub extern fn validate_block(params: *const u8, len: usize) -> usize {
|
||||
loop {}
|
||||
|
||||
Reference in New Issue
Block a user