I am trying to port an app to an atmega2560 (avr architecture).
The embedded-svc crate uses log with this clause
[dependencies.log]
version = "0.4"
default-features = false
This should make the log crate no_std
lib.rs:321: #![cfg_attr(all(not(feature = "std"), not(test)), no_std)]
However, I still get the following compile error:
error[E0432]: unresolved import `std::sync::atomic::AtomicUsize`
--> /home/thoth/.cargo/registry/src/github.com-1ecc6299db9ec823/log-0.4.17/src/lib.rs:348:25
|
348 | use std::sync::atomic::{AtomicUsize, Ordering};
| ^^^^^^^^^^^ no `AtomicUsize` in `sync::atomic`
Shouldn't a no_std build avoid pulling things from std? Other crates use the atomic-polyfill crate in this situation. Maybe switching to core::sync would work, but I'm not sure which version of rust stabilized that.
I am trying to port an app to an atmega2560 (
avrarchitecture).The
embedded-svccrate useslogwith this clauseThis should make the log crate no_std
However, I still get the following compile error:
Shouldn't a no_std build avoid pulling things from std? Other crates use the
atomic-polyfillcrate in this situation. Maybe switching tocore::syncwould work, but I'm not sure which version of rust stabilized that.