ecosystem-wg icon indicating copy to clipboard operation
ecosystem-wg copied to clipboard

Move `lazy-static.rs` out of the nursery?

Open KodrAus opened this issue 6 years ago • 8 comments

The lazy-static crate is now stable and the nursery doesn't seem like the most appropriate home for it anymore. It's in a similar boat to bitflags.

Should we try find lazy-static a new home under a community GitHub organisation? Has there ever been talk of offering lazy_static as a macro in the standard library?

cc @Kimundi

KodrAus avatar Apr 29 '18 21:04 KodrAus

I've personally always been in favor of putting lazy_static! into std.

It could also move into the rust-lang org, which is where libc and regex live, but the process that established the rust-lang/rust-lang-nursery procedure hasn't really endured (and I think only regex and libc survived it).

BurntSushi avatar Apr 29 '18 21:04 BurntSushi

I'd personally be fine with either.

Kimundi avatar Jun 06 '18 21:06 Kimundi

So I was digging into this, trying my hand at an RFC to propose the std option so we could get some feedback from a wider audience.

What I don't understand about the option of moving to std involves the no_std implementation of lazy_static. Would the crate lazy_static continue to exist, but only to provide the no_std version and backwards compatibility?

AndyGauge avatar Jul 03 '18 16:07 AndyGauge

@AndyGauge Hmm that's an interesting point. The no_std implementation uses the spin crate for synchronization. That's definitely something we could work through in the RFC process.

KodrAus avatar Jul 09 '18 06:07 KodrAus

An advantage of moving lazy_static to std (or rather core) would be that no_std could be supported on stable, because the required unstable features can be used for the implementation.

vks avatar Jul 11 '18 14:07 vks

I've drafted that rfc and really need some help before submitting it. Can you tell me if I'm close here? https://github.com/AndyGauge/rfcs/blob/lazy-static/text/0000-lazy-static.md

AndyGauge avatar Jul 13 '18 22:07 AndyGauge

@AndyGauge Sorry, I just got back from vacation. Thanks for taking this on! I see you're getting some traction now on your internals pre RFC. I'll work on catching up with where that conversation is going and see if I can help.

KodrAus avatar Jul 22 '18 22:07 KodrAus

We spoke about this at the recent All Hands event and at this stage the plan is to shift lazy-static into the rust-lang organization. The driver for this isn't necessarily to bring lazy-static into tighter orbit with the standard library, but more part of an effort to clear libraries out of the nursery.

cc @rust-lang-nursery/libs

KodrAus avatar Feb 18 '19 05:02 KodrAus