Skip to content

Commit

Permalink
address deps but rustc crashed -- potentially due to crates renaming …
Browse files Browse the repository at this point in the history
  • Loading branch information
Liwei Guo committed Jul 2, 2020
1 parent 383e7e6 commit b5be32f
Show file tree
Hide file tree
Showing 9 changed files with 7,438 additions and 11 deletions.
7,384 changes: 7,384 additions & 0 deletions Cargo.lock

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions common/nibble/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@

//! `Nibble` represents a four-bit unsigned integer.

#![cfg_attr(all(feature = "mesalock_sgx", not(target_env = "sgx")), no_std)]
#![cfg_attr(
all(target_env = "sgx", target_vendor = "mesalock"),
feature(rustc_private)
)]

#[cfg(all(feature = "mesalock_sgx", not(target_env = "sgx")))]
#[macro_use]
extern crate sgx_tstd as std;


#[cfg(feature = "fuzzing")]
use proptest::prelude::*;
use serde::{Deserialize, Serialize};
Expand Down
3 changes: 2 additions & 1 deletion consensus/enclave/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ sgx_unwind = { rev = "v1.1.2", git = "https://github.com/apache/teaclave-sgx-sdk
#libra-types = { path = "../../sgx-libs/types", version = "0.1.0", package = "libra-types-sgx"}
lcs = { path = "../../sgx-deps/lcs", version = "0.1.0", package = "libra-canonical-serialization-sgx"}
libra-crypto-derive = { path = "../../sgx-deps/crypto/crypto-derive", version = "0.1.0", package = "libra-crypto-derive-sgx"}
#libra-crypto = { path = "../../sgx-deps/crypto/crypto/", version = "0.1.0", package = "libra-crypto-sgx"}
libra-crypto = { path = "../../sgx-deps/crypto/crypto/", version = "0.1.0", package = "libra-crypto-sgx"}
#hmac = "0.8.1"

2 changes: 1 addition & 1 deletion consensus/enclave/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ all: $(Rust_Enclave_Name)

$(Rust_Enclave_Name): $(Rust_Enclave_Files)
ifeq ($(XARGO_SGX), 1)
RUSTFLAGS="-Z force-unstable-if-unmarked" RUST_TARGET_PATH=$(Rust_Target_Path) xargo build --target x86_64-unknown-linux-sgx --release --verbose --color always 2>&1 | less -r
RUST_BACKTRACE=1 RUSTFLAGS="-Z force-unstable-if-unmarked" RUST_TARGET_PATH=$(Rust_Target_Path) xargo build --target x86_64-unknown-linux-sgx --release --verbose --color always 2>&1 | less -r
cp ./target/x86_64-unknown-linux-sgx/release/libhelloworldsampleenclave.a ../lib/libenclave.a
else
cargo build --release --verbose
Expand Down
13 changes: 12 additions & 1 deletion crypto/crypto-derive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// SPDX-License-Identifier: Apache-2.0

#![forbid(unsafe_code)]

//! # Derive macros for crypto operations
//! This crate contains four types of derive macros:
//!
Expand Down Expand Up @@ -97,6 +96,18 @@

#![forbid(unsafe_code)]

#![cfg_attr(all(feature = "mesalock_sgx", not(target_env = "sgx")), no_std)]
#![cfg_attr(
all(target_env = "sgx", target_vendor = "mesalock"),
feature(rustc_private)
)]

#[cfg(all(feature = "mesalock_sgx", not(target_env = "sgx")))]
#[macro_use]
extern crate sgx_tstd as std;



extern crate proc_macro;

mod hasher;
Expand Down
11 changes: 11 additions & 0 deletions crypto/crypto/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@

//! A library supplying various cryptographic primitives

#![cfg_attr(all(feature = "mesalock_sgx", not(target_env = "sgx")), no_std)]
#![cfg_attr(
all(target_env = "sgx", target_vendor = "mesalock"),
feature(rustc_private)
)]

#[cfg(all(feature = "mesalock_sgx", not(target_env = "sgx")))]
#[macro_use]
extern crate sgx_tstd as std;


