4 ms·
While that is true, in Go, almost no libraries are written to use non-stable features. This is not the case in Rust.
by nordsieck 10y ago
While that is true, in Go, almost no libraries are written to use non-stable features. This is not the case in Rust.
- steveklabnik 10y agoRight. Go and Rust have completely different development models, so that wouldn't make any sense. To recap, in Rust, to make additions to the language: 1. Small additions mean make a PR. 2. Big additions mean make an RFC, then a PR if accepted. 3. These PRs go behind a feature flag that lets us track the feature, and only allows it on nightly. 4. People who desire the new feature try it out. (This is what you refer to.) 5. If any issues are found, they're fixed, or, in the worst case, the feature is removed. 6. The feature is made available to stable users, the feature flag is removed, and backwards incompatible changes can no longer happen. What would be un-healthy is if everyone had to rely on nightly for everything. At the moment, most people use stable Rust. And of the people that use nightly, the largest single feature will be stable as of the next stable release for Rust. But some people are always going to be using nightly features, and that's a good thing: it means that by the time it hits stable, it's already undergone some degree of vetting.
- setori88 10y agoAny idea when custom allocator will become stable? That's the only thing holding us to nightly.
- steveklabnik 10y agoI literally had a conversation about this yesterday. We need someone to champion the work. If that's you, we should get in touch.
- setori88 10y agoemail sent
- steveklabnik 10y agoExcellent! It might take me a day or two; I have some stuff to look up in order to give you a proper response.
- kebolio 10y ago> Most people use stable Rust. However, many popular or important libraries like Serde or Rocket require the use of nightly. I recall the article a very short while ago on the front page that noted how Rust has effectively diverged into two languages, stable and nightly.
- steveklabnik 10y agoSerde does not require nightly, though it is nicer to use on nightly. That's the "will be stable as of the next stable release for Rust" I alluded to above. Rocket just came out; I think it's an extremely interesting library, but https://crates.io/crates/rocket https://crates.io/crates/rocket shows that it's been downloaded 618 times. It hasn't exactly taken the world by storm yet. I think it shows great potential though! But it's not a good case of showing that the Rust ecosystem largely depends on nightly. The article you refer to contained a number of factual errors.
- kebolio 10y agoOver the last year of intermittently dossing around with Rust I encountered the need to use nightly regularly, with various crates refusing to compile (and usually I stopped my experimentation there as my barrier to entry was anything harder than pacman -S rust cargo). Yet I did not know until just now that Serde is moving off a dependency on nightly and it is encouraging that this is a trend with similar libraries; I stand corrected.
- steveklabnik 10y agoIf you happen to remember which libraries those were, I'd be interested in hearing about them! > my barrier to entry was anything harder than pacman -S rust cargo Today, that also wouldn't be the case: "rustup update nightly" and "rustup run nightly cargo build" or whatever, with extra stuff to automatically switch per directory.
- erickt 10y agoServe creator here. The core library 'serde' never actually required nightly. It was just the helper library 'serde_derive' which can automatically implement the serde traits that needed nightly. dtolnay has been doing a wonderful job getting us off nightly. We can't wait to finally get rid of using it.
- ekidd 10y agoThere are really only two popular Rust libraries that use unstable features: 1. serde, the best serialization/deserialization library. This works on stable now using the `serge_codegen` crate and a custom `build.rs` script. This will Just Work on stable with no extra setup once Macros 1.1 lands, theoretically in about 5 weeks. But I'm using it on stable now in a half-dozen projects, thanks to a `build.rs` script. 2. Diesel, the high-level ORM library for Rust. This works on stable using a `build.rs` script, and 90% of it will work on stable without the `build.rs` script once Macros 1.1 ships. There are a few other experimental libraries like Rocket (which looks very slick) that only work on nightly Rust. But I don't think any of them are particularly popular yet. Personally, I maintain something like two dozen Rust crates and applications, and only two use nightly Rust. Both need Macros 1.1, which should be on stable in about 5 weeks.
- kzrdude 10y agoserde works on stable without serde_codegen or custom build scripts, too. It works like a regular library in fact, just with less features (no code generation feature). A custom data structure might not be able to use the default code generation for its impls anyway.
- bluejekyll 10y agoThis is true of diesel as well: http://diesel.rs/guides/getting-started/ http://diesel.rs/guides/getting-started/
- echelon 10y agoThat article posted half a week ago [1] claiming Rust developers and libraries rely on nightly was FUD. It's terrible that this is being repeated, because it is simply not true. [1] https://news.ycombinator.com/item?id=13251729 https://news.ycombinator.com/item?id=13251729
- kibwen 10y agoEr, there are no unstable features in Go... the language is deliberately frozen.