Skip to content
This repository has been archived by the owner on Sep 19, 2019. It is now read-only.

Commit

Permalink
Merge branch 'master' into chore/remove-fixed-hash
Browse files Browse the repository at this point in the history
  • Loading branch information
dvdplm authored Aug 3, 2018
2 parents 5e04bdc + 020b5d8 commit 32c40e5
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[workspace]
members = ["ethereum-types", "ethbloom"]
members = ["ethereum-types", "ethbloom"]
12 changes: 12 additions & 0 deletions no-std-tests/Cargo.toml
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 }
1 change: 1 addition & 0 deletions no-std-tests/rust-toolchain
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nightly
27 changes: 27 additions & 0 deletions no-std-tests/src/main.rs
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();
}
}

0 comments on commit 32c40e5

Please sign in to comment.