pub mod ed25519;
pub mod error;
pub mod hash;
Expand Down
14 changes: 7 additions & 7 deletions sgx-deps/crypto/crypto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ name = "libra_crypto_sgx"
path = "../../../crypto/crypto/src/lib.rs"

[dependencies]
#curve25519-dalek = { git = "https://github.com/zaxguo/curve25519-dalek.git", branch = "fiat2", default-features = false }
curve25519-dalek = { git = "https://github.com/novifinancial/curve25519-dalek.git", branch = "fiat2", default-features = false }
#ed25519-dalek = { git = "https://github.com/zaxguo/ed25519-dalek.git", branch = "fiat2", features = ["serde"], default-features = false }
ed25519-dalek = { git = "https://github.com/novifinancial/ed25519-dalek.git", branch = "fiat2", features = ["serde"], default-features = false }
#x25519-dalek = { git = "https://github.com/zaxguo/x25519-dalek.git", branch = "fiat2", default-features = false }
x25519-dalek = { git = "https://github.com/novifinancial/x25519-dalek.git", branch = "fiat2", default-features = false }
curve25519-dalek = { git = "https://github.com/zaxguo/curve25519-dalek.git", branch = "fiat2", default-features = false }
#curve25519-dalek = { git = "https://github.com/novifinancial/curve25519-dalek.git", branch = "fiat2", default-features = false }
ed25519-dalek = { git = "https://github.com/zaxguo/ed25519-dalek.git", branch = "fiat2", features = ["serde"], default-features = false }
#ed25519-dalek = { git = "https://github.com/novifinancial/ed25519-dalek.git", branch = "fiat2", features = ["serde"], default-features = false }
x25519-dalek = { git = "https://github.com/zaxguo/x25519-dalek.git", branch = "fiat2", default-features = false }
#x25519-dalek = { git = "https://github.com/novifinancial/x25519-dalek.git", branch = "fiat2", default-features = false }
anyhow = { git = "https://github.com/mesalock-linux/anyhow-sgx.git", tag = "sgx_1.1.2" }
bytes = { git = "https://github.com/mesalock-linux/bytes-sgx.git", tag = "sgx_1.1.2" }
digest = "0.9.0"
Expand All @@ -33,7 +33,7 @@ rand = {git = "https://github.com/mesalock-linux/rand-sgx.git", tag = "sgx_1.1.2
rand_core = {git = "https://github.com/mesalock-linux/rand-sgx.git", tag = "sgx_1.1.2"}
serde = {git = "https://github.com/mesalock-linux/serde-sgx.git", tag = "sgx_1.1.2", features = ["derive"]}
serde_bytes = {git = "https://github.com/mesalock-linux/serde-bytes-sgx.git", tag = "sgx_1.1.2"}
serde-name = "0.1.0"
#serde-name = "0.1.0"
sha2 = "0.9.1"
static_assertions = { version = "1.1.0", optional = true }
thiserror = { git = "https://github.com/mesalock-linux/thiserror-sgx.git", tag = "sgx_1.1.2" }
Expand Down
2 changes: 1 addition & 1 deletion sgx-deps/nibble/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ edition = "2018"

[lib]
name = "libra_nibble_sgx"
path = "../../common/nibble"
path = "../../common/nibble/src/lib.rs"

[dependencies]
proptest = { version = "0.10.0", optional = true }
Expand Down
9 changes: 9 additions & 0 deletions types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
// SPDX-License-Identifier: Apache-2.0

#![forbid(unsafe_code)]
#![cfg_attr(all(feature = "mesalock_sgx", not(target_env = "sgx")), no_std)]
#![cfg_attr(
all(target_env = "sgx", target_vendor = "mesalock"),
feature(rustc_private)
)]

#[cfg(all(feature = "mesalock_sgx", not(target_env = "sgx")))]
#[macro_use]
extern crate sgx_tstd as std;

pub mod access_path;
pub mod account_address;
Expand Down

0 comments on commit b5be32f

Please sign in to comment.