Skip to content

Commit

Permalink
Add erasure rust logic under feature flag
Browse files Browse the repository at this point in the history
  • Loading branch information
aeyakovenko authored and sakridge committed Apr 18, 2018
1 parent d7670cd commit 05371dc
Show file tree
Hide file tree
Showing 4 changed files with 449 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ repository = "https://github.com/solana-labs/solana"
authors = [
"Anatoly Yakovenko <[email protected]>",
"Greg Fitzgerald <[email protected]>",
"Stephen Akridge <[email protected]>",
]
license = "Apache-2.0"

Expand Down Expand Up @@ -42,6 +43,7 @@ codecov = { repository = "solana-labs/solana", branch = "master", service = "git
unstable = []
ipv6 = []
cuda = []
erasure = []

[dependencies]
rayon = "1.0.0"
Expand Down
5 changes: 4 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
use std::env;

fn main() {
println!("cargo:rustc-link-search=native=.");
if !env::var("CARGO_FEATURE_CUDA").is_err() {
println!("cargo:rustc-link-search=native=.");
println!("cargo:rustc-link-lib=static=cuda_verify_ed25519");
println!("cargo:rustc-link-search=native=/usr/local/cuda/lib64");
println!("cargo:rustc-link-lib=dylib=cudart");
println!("cargo:rustc-link-lib=dylib=cuda");
println!("cargo:rustc-link-lib=dylib=cudadevrt");
}
if !env::var("CARGO_FEATURE_ERASURE").is_err() {
println!("cargo:rustc-link-lib=dylib=Jerasure");
}
}
Loading

0 comments on commit 05371dc

Please sign in to comment.