From 8e8651c6a64e17e241b8b0fc47c4065c061d2ebc Mon Sep 17 00:00:00 2001 From: tmontaigu Date: Tue, 17 Jan 2023 12:52:38 +0100 Subject: [PATCH] chore(rust): rename crate Renames the crate from `concrete_compiler_rust` to `concrete-compiler`. - The `_rust` is removed as its redundant, the crate is a rust project. - The `_` are replaced with `-` as its the naming scheme for our other crates --- compiler/lib/Bindings/Rust/Cargo.toml | 2 +- compiler/lib/Bindings/Rust/src/compiler.rs | 11 ++++++----- compiler/lib/Bindings/Rust/src/mlir.rs | 4 ++-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/compiler/lib/Bindings/Rust/Cargo.toml b/compiler/lib/Bindings/Rust/Cargo.toml index 4fca9cf14..fa7fd9a1b 100644 --- a/compiler/lib/Bindings/Rust/Cargo.toml +++ b/compiler/lib/Bindings/Rust/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "concrete_compiler_rust" +name = "concrete-compiler" version = "0.1.0" edition = "2021" diff --git a/compiler/lib/Bindings/Rust/src/compiler.rs b/compiler/lib/Bindings/Rust/src/compiler.rs index f9d7c1d66..991dcc286 100644 --- a/compiler/lib/Bindings/Rust/src/compiler.rs +++ b/compiler/lib/Bindings/Rust/src/compiler.rs @@ -1012,7 +1012,7 @@ impl CompilationFeedback { /// /// # Examples /// ``` -/// use concrete_compiler_rust::compiler::*; +/// use concrete_compiler::compiler::*; /// /// let module_to_compile = " /// func.func @main(%arg0: !FHE.eint<5>, %arg1: !FHE.eint<5>) -> !FHE.eint<5> { @@ -1078,6 +1078,7 @@ mod test { }"; let runtime_library_path = runtime_lib_path(); let temp_dir = TempDir::new("concrete_compiler_rust_test").unwrap(); + let temp_dir = TempDir::new("concrete_compiler_test").unwrap(); let support = LibrarySupport::new(temp_dir.path().to_str().unwrap(), runtime_library_path).unwrap(); let lib = support.compile(module_to_compile, None).unwrap(); @@ -1107,7 +1108,7 @@ mod test { return %0 : !FHE.eint<5> }"; let runtime_library_path = runtime_lib_path(); - let temp_dir = TempDir::new("concrete_compiler_rust_test").unwrap(); + let temp_dir = TempDir::new("concrete_compiler_test").unwrap(); let support = LibrarySupport::new(temp_dir.path().to_str().unwrap(), runtime_library_path).unwrap(); let result = support.compile(module_to_compile, None).unwrap(); @@ -1125,7 +1126,7 @@ mod test { return %0 : !FHE.eint<5> }"; let runtime_library_path = runtime_lib_path(); - let temp_dir = TempDir::new("concrete_compiler_rust_test").unwrap(); + let temp_dir = TempDir::new("concrete_compiler_test").unwrap(); let lib_support = LibrarySupport::new(temp_dir.path().to_str().unwrap(), runtime_library_path).unwrap(); // compile @@ -1162,7 +1163,7 @@ mod test { return %0 : !FHE.eint<5> }"; let runtime_library_path = runtime_lib_path(); - let temp_dir = TempDir::new("concrete_compiler_rust_test").unwrap(); + let temp_dir = TempDir::new("concrete_compiler_test").unwrap(); let lib_support = LibrarySupport::new(temp_dir.path().to_str().unwrap(), runtime_library_path).unwrap(); // compile @@ -1228,7 +1229,7 @@ mod test { return %0 : tensor<2x3x!FHE.eint<5>> }"; let runtime_library_path = runtime_lib_path(); - let temp_dir = TempDir::new("concrete_compiler_rust_test").unwrap(); + let temp_dir = TempDir::new("concrete_compiler_test").unwrap(); let lib_support = LibrarySupport::new(temp_dir.path().to_str().unwrap(), runtime_library_path).unwrap(); // compile diff --git a/compiler/lib/Bindings/Rust/src/mlir.rs b/compiler/lib/Bindings/Rust/src/mlir.rs index 3f00c5182..34e3e8595 100644 --- a/compiler/lib/Bindings/Rust/src/mlir.rs +++ b/compiler/lib/Bindings/Rust/src/mlir.rs @@ -55,8 +55,8 @@ pub fn print_mlir_type_to_string(mlir_type: MlirType) -> String { /// /// # Examples /// ``` -/// use concrete_compiler_rust::mlir::*; -/// use concrete_compiler_rust::mlir::ffi::*; +/// use concrete_compiler::mlir::*; +/// use concrete_compiler::mlir::ffi::*; /// unsafe{ /// let context = mlirContextCreate(); /// mlirRegisterAllDialects(context);