▲ 0 r/rust
Every Rust developer has faced this: crate A needs tokio 0.2, crate B needs tokio 1.0. The build fails, and the only "solution" is to fork one of them or give up.
I decided to fix this automatically.
My tool, HealDep, analyzes the dependency graph, finds the conflict, and writes an adapter shim that translates between the two versions. With an optional local LLM, it can even generate the translation functions and test them until the build passes.
How it works under the hood:
- Parse
Cargo.tomland lock files. - Detect the conflicting crate.
- Extract function signatures from both versions using
tree-sitter. - Generate a new shim crate that re-exports the old API using the new one.
- Run
cargo buildandcargo testin a sandbox. If it fails, iterate.
It also works for Python (requirements.txt) and npm (package.json). Would love your thoughts on the approach — has anyone tried something similar?
u/Green_Square_8967 — 16 days ago