From cb721012716fff4bc49c12e670798d4790cc5c38 Mon Sep 17 00:00:00 2001 From: Richard Zak Date: Mon, 9 May 2022 15:51:07 -0400 Subject: [PATCH] feat: Intel code hidden for `wasm32-wasi` target Signed-off-by: Richard Zak --- Cargo.toml | 4 +++- src/lib.rs | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 8d4847d..006dc9f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,7 +25,6 @@ rcrypto = ["rand", "rsa", "sha2", "num-integer", "num-traits"] [dependencies] x86_64 = { version = "^0.14.6", default-features = false } -xsave = { version = "^2.0.0", default-features = false } openssl = { version = "^0.10.36", optional = true } bitflags = "^1.3.2" @@ -36,6 +35,9 @@ rand = { version = "^0.8.4", optional = true } sha2 = { version = "0.10.2", optional = true } rsa = { version = "^0.6.0", optional = true } +[target.'cfg(target_arch = "x86_64")'.dependencies] +xsave = { version = "^2.0.0", default-features = false } + [dev-dependencies] testaso = "0.1" rstest = "^0.12.0" diff --git a/src/lib.rs b/src/lib.rs index 0640933..ed4f61d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -27,6 +27,8 @@ pub mod crypto; pub mod page; pub mod parameters; pub mod signature; + +#[cfg(target_arch = "x86_64")] pub mod ssa; /// SGX ENCLU Leaf Instructions