-
Notifications
You must be signed in to change notification settings - Fork 633
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feedback Request: "disable-cas-atomics" feature #2399
Comments
I'm okay with adding this as an unstable (but it doesn't require nightly compilers) cfg, but adding this as a feature is unacceptable as the feature must be additive. see also #2294 |
@taiki-e I'm open to that, how would you suggest structuring the feature? As the current default is assuming that atomics are present, would the correct behavior be to add a I think this would also be a breaking change, though I guess that's allowed under |
Moving existing un-flagged API under a new feature flag is a breaking change to existing users of |
Sorry, @Nemo157, could you clarify what approach you mean? Using a
|
Yes, autodetecting whether CAS atomics work on the current target or not (literally just reopening #2294 and updating it for any breakage). A feature flag can't be non-breaking because:
A non-autodetected
@taiki-e I don't understand what you meant in the last comment on #2294
Most users wouldn't need to use |
The problem is even if you don't use it, it fails the build. Simply depending on the An alternative to using |
Not with the changes in #2294. |
Sorry, I don't remember what I was thinking. That (my) comment doesn't seem to be right and I think I was misunderstanding something...
Seems that is a reasonable way. It's more robust and can probably solve most of the problems I mentioned in #2294. |
Filed #2400 |
Released in 0.3.15. |
Hey all!
I'm looking to use the
futures
crate on an embedded target with no CAS atomics (specificallythumbv6m-none-eabi
), and currently I am required to use the following features which require nightly:Without these flags, I get the following errors:
This is due to the target atomic configuration flag currently being nightly-only. Unfortunately, this means that the library that I am working on would also be restricted to nightly-only, or I'd have to fork the
futures
crate, which would be a compatibility problem.Would you be open to adding a
disable-cas-atomics
feature that ALWAYS disables these features (without checking the target cfg)? I believe this should be a straightfoward, but somewhat verbose PR, so I wanted check before working on it.CC @Dirbaio, who has also run into this for embedded async support.
Thanks!
The text was updated successfully, but these errors were encountered: