immunant / c2rust

Migrate C code to Rust
https://c2rust.com/
Other
3.79k stars 219 forks source link

Demonstrate use of PDG from dynamic analysis in static analysis #1069

Closed fw-immunant closed 3 months ago

fw-immunant commented 3 months ago

Turns out we need to pass the profile flags twice: once for the outer invocation of cargo itself and once for the inner invocation of our cargo wrapper. This, along with the --feature flags for the inner crate and the addition of an optional dependency, make things work with the same crate ID.

spernsteiner commented 3 months ago

Seems unfortunate that the user's project needs this extra c2rust-analysis-rt dependency that they'll never use in normal builds. How does c2rust-instrument go about injecting this dependency? Could c2rust-analyze do the same?

kkysen commented 3 months ago

Seems unfortunate that the user's project needs this extra c2rust-analysis-rt dependency that they'll never use in normal builds. How does c2rust-instrument go about injecting this dependency? Could c2rust-analyze do the same?

c2rust instrument has an option to add it as an optional dependency automatically.

fw-immunant commented 3 months ago

Dropped the dependency-adding commit as we actually don't need it as @kkysen indicated.