Std VS no_std + alloc + libc

⚓ Rust    📅 2025-07-17    👤 surdeus    👁️ 3      

surdeus

When we are writing a Rust library, what is the difference between normal std mode with no_std + alloc + libc?

I'm not so familiar with bare metal programming, but as far as I understand, for a Rust library, the main difference between core and std is platform-specific functionalities. So if we link to libc, are there any situations where the library works with no_std + alloc + libc, but not with std? In other word, if we are using no_std + alloc + libc in a Rust library, is it better just switching to std?

1 post - 1 participant

Read full topic

🏷️ rust_feed