Skip to content

Commit

Permalink
fixup! feat[pallas-crypto]: Implement libsodium vrf signature verific…
Browse files Browse the repository at this point in the history
…ation
  • Loading branch information
AndrewWestberg committed Sep 6, 2024
1 parent 19d1043 commit c29f52d
Showing 1 changed file with 5 additions and 27 deletions.
32 changes: 5 additions & 27 deletions pallas-crypto/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,33 +56,11 @@ fn main() {
// command.current_dir("contrib/libsodium/bin/x64/Release/v142/static")
// });

// ensure the path to libsodium.lib is correct
assert!(std::path::Path::new(
"contrib/libsodium/bin/x64/Release/v142/static/libsodium.lib"
)
.exists());

// copy libsodium.lib to sodium.lib
run("cmd", |command| {
command
.current_dir("contrib/libsodium/bin/x64/Release/v142/static")
.arg("/c")
.arg("copy libsodium.lib sodium.lib")
});

// copy libsodium.pdb to sodium.pdb
run("cmd", |command| {
command
.current_dir("contrib/libsodium/bin/x64/Release/v142/static")
.arg("/c")
.arg("copy libsodium.pdb sodium.pdb")
});

// get the current dir
let current_dir = std::env::current_dir().unwrap();

println!("cargo::rustc-link-search=native={}\\contrib\\libsodium\\bin\\x64\\Release\\v142\\static", current_dir.display());
println!("cargo::rustc-link-lib=static=sodium");
println!("cargo:rustc-link-search=native={}\\contrib\\libsodium\\bin\\x64\\Release\\v142\\static", current_dir.display());
println!("cargo:rustc-link-lib=static=libsodium");
}

// if not windows
Expand All @@ -95,12 +73,12 @@ fn main() {
.disable_shared()
.build();
println!(
"cargo::rustc-link-search=native={}",
"cargo:rustc-link-search=native={}",
libsodium.join("lib").display()
);
println!("cargo::rustc-link-lib=static=sodium");
println!("cargo:rustc-link-lib=static=sodium");
}
println!("cargo::rerun-if-changed=build.rs");
println!("cargo:rerun-if-changed=build.rs");
}

fn run<F>(name: &str, mut configure: F)
Expand Down

0 comments on commit c29f52d

Please sign in to comment.