Merge branch 'chore/remove-fixed-hash' of github.com:paritytech/primitives into chore/remove-fixed-hash
* 'chore/remove-fixed-hash' of github.com:paritytech/primitives: Add `rust-toolchain` file update dependencies to the `primitives repo` Add a new crate for testing `no-std` Add a new crate for testing `no-std` make it work on no-std by disabling default ft fix error on nightly
This commit is contained in:
commit
c623a42b62
|
@ -1,2 +1,2 @@
|
|||
[workspace]
|
||||
members = ["ethereum-types", "ethbloom"]
|
||||
members = ["ethereum-types", "ethbloom"]
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
[package]
|
||||
name = "no-std-tests"
|
||||
version = "0.0.1"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
description = "Tests for no-std environments"
|
||||
license = "MIT"
|
||||
|
||||
[dependencies]
|
||||
libc = { version = "0.2", default-features = false }
|
||||
ethereum-types = { path = "../ethereum-types", default-features = false }
|
||||
ethbloom = { path = "../ethbloom", default-features = false }
|
||||
fixed-hash = { version = "0.2", default-features = false }
|
|
@ -0,0 +1 @@
|
|||
nightly
|
|
@ -0,0 +1,27 @@
|
|||
#![feature(lang_items, start, panic_implementation)]
|
||||
#![no_std]
|
||||
|
||||
extern crate libc;
|
||||
extern crate ethereum_types;
|
||||
extern crate ethbloom;
|
||||
extern crate fixed_hash;
|
||||
|
||||
use ethereum_types::{Address, Public, Secret, Signature};
|
||||
|
||||
#[start]
|
||||
fn start(_argc: isize, _argv: *const *const u8) -> isize {
|
||||
0
|
||||
}
|
||||
|
||||
#[cfg(not(test))]
|
||||
#[lang = "eh_personality"]
|
||||
#[no_mangle]
|
||||
pub extern "C" fn rust_eh_personality() {}
|
||||
|
||||
#[cfg(not(test))]
|
||||
#[panic_implementation]
|
||||
fn panic(_info: &core::panic::PanicInfo) -> ! {
|
||||
unsafe {
|
||||
libc::abort();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue