Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ members = [
]
exclude = [
"crates/capsec-example-db",
"crates/capsec-deep",
]

[workspace.package]
Expand Down
107 changes: 107 additions & 0 deletions crates/capsec-deep/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions crates/capsec-deep/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[package]
name = "capsec-deep"
version = "0.1.0"
edition = "2024"
license = "Apache-2.0"
description = "MIR-based deep analysis driver for capsec — requires nightly"
publish = false

[[bin]]
name = "capsec-driver"
path = "src/main.rs"

[dependencies]
serde = { version = "1", features = ["derive"] }
serde_json = "1"

[package.metadata.rust-analyzer]
rustc_private = true
14 changes: 14 additions & 0 deletions crates/capsec-deep/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/// Embeds the sysroot library path so the binary can find librustc_driver at runtime.
fn main() {
let rustc = std::env::var("RUSTC").unwrap_or_else(|_| "rustc".to_string());
let output = std::process::Command::new(&rustc)
.arg("--print=sysroot")
.output()
.expect("Failed to run rustc --print=sysroot");
let sysroot = String::from_utf8(output.stdout)
.expect("Invalid UTF-8 from rustc --print=sysroot");
let sysroot = sysroot.trim();

// Link against the sysroot lib directory so librustc_driver.dylib/.so is found
println!("cargo:rustc-link-arg=-Wl,-rpath,{sysroot}/lib");
}
Binary file added crates/capsec-deep/capsec_test
Binary file not shown.
Binary file added crates/capsec-deep/clean
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 4 additions & 0 deletions crates/capsec-deep/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[toolchain]
channel = "nightly-2026-02-17"
components = ["rustc-dev", "llvm-tools", "rust-src"]
profile = "minimal"
Binary file added crates/capsec-deep/simple_fs
Binary file not shown.
Loading
Loading