Use bincode derive macro if bincode is exported by dependency

โš“ Rust    ๐Ÿ“… 2026-03-04    ๐Ÿ‘ค surdeus    ๐Ÿ‘๏ธ 2      

surdeus

One of my crates (A) uses bincode. Another one (B) depends on this crate and uses bincode too. I'm trying to make crate B use bincode exported from crate A. It works fine with functions from bincode, but not with macros. bincode derive macros seem to expand to code which uses ::bincode::... instead of bincode::... for example. So it seems like I simply canโ€™t use these macros without depending on bincode directly.

Is it really so or am I missing some possible workarounds?

2 posts - 2 participants

Read full topic

๐Ÿท๏ธ Rust_feed