From 34103e06954025ec327e5b729fe4fd91ac6b460d Mon Sep 17 00:00:00 2001 From: Anjali Pal Date: Wed, 27 Mar 2024 12:06:41 -0700 Subject: [PATCH 1/5] turn on import feature --- bril-rs/rs2bril/Cargo.toml | 2 +- bril-rs/rs2bril/src/lib.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/bril-rs/rs2bril/Cargo.toml b/bril-rs/rs2bril/Cargo.toml index f6021dfc4..11d8ad01f 100644 --- a/bril-rs/rs2bril/Cargo.toml +++ b/bril-rs/rs2bril/Cargo.toml @@ -21,4 +21,4 @@ clap = { version = "4.4", features = ["derive"] } [dependencies.bril-rs] version = "0.1.0" path = ".." -features = [ "memory", "float", "position"] +features = [ "memory", "float", "position", "import"] diff --git a/bril-rs/rs2bril/src/lib.rs b/bril-rs/rs2bril/src/lib.rs index dc0fcc334..8c7c09386 100644 --- a/bril-rs/rs2bril/src/lib.rs +++ b/bril-rs/rs2bril/src/lib.rs @@ -1172,5 +1172,6 @@ pub fn from_file_to_program( from_empty_function_to_function(f, &mut state) }) .collect(), + imports: vec![] } } From 27c813e54cc012efaf409c13b61f2975c0759f8a Mon Sep 17 00:00:00 2001 From: Anjali Pal Date: Wed, 27 Mar 2024 12:08:18 -0700 Subject: [PATCH 2/5] full feature set --- bril-rs/rs2bril/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bril-rs/rs2bril/Cargo.toml b/bril-rs/rs2bril/Cargo.toml index 11d8ad01f..2dcce1e11 100644 --- a/bril-rs/rs2bril/Cargo.toml +++ b/bril-rs/rs2bril/Cargo.toml @@ -21,4 +21,4 @@ clap = { version = "4.4", features = ["derive"] } [dependencies.bril-rs] version = "0.1.0" path = ".." -features = [ "memory", "float", "position", "import"] +features = ["memory", "float", "ssa", "speculate", "position", "import", "char"] From cf84e25f2d6c440541294fa562a352026f86684a Mon Sep 17 00:00:00 2001 From: Anjali Pal Date: Wed, 27 Mar 2024 12:44:28 -0700 Subject: [PATCH 3/5] remove extra features --- bril-rs/rs2bril/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bril-rs/rs2bril/Cargo.toml b/bril-rs/rs2bril/Cargo.toml index 2dcce1e11..1f789ac54 100644 --- a/bril-rs/rs2bril/Cargo.toml +++ b/bril-rs/rs2bril/Cargo.toml @@ -21,4 +21,4 @@ clap = { version = "4.4", features = ["derive"] } [dependencies.bril-rs] version = "0.1.0" path = ".." -features = ["memory", "float", "ssa", "speculate", "position", "import", "char"] +features = [ "memory", "float", "position", "import" ] \ No newline at end of file From a27a3517c4a0608ad9c2ceeef58d4f5d87e14cf9 Mon Sep 17 00:00:00 2001 From: Anjali Pal Date: Wed, 27 Mar 2024 12:58:34 -0700 Subject: [PATCH 4/5] pass through import feature --- bril-rs/rs2bril/Cargo.toml | 5 ++++- bril-rs/rs2bril/src/lib.rs | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/bril-rs/rs2bril/Cargo.toml b/bril-rs/rs2bril/Cargo.toml index 1f789ac54..eab259f67 100644 --- a/bril-rs/rs2bril/Cargo.toml +++ b/bril-rs/rs2bril/Cargo.toml @@ -21,4 +21,7 @@ clap = { version = "4.4", features = ["derive"] } [dependencies.bril-rs] version = "0.1.0" path = ".." -features = [ "memory", "float", "position", "import" ] \ No newline at end of file +features = [ "memory", "float", "position" ] + +[features] +import = [ "bril-rs/import" ] diff --git a/bril-rs/rs2bril/src/lib.rs b/bril-rs/rs2bril/src/lib.rs index 8c7c09386..73dc3a8cf 100644 --- a/bril-rs/rs2bril/src/lib.rs +++ b/bril-rs/rs2bril/src/lib.rs @@ -1172,6 +1172,7 @@ pub fn from_file_to_program( from_empty_function_to_function(f, &mut state) }) .collect(), + #[cfg(feature = "import")] imports: vec![] } } From 4b7ea86ada3a15a606606b9e22c8bfe1e3af0b79 Mon Sep 17 00:00:00 2001 From: Anjali Pal Date: Fri, 29 Mar 2024 09:43:17 -0700 Subject: [PATCH 5/5] cargo fmt --- bril-rs/rs2bril/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bril-rs/rs2bril/src/lib.rs b/bril-rs/rs2bril/src/lib.rs index 73dc3a8cf..03f1d3c7c 100644 --- a/bril-rs/rs2bril/src/lib.rs +++ b/bril-rs/rs2bril/src/lib.rs @@ -1173,6 +1173,6 @@ pub fn from_file_to_program( }) .collect(), #[cfg(feature = "import")] - imports: vec![] + imports: vec![], } }