On the issue of a Rust program depending on a static library generated by another Rust program
⚓ Rust 📅 2025-05-21 👤 surdeus 👁️ 11A Rust program depends on a static library libfoo.a, but this libfoo.a is actually also written and generated in Rust. When I use nm libfoo.a, I see that it exports all symbols, including those from libstd (e.g., std::*) and symbols from its own dependencies (e.g., tokio::*). I want to know what will happen when the Rust program links against this libfoo.a again. Will the symbols from std and tokio conflict? Or could this lead to undefined behavior (UB)?
4 posts - 2 participants
🏷️ rust_feed