RustConf 2023 - The standard library is special. Let's change that.

แชร์
ฝัง
  • เผยแพร่เมื่อ 11 ม.ค. 2025

ความคิดเห็น • 37

  • @jhpratt
    @jhpratt 11 หลายเดือนก่อน +118

    Speaker here! Ask any questions you may have :)

    • @thedaddyofdaddies
      @thedaddyofdaddies 11 หลายเดือนก่อน +13

      I think I prefer explicitly importing preludes in general. Nice talk.

    • @wyattherkamp7154
      @wyattherkamp7154 11 หลายเดือนก่อน

      I find the lang item for Box extremely weird. Is anything preventing Box from being a normal type?

    • @foehammer2127
      @foehammer2127 11 หลายเดือนก่อน

      What utility would the standard library being part of cargo actually have?

    • @linusdikomey1611
      @linusdikomey1611 11 หลายเดือนก่อน

      Interesting talk! How does all of this affect compilation times?

    • @ferdynandkiepski5026
      @ferdynandkiepski5026 11 หลายเดือนก่อน +4

      4:23 you said that sqrt of a floating point can be rewritten with inline assembly. Unless I'm misunderstanding how rustc handles inline assembly I believe that this would make it impossible for the compiler to vectorize it. The thing with intrinsics currently is that they're such a mess that it's hard to say where they should go so that users can find them if you want to remove them from the std library.

  • @unalive_me
    @unalive_me 11 หลายเดือนก่อน +4

    I actually really like that idea for adding preludes for crates that automatically get brought into scope. I think as long as the user of the crate has to opt in to use the prelude, I wouldn't have any issues with it. I feel like that is something that I enjoy about Rust's std lib so I think it would be a great addition for any crate to be able to provide that option too.

  • @TheMCMaster
    @TheMCMaster 11 หลายเดือนก่อน +8

    From your talk, it sounds like making the standard library just a regular crate is the destination, but the journey will only make everything better!

  • @kelownatechkid
    @kelownatechkid 10 หลายเดือนก่อน

    This is really interesting. Thank you for the presentation!

  • @whatbirdisthat
    @whatbirdisthat 10 หลายเดือนก่อน

    Stability attributes feel very Rust-y and if I had a dollar for every time I got a deprecated warning with zero information as to what to use instead!! Like, 30+ years of those! Thank you for the talk and those great ideas🎉

  • @jocketf3083
    @jocketf3083 10 หลายเดือนก่อน

    I suddenly want all these things!

  • @aleksanderkrauze9304
    @aleksanderkrauze9304 10 หลายเดือนก่อน

    Great talk!

  • @aaronchen3748
    @aaronchen3748 11 หลายเดือนก่อน +3

    What languages treat standard library completely the same as user libraries?

    • @simonhartley9158
      @simonhartley9158 11 หลายเดือนก่อน +10

      Even if it doesn't get to 100%, there are benefits by aspiring to do so. Additionally by dogfooding, there's an incentive for the authors to make Rust as good as possible.

    • @JannisAdmek
      @JannisAdmek 11 หลายเดือนก่อน +5

      zig :)

    • @leodog896
      @leodog896 11 หลายเดือนก่อน +2

      Deno

  • @spheenik
    @spheenik 11 หลายเดือนก่อน +2

    @jhpratt: Fantastic talk. Thank you.

  • @RiwenX
    @RiwenX 11 หลายเดือนก่อน

    Interesting talk, thank you

  • @konkitoman
    @konkitoman 11 หลายเดือนก่อน

    I really like this, the things i will like to be present in Rust 2024 is std as a crate and opt in prelude.

    • @jhpratt
      @jhpratt 11 หลายเดือนก่อน

      Nothing for preludes would be tied to an edition. Nor will it be happening that quickly :)

  • @jamesl5149
    @jamesl5149 11 หลายเดือนก่อน +2

    Crate preludes will be awesome. I'd prefer them to be opt-out than opt-in

    • @jhpratt
      @jhpratt 11 หลายเดือนก่อน

      The problem then arises of a dependency adding/extending a prelude, causing your code to break.

    • @antoniong4380
      @antoniong4380 11 หลายเดือนก่อน +1

      Opt-out preludes are what modpacks are for minecraft. You're bound to get surprising features by using someone else's prelude
      (modpack), but instead of up to 200 mods, it might be maybe even 800 features