-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
22 additions
and
1,844 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
[submodule "SealPIR"] | ||
path = SealPIR | ||
url = https://github.com/sga001/SealPIR.git | ||
[submodule "sealpir"] | ||
path = sealpir | ||
url = https://github.com/microsoft/sealpir.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Submodule SealPIR
deleted from
d82128
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,32 @@ | ||
extern crate gcc; | ||
extern crate cmake; | ||
|
||
use std::env; | ||
|
||
fn main() { | ||
gcc::Build::new() | ||
.file("SealPIR/pir.cpp") | ||
.file("SealPIR/pir_server.cpp") | ||
.file("SealPIR/pir_client.cpp") | ||
.file("sealpir/pir.cpp") | ||
.file("sealpir/pir_server.cpp") | ||
.file("sealpir/pir_client.cpp") | ||
.file("sealpir-bindings/pir_rust.cpp") | ||
.include("sealpir-bindings/") | ||
.include("SealPIR/") | ||
.include("deps/SEAL/SEAL/") | ||
.include("sealpir/") | ||
.include("deps/SEAL_2.3.1/SEAL/") | ||
.flag("-Wno-unknown-pragmas") | ||
.flag("-Wno-sign-compare") | ||
.flag("-Wno-unused-parameter") | ||
.flag("-std=c++11") | ||
.flag("-std=c++17") | ||
.flag("-fopenmp") | ||
.pic(true) | ||
.cpp(true) | ||
.compile("libsealpir.a"); | ||
|
||
let link_dir = env::var("CARGO_MANIFEST_DIR").unwrap(); | ||
// Compile and link SEAL | ||
let dst = cmake::Config::new("deps/SEAL_2.3.1/SEAL/") | ||
// .define("CMAKE_BUILD_TYPE", "Release") | ||
.define("CMAKE_POSITION_INDEPENDENT_CODE", "ON") | ||
.build(); | ||
|
||
println!("cargo:rustc-link-search={}/deps/SEAL/bin/", link_dir); | ||
println!("cargo:rustc-link-search={}/lib/", dst.display()); | ||
println!("cargo:rustc-link-lib=static=seal"); | ||
} |