matklad / once_cell

Rust library for single assignment cells and lazy statics without macros
Apache License 2.0
1.84k stars 110 forks source link

decouple alloc from race feature #259

Closed brodycj closed 2 weeks ago

brodycj commented 2 weeks ago

I would like to solve this build issue with thumbv6m-none-eabi: https://github.com/rustls/rustls/pull/2088#pullrequestreview-2274755137

With the critical-section feature, I don't need the race feature ... once_cell::sync::OnceCell is the perfect solution for all types of builds. But it still chokes on race.rs.

I would like to propose decoupling alloc from race to fix my build on thumbv6m-none-eabi.

Unfortunately I do think this would be a breaking change, guess we would need major version number bump. I would be happy to do this in this PR or let someone else do this.

I would be open to discussing some other alternatives, just hoping to find a way to resolve my build issue.

Thanks in advance!

matklad commented 2 weeks ago

Replied at https://github.com/rustls/rustls/pull/2088#discussion_r1740529048!