Skip to content

Commit

Permalink
rust: draft bear executable
Browse files Browse the repository at this point in the history
  • Loading branch information
rizsotto committed Sep 23, 2024
1 parent 8afeafe commit 0bbaf6e
Show file tree
Hide file tree
Showing 13 changed files with 1,256 additions and 1,066 deletions.
2 changes: 2 additions & 0 deletions rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ anyhow = "1.0"
lazy_static = "1.4"
serde = { version = "1.0", default-features = false, features = ["derive"] }
serde_json = { version = "1.0", default-features = false, features = ["std"] }
serde_yml = "0.0"
clap = { version = "4.5", default-features = false, features = ["std", "cargo", "help", "usage", "suggestions"] }
chrono = "0.4.33"
log = "0.4"
Expand All @@ -20,6 +21,7 @@ crossbeam = "0.8"
crossbeam-channel = "0.5"
rand = "0.8.5"
path-absolutize = "3.1"
directories = "5.0"
json_compilation_db = "1.0"
nom = "7.1"
regex = "1.9"
Expand Down
3 changes: 3 additions & 0 deletions rust/bear/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,15 @@ path = "src/main.rs"
[dependencies]
intercept = { path = "../intercept" }
semantic = { path = "../semantic" }
json_compilation_db.workspace = true
thiserror.workspace = true
anyhow.workspace = true
lazy_static.workspace = true
serde.workspace = true
serde_json.workspace = true
serde_yml.workspace = true
clap.workspace = true
directories.workspace = true
chrono.workspace = true
log.workspace = true
simple_logger.workspace = true
4 changes: 4 additions & 0 deletions rust/bear/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
fn main() {
println!("cargo:rustc-env=WRAPPER_EXECUTABLE_PATH=/usr/libexec/bear/wrapper");
println!("cargo:rustc-env=PRELOAD_LIBRARY_PATH=/usr/libexec/bear/$LIB/libexec.so");
}
6 changes: 3 additions & 3 deletions rust/bear/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@ pub(crate) struct BuildCommand {

#[derive(Debug, PartialEq)]
pub(crate) struct BuildSemantic {
file_name: String,
append: bool,
pub file_name: String,
pub append: bool,
}

#[derive(Debug, PartialEq)]
pub(crate) struct BuildEvents {
file_name: String,
pub file_name: String,
}


Expand Down
Loading

0 comments on commit 0bbaf6e

Please sign in to comment.