-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.rs
More file actions
26 lines (18 loc) · 718 Bytes
/
build.rs
File metadata and controls
26 lines (18 loc) · 718 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
fn main() {
// sha256
cxx_build::bridge("src/bridge_sha256.rs")
.file("cpp/sha256.cpp")
.flag_if_supported("-std=c++20")
.compile("cxx-sha256");
println!("cargo::rerun-if-changed=src/bridge_sha256.rs");
println!("cargo::rerun-if-changed=cpp/sha256.cpp");
println!("cargo::rerun-if-changed=include/sha256.h");
// key pairs code
cxx_build::bridge("src/bridge_keys.rs")
.flag_if_supported("-std=c++20")
.compile("cxx-keys");
println!("cargo::rerun-if-changed=src/bridge_keys.rs");
println!("cargo::rerun-if-changed=cpp/keys.cpp");
println!("cargo::rerun-if-changed=include/keys.h");
println!("cargo:rustc-link-lib=dylib=gmp");
}