This repository has been archived by the owner on Sep 19, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'chore/remove-fixed-hash' of github.com:paritytech/primi…
…tives 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
- Loading branch information
Showing
4 changed files
with
41 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
[workspace] | ||
members = ["ethereum-types", "ethbloom"] | ||
members = ["ethereum-types", "ethbloom"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[package] | ||
name = "no-std-tests" | ||
version = "0.0.1" | ||
authors = ["Parity Technologies <[email protected]>"] | ||
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 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
nightly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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(); | ||
} | ||
} |