Closed sammyne closed 4 years ago
Add color_quant@master
The original project failed to compile when upgrading to rust 2018, so this commit consists of two commits
Hence, the Diff of Changes reported below is the difference of 2 from 1.
diff --git a/crates/color_quant/Cargo.toml b/crates/color_quant/Cargo.toml index d1e95ab..13502e6 100644 --- a/crates/color_quant/Cargo.toml +++ b/crates/color_quant/Cargo.toml @@ -6,4 +6,13 @@ authors = ["nwin <nwin@users.noreply.github.com>"] readme = "README.md" description = "Color quantization library to reduce n colors to 256 colors." repository = "https://github.com/PistonDevelopers/color_quant.git" -edition = "2018" \ No newline at end of file +edition = "2018" + +[features] +default = ["mesalock_sgx"] +mesalock_sgx = ["sgx_tstd"] +enclave_unit_test = ["sgx_tunittest"] + +[dependencies] +sgx_tstd = { git = "https://github.com/apache/incubator-teaclave-sgx-sdk.git", tag = "v1.1.1", optional = true } +sgx_tunittest = { git = "https://github.com/apache/incubator-teaclave-sgx-sdk.git", tag = "v1.1.1", optional = true } diff --git a/crates/color_quant/src/lib.rs b/crates/color_quant/src/lib.rs index fbc6b4b..593c2bc 100644 --- a/crates/color_quant/src/lib.rs +++ b/crates/color_quant/src/lib.rs @@ -60,6 +60,17 @@ that this copyright notice remain intact. //! let color_map = nq.color_map_rgba(); //! ``` //! + +#![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; +use std::prelude::v1::*; + use std::cmp::{max, min}; macro_rules! clamp(
Add Crates
Description
Add color_quant@master
Crate Meta
NOTICES
The original project failed to compile when upgrading to rust 2018, so this commit consists of two commits
Hence, the Diff of Changes reported below is the difference of 2 from 1.
Diff of Changes