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

Commit

Permalink
Merge branch 'chore/remove-fixed-hash' of github.com:paritytech/primi…
Browse files Browse the repository at this point in the history
…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
dvdplm committed Aug 5, 2018
2 parents 85d7ed2 + 32c40e5 commit c623a42
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 c623a42

Please sign in to comment.