Show notes
Highlights from This Week in Rust - Issue444. Thisweek features a juicy post-mortem, open source, open hardware, and lots of newsfrom around the Rust ecosystem.Contributing to Rustacean StationRustacean Station is a community project; get in touch with us if you’d like to suggest an idea for an episode or offer your services as a host or audio editor! Twitter: @rustaceanfm Discord: Rustacean Station Github: @rustacean-station Email: [email protected]Timestamps & referenced resources[@ [@ [@ [@01:23] - Quote of the week This is the difference in approaches of the two languages. In C++ if thecode is vulnerable, the blame is on the programmer. In Rust if the code isvulnerable, Rust considers it a failure of the language, and takesresponsibility to stop even “bad” programmers from writing vulnerable code.I can’t stress enough how awesome it is that I can be a careless fool, andstill write perfectly robust highly multi-threaded code that never crashes. [@ [@03:30] - Crate of the week [@04:15] - Tim and Sean discuss parsing in episode2022-05-26 at [@ [@05:22] - Announcing Rust 1.61.0 Custom exit codes from main [Note from Tim: I say “termination crate”, but should have said “Termination trait”.] More capabilities for const fn “Basic” handling of fn pointers Add trait bounds to a const fn dyn trait and impl Trait support Stdio handles can be locked directly Several stabilized APIs [@ [@08:27] - Developer survey: JavaScript and Python reign, but Rust is rising [@ 600k developers in Q1 2022 to 2.2m in Q1 2022.” [@13:00] - Redust by Will Nelson [@are starting to point to something really—I don’t know whether it’sgood or bad for the community—where, you know, people start rollingtheir own crates instead of, say, doing stuff upstream. It kind of goes backto what Tim was complaining about before [Easy Mode forRust, discussed on This Week in Rust - Issue 441]—well, lightlypointing out to people out there—that okay, now which crate should Iuse? [@people. That’s … challenging. [Laughs] [@16:40] Josh Triplett on Building withRust, discussing the orphan rule [@ [@19:07] - Rust: A CriticalRetrospective by bunnie Links The Hardware Hacker, bunnie’s autobiography [video] “Shenzhen: An Alternative to the American way ofInnovation” [@28:56] A Programmer’s Brain, by Felienne Hermans, about working memoryin programmers. [@19:58] - Hacking the Xbox book [@20:04] - [video] Linux.conf.au 2013 keynote discussing Chumby and creating a hardware startup [@20:20] - betrusted.io, a secure communications system that runs the Xous microkernel operating system [@ There’s one quote I want to pull out of the post, which is: “I’m not sure if there is even a good solution to this problem, but, if you are super-paranoid and your goal is to be able to build trustable firmware, be wary of Rust’s expansive software supply chain attack surface!” [@ [@extact. It was very crazy and I was like, “Come on, no one’s every going towrite something crazy like this” and then I took a look at the RFC thatSean’s gonna do and in the comments there was a crazy one like that and Iwas like, “oh wow, this guy’s point’s valid”. [@30:49] - Hyrum’s Law, named after HyrumWright. With a sufficient number of users of an API, it does not matter what youpromise in the contract: all observable behaviors of your system will bedepended on by somebody. [@31:50] Fixing memory leaks by Lily Mara [@34:01] - tracing crate, created as part of the tokio project [@32:33] - “Is it possible to cause a memory leak inRust?” - Stack Overflow [@std::ops::Drop traitdocumentation std::mem::forget andBox::leakfor intentionally leaking memory Out-of memory (OOM) killer internals page from the Linux memorymanagement wiki [@37:54] tracing::instrument::Instrument trait, which fixes this issue [@41:29] Building a Cloud Database from Scratch: Why We Moved from C++ toRustby Yingjun Wu GAT (generic associated traits) Allen: [C++ vs Rust] is like apples vs apple pie. [@45:50] - [video] Deref and Drop traits by DanChiarlone “Smart pointers”,chapter 15 of The Rust Programming Language. std::ops::Deref trait documentation [@46:40] - Optimizing the size of your Rustbinaries by Sylvain Kerkour cargo-bloat, for determiningthe size impact of code and dependencies twiggy, a similar tool for WASM targets [@48:10] - RFC: Add more support for fallible allocations inVec by Daniel Paolielloand contributors Sean: This RFC is intended as a stop-gap, to unblock on-going work like—Iimagine—adding Rust to the Linux kernel while better long-termsolutions are explored. “Example: Implementing Vec” chapter of the Rustnomicon, describes howVec’s memory allocation works in detail Never type reference documentation [@because I’ve been toying with the idea of becoming a rustc contributor,particularly on the standard library side, and AshleyMannix sent me a really lovely note, whichwas: “Rust is also chronically friendly so nobody gets chewed out for making mistakes. They happen. They get caught. They get patched. You learn something new. It’s ok.”. [@55:51] - How we use Rust, SQLx and Rocket for Oso Cloud by Steve OlsenOther items [@ [@ DataFusion 8.0 IntelliJ Rust plugin 2022.1 [@57:40] Join us in the #this-week-in-rust channel of the Rustacean Station Discord serverCreditsIntro Theme: AerocityAudio Editing: Aleksandar NikolicHosting Infrastructure: Jon GjengsetShow Notes: Tim McNamaraHosts: Tim McNamara, Sean Chen, and Allen Wyma.

