-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(compiler): add rust bindings to concrete
- Loading branch information
Showing
3,182 changed files
with
1,380,898 additions
and
84 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
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
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 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 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 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 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 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
2 changes: 2 additions & 0 deletions
2
compilers/concrete-compiler/compiler/lib/Bindings/Rust/concrete-sys/.gitignore
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Cargo.lock | ||
target/** |
14 changes: 14 additions & 0 deletions
14
compilers/concrete-compiler/compiler/lib/Bindings/Rust/concrete-sys/Cargo.toml
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[package] | ||
name = "concrete-sys" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
[dependencies] | ||
autocxx = "0.27.1" | ||
cxx = "1.0" | ||
|
||
[build-dependencies] | ||
autocxx-build = "0.27.1" | ||
|
||
[dev-dependencies] | ||
ar = "0.9" |
21 changes: 21 additions & 0 deletions
21
compilers/concrete-compiler/compiler/lib/Bindings/Rust/concrete-sys/Makefile
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
.SILENT: | ||
|
||
update-includes: | ||
rsync -a \ | ||
--include "*/"\ | ||
--include "*.h"\ | ||
--include "*.hpp"\ | ||
--include "*.inc"\ | ||
--include "*.def"\ | ||
--exclude "*"\ | ||
--prune-empty-dirs\ | ||
../../../../include/\ | ||
../../../../../../concrete-optimizer/concrete-optimizer-cpp/src/cpp/\ | ||
../../../../../llvm-project/llvm/include/\ | ||
../../../../../llvm-project/mlir/include/\ | ||
../../../../build/tools/concretelang/concrete-protocol/capnp_src_dir/c++/src/\ | ||
../../../../build/tools/concretelang/concrete-protocol/concrete-protocol.capnp.h\ | ||
../../../../build/include/\ | ||
../../../../build/tools/mlir/include/\ | ||
../../../../build/tools/concretelang/include/\ | ||
include |
17 changes: 17 additions & 0 deletions
17
compilers/concrete-compiler/compiler/lib/Bindings/Rust/concrete-sys/build.rs
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
fn main() { | ||
autocxx_build::Builder::new("src/lib.rs", ["include"]) | ||
.extra_clang_args(&["-std=c++17"]) | ||
.build() | ||
.unwrap() | ||
.flag_if_supported("-std=c++17") | ||
.file("src/lib.cpp") | ||
.include("src") | ||
.warnings(false) | ||
.compile("concrete-sys"); | ||
|
||
println!("cargo::rustc-link-search=../../../../build/lib"); | ||
println!("cargo::rustc-link-lib=ConcretelangFat"); | ||
println!("cargo::rustc-link-lib=curses"); | ||
println!("cargo::rustc-link-lib=zstd"); | ||
println!("cargo::rustc-link-lib=z"); | ||
} |
Oops, something went wrong.