-
Notifications
You must be signed in to change notification settings - Fork 121
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
Added an implementation of lazy_static without std in stable Rust #122
Conversation
Revert "removed incompatiblities from tests" This reverts commit 31cc1f5. removed incompatiblities from tests
Hi @brunoczim! 👋 Before we dig into the code itself are you able to share a bit about how you've found yourself needing it, and how this new implementation works compared to the existing |
UseOkay. I confess this is not something I need. I don't want to be redundant, but imagine you are writing a Kernel and you do not want to have to use nightly but need to initialize some... lazy static. I mean, you would have to introduce some instability by using nightly. Some differencesI think the main important is: I did not wrote some generic API shared between all Another difference is: However, the spinning over the initialization status works in the same way as I do recognize there is not too much difference. The real reason I implemented this is so we can have a stable API with NOTE: the |
Well, there is another option. I was thinking: |
I have had a merged PR on |
Thanks for chasing this up @brunoczim! A no-std |
@brunoczim now that mvdnes/spin-rs#55 is merged and released on crates.io would you be interested in refactoring our existing |
Yes I am. Count me in. |
I am closing this in favor of #130 |
Currently, lazy static has an implementation for no_std crates which requires nightly. I have added a new implementation of lazy_static which works on stable Rust.
Question: I have added a new feature and a new implementation. Should we keep it as a new implementation or should we overwrite nightly spin implementation?