Rust 1.79.0: Top 10 Most Interesting Things
Ғылым және технология
New changes Rust 1.79.0! Sponsor me on GitHub for more videos: github.com/sponsors/CleanCut/
Links:
Rust 1.79.0 Blog Post - blog.rust-lang.org/2024/06/13...
Artwork - foundation.rust-lang.org/img/...
0:00 TL;DR on sponsorship status
0:17 Rust 1.79.0
0:37 1. Stabilize 5 WASM target features
1:05 WASM 1. Non-trapping float-to-int conversions
1:36 WASM 2. Import/Export of Mutable Globals
1:47 WASM 3. Sign-extension operators
1:56 WASM 4. Bulk memory operations
2:10 WASM 5. Extended Constant Expressions
2:26 2. Prevent dashes in Cargo's lib.name
2:43 3. readonly_write_lock
3:08 4. manual_clamp
3:30 5. Stabilize importing main from other modules or crates
4:03 6. cargo add is now MSRV-aware
4:30 7. manual_unwrap_or_default
4:40 8. const_is_empty
4:51 9. Tier 3 VisionOS targets
5:10 10. Implement FromIterator for (impl Default + Extend, impl Default + Extend)
5:57 Sponsors
6:49 Today's Artwork
7:24 Outro
Sponsor me on GitHub for more videos like this: github.com/sponsors/CleanCut/
Пікірлер: 22
I really did like the more in-depth walkthrough of all changes version-to-version, it was hugely informative.
@NathanStocks
14 күн бұрын
So did I! As I get more sponsors, I will increase the length of my videos. With enough sponsors I would love to start making more frequent videos about other Rust news and topics as well.
Hey Nathan, thanks for still making this video with all the sponsor stuff in mind. I would completely understand if you declined to continue this series (too many people who burn out dedicating their lives to something like this for nothing in return), but it is highly enjoyable content.
Does the tuple collect() means that one can collect into nested tuples? That's quite cool
@NathanStocks
14 күн бұрын
I tried it...and YES! fn main() { let input = vec![1, 2, 3, 4, 5]; let ((doubled, tripled), squared): ((Vec, Vec), Vec) = input.iter().map(|x| ((x * 2, x * 3), x * x)).collect(); assert_eq!(doubled, [2, 4, 6, 8, 10]); assert_eq!(tripled, [3, 6, 9, 12, 15]); assert_eq!(squared, [1, 4, 9, 16, 25]); }
Just finished, Ultimate Rust Crash Course on udemy. Keep up the good work.
@NathanStocks
14 күн бұрын
That’s wonderful to hear! Thank you for your kind words!
@lsp0
11 күн бұрын
@@NathanStocks hey you really ought to put links to that in your description
Clear and concise, thanks a lot for this overview.
@NathanStocks
14 күн бұрын
You’re welcome! Thank you for your kind words.
These are great. Good job.
@NathanStocks
14 күн бұрын
Thank you!
Great video
@NathanStocks
14 күн бұрын
Thank you!
i had a good laugh at number 8 haha
@NathanStocks
14 күн бұрын
😄
Hopefully 8 is smart enough to not warn on constants from other crates, where no, I don't know if it's empty.
@NathanStocks
14 күн бұрын
I have so many questions about your comment! 😂 First, why did the library author export an empty constant? I have never seen that! Second, why do you need to check if the library’s constant is empty? Third, you imply that you would rather call is_empty at runtime than peek at the value of the constant after a lint tells you about it-why?
@pfeilspitze
14 күн бұрын
@@NathanStocks Because if it's a constant in another crate it can change, so checking once doesn't work. Maybe it's a constant from a build-time environment variable, or something. It's like how `char::UNICODE_VERSION < (16, 0, 0)` is true right now, but probably soon won't be, and clippy would be very wrong to tell me not to check it and just remove the else.
@NathanStocks
14 күн бұрын
Huh, interesting.
First! So happy to find this video today.
@NathanStocks
14 күн бұрын
Congrats on the first post! I’m also glad you found this video today! And apparently before everyone else! 😂