Skip to content

Compile for some embedded targets fails #70

Description

@stepkun

Hi,

thanks four your great work.

When using your crate with some embedded targets I get the following error:

error[E0433]: cannot find sync in alloc
--> ../arcstr-1.2.0/src/arc_str.rs:1381:30
|
1381 | impl From for alloc::sync::Arc {
| ^^^^ could not find sync in alloc
|
note: found an item that was configured out
--> ../.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/lib.rs:234:9
|
233 | #[cfg(all(not(no_rc), not(no_sync), target_has_atomic = "ptr"))]
| ------------------------- the item is gated behind the ptr feature
234 | pub mod sync;
| ^^^^

Some popular embedded targets do not support the atomics needed for alloc::sync::Arc (pi pico, esp32-c3).
So to compile for those targets the alloc::sync::Arc implementations should be gated behind the same ptr feature.

Kind regards
Stephan

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions