Live data from Hacker News

The Rust Libs Blitz

blog.rust-lang.org

1–10 of 125 posts

Re: The Rust Libs Blitz

#6
> The product of this process will be a mature core of libraries together with a set of API guidelines that Rust authors can follow to gain insight into the design of Rust and level up crates of their own interest.

Is there a plan to make these things statically checkable by rustc/rustfmt/rust-tidy or some sort?

Re: The Rust Libs Blitz

#7

May I suggest the bytes crate [0]? It's one of those small libraries providing a key building block (mutable and immutable byte buffers), and is a dependency of tokio-io and any other crate which implements tokio-io's Encoder/Decoder traits. [0] https://crates.io/crates/bytes

Yes, thank you for the suggestion. I agree that's a good candidate and will note it on thread.

Re: The Rust Libs Blitz

#8
post #6

> The product of this process will be a mature core of libraries together with a set of API guidelines that Rust authors can follow to gain insight into the design of Rust and level up crates of their own interest. Is there a plan to make these things statically checkable by rustc/rustfmt/rust-tidy or some sort?

Yes! The statically checkable ones will be checked by rustc or Clippy. Though some of the guidelines are at a higher level than what those would be able to check. For example: rustc wouldn't be able to tell whether a particular one of your traits would be valuable to make accessible as a trait object.

Re: The Rust Libs Blitz

#9
Does the "Rust standard of quality" for these crucial crates include "no unsafe code"?

"Vec" currently needs unsafe code, because Rust doesn't have the expressive power to talk about a partially initialized array. Everything else with unsafe code is an optimization. Often a premature one. Maps should be built on "Vec", for example.

Re: The Rust Libs Blitz

#10
One thing I don't see here: It's difficult to integrate libs into e.g. parallel when they don't derive all the various things (Copy). Will a goal be to aim for deriving standards for libs looked at?
Post reply on HN