How to use the public/private deps

⚓ Rust    📅 2025-09-25    👤 surdeus    👁️ 8      

surdeus

Warning

This post was published 36 days ago. The information described in this article may have changed.

Hi all! I has been checking and trying to use 1977-public-private-dependencies - The Rust RFC Book

My interpretation which could be wrong, is that the idea is help to solve issues, like, if crate A has B and C as a dep, but B also has C as a dep, C from A and C from B maybe are not compatible because of difference on their versions, so the idea is be able to have one C, which can be used in A and B.

There is a example in the RFC, where the crate onedep has the url crate marked as public (check the text after the Cargo.toml to see how to change it) and this one is used in twodep crate, but reading the code, twodep also has the url crate, so I really can't get very well how this feature is working when url also has different versions on both crates....

Maybe I misread or misunderstood something.

4 posts - 2 participants

Read full topic

🏷️ Rust_feed