mastodon.world is one of the many independent Mastodon servers you can use to participate in the fediverse.
Generic Mastodon server for anyone to use.

Server stats:

11K
active users

#learningrust

0 posts0 participants0 posts today
Victor W Allen<p>Learning rust is like getting a verbose solution working only to find out somewhere along the line people got tired of that and someone added `Option::fine_but_what_about()` to avoid it</p><p><a href="https://dice.camp/tags/Rust" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Rust</span></a> <a href="https://dice.camp/tags/LearningRust" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>LearningRust</span></a></p>
EventHelix.com 🦀<p>🚀 Rust Under the Hood hardcover edition is now available! 📚</p><p>Dive deep into Rust internals through x86-64 assembly, exploring memory management, compiler optimizations, async state machines, and more. </p><p>Get your copy today: <a href="https://www.amazon.com/dp/B0DS9M8S13" target="_blank" rel="nofollow noopener noreferrer" translate="no"><span class="invisible">https://www.</span><span class="">amazon.com/dp/B0DS9M8S13</span><span class="invisible"></span></a> </p><p>🔧 Learn how enums, structs, Vtables, SIMD, and async executors work at any level. 🦀💻 </p><p><a href="https://mastodon.world/tags/Rust" class="mention hashtag" rel="tag">#<span>Rust</span></a> <a href="https://mastodon.world/tags/Programming" class="mention hashtag" rel="tag">#<span>Programming</span></a> <a href="https://mastodon.world/tags/RustLang" class="mention hashtag" rel="tag">#<span>RustLang</span></a> <a href="https://mastodon.world/tags/SystemsProgramming" class="mention hashtag" rel="tag">#<span>SystemsProgramming</span></a> <a href="https://mastodon.world/tags/Books" class="mention hashtag" rel="tag">#<span>Books</span></a> <a href="https://mastodon.world/tags/LearningRust" class="mention hashtag" rel="tag">#<span>LearningRust</span></a></p>
LavX News<p>12 Common Pitfalls to Avoid When Learning Rust: A Newcomer's Guide</p><p>Diving into Rust can be daunting, but avoiding common mistakes can make the journey smoother. From understanding compiler errors to leveraging Rust's unique features, this guide highlights pitfalls th...</p><p><a href="https://news.lavx.hu/article/12-common-pitfalls-to-avoid-when-learning-rust-a-newcomer-s-guide" rel="nofollow noopener noreferrer" target="_blank"><span class="invisible">https://</span><span class="ellipsis">news.lavx.hu/article/12-common</span><span class="invisible">-pitfalls-to-avoid-when-learning-rust-a-newcomer-s-guide</span></a></p><p><a href="https://mastodon.cloud/tags/news" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>news</span></a> <a href="https://mastodon.cloud/tags/tech" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>tech</span></a> <a href="https://mastodon.cloud/tags/RustProgramming" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>RustProgramming</span></a> <a href="https://mastodon.cloud/tags/LearningRust" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>LearningRust</span></a> <a href="https://mastodon.cloud/tags/ProgrammingMistakes" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>ProgrammingMistakes</span></a></p>
Marco Ivaldi<p>That’s it, our short tour of my favorite resources for <a href="https://infosec.exchange/tags/LearningRust" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>LearningRust</span></a> is finished… It’s now time to start your own project or pick up an open source project you like and contribute to it! </p><p>Stay tuned to the <span class="h-card" translate="no"><a href="https://infosec.exchange/@hnsec" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>hnsec</span></a></span> blog for the third installment of our <a href="https://infosec.exchange/tags/OffensiveRust" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>OffensiveRust</span></a> series, in which I’ll explore how to use <a href="https://infosec.exchange/tags/Rust" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Rust</span></a> for vulnerability research and present my humble contributions to <span class="h-card" translate="no"><a href="https://bird.makeup/users/binarly_io" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>binarly_io</span></a></span> idalib bindings, enabling the development in idiomatic Rust of standalone tools based on Hex-Rays’s IDA Pro.</p><p><a href="https://security.humanativaspa.it/tag/rust/" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">security.humanativaspa.it/tag/</span><span class="invisible">rust/</span></a></p>
Marco Ivaldi<p>As an intermediate-level <a href="https://infosec.exchange/tags/Rust" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Rust</span></a> developer, what you need are learning resources that can help bring your skills to the next level. </p><p>One such resource is “Zero to Production in Rust” by <span class="h-card" translate="no"><a href="https://hachyderm.io/@algo_luca" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>algo_luca</span></a></span>, an introduction to web API backend development that provides excellent coverage of the whole language and its patterns, using a realistic project as a practical example for <a href="https://infosec.exchange/tags/LearningRust" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>LearningRust</span></a>. </p><p><a href="https://www.zero2prod.com/" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://www.</span><span class="">zero2prod.com/</span><span class="invisible"></span></a></p><p>Other intermediate-level learning resources that I recommend are “Effective Rust”, “Rust Design Patterns”, “Rust API Guidelines”, and the “Rust Cookbook”.</p>
Marco Ivaldi<p>Happy new year!</p><p>If you have followed my previous advice while <a href="https://infosec.exchange/tags/LearningRust" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>LearningRust</span></a>, you should be ready for one of my favorite learning resources. </p><p>“Learn Rust With Entirely Too Many Linked Lists” is a fun and entertaining read on the intricacies of <a href="https://infosec.exchange/tags/Rust" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Rust</span></a> (and linked lists) by the same author of the eldritch Rustonomicon. You’re welcome!</p><p><a href="https://rust-unofficial.github.io/too-many-lists/" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">rust-unofficial.github.io/too-</span><span class="invisible">many-lists/</span></a></p>
Marco Ivaldi<p>Now that you have learned the basics of the language and have set up your IDE, you’re ready to tackle some practical exercises as the next step in <a href="https://infosec.exchange/tags/LearningRust" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>LearningRust</span></a>.</p><p>I especially recommend Rustlings, a collection of small exercises to get you used to reading and writing <a href="https://infosec.exchange/tags/Rust" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Rust</span></a> code.</p><p><a href="https://github.com/rust-lang/rustlings/" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/rust-lang/rustlings</span><span class="invisible">/</span></a></p><p>If you need more, 100 Exercises To Learn Rust is another excellent resource for some additional guided practice. Then, you also have Exercism, Advent of Code, and similar challenges to further hone your skills.</p>
Marco Ivaldi<p>Theory is important, but I’m a strong believer in getting your hands dirty (i.e., writing your own code) as soon as possible! To make this a pleasant experience when <a href="https://infosec.exchange/tags/LearningRust" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>LearningRust</span></a>, you should pick up the IDE that is best for you. </p><p>After some experimentation, I settled with RustRover by <span class="h-card" translate="no"><a href="https://programming.dev/c/jetbrains" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>jetbrains</span></a></span>. It offers a delightful user experience and it’s free for non-commercial use. You should check it out. </p><p>Another popular choice is Visual Studio Code equipped with rust-analyzer and other specialized extensions such as Even Better TOML and Prettier Rust.</p><p><a href="https://www.jetbrains.com/rust/" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://www.</span><span class="">jetbrains.com/rust/</span><span class="invisible"></span></a></p>
Marco Ivaldi<p>If you aren’t familiar with how computers work under the hood, I recommend to start <a href="https://infosec.exchange/tags/LearningRust" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>LearningRust</span></a> with Rust in Action, a perfect book for beginners. </p><p>It’s a hands-on guide that introduces the <a href="https://infosec.exchange/tags/Rust" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Rust</span></a> programming language by exploring systems programming concepts and techniques. It goes beyond language syntax to showcase what Rust has to offer in real-world use cases, such as dealing with persistent storage, memory, networking, CPU instructions, and more. </p><p><a href="https://www.manning.com/books/rust-in-action" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://www.</span><span class="ellipsis">manning.com/books/rust-in-acti</span><span class="invisible">on</span></a></p>
Marco Ivaldi<p>Let’s get our journey started with the best book for <a href="https://infosec.exchange/tags/LearningRust" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>LearningRust</span></a> dedicated to beginners that I’ve found out there. </p><p>Programming Rust 2nd Edition is, in my opinion, even better than the official Rust Book. It covers all you need to know (and then some) to get familiar with the <a href="https://infosec.exchange/tags/Rust" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Rust</span></a> programming language, in a very readable style from start to finish. </p><p><a href="https://www.oreilly.com/library/view/programming-rust-2nd/9781492052586/" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://www.</span><span class="ellipsis">oreilly.com/library/view/progr</span><span class="invisible">amming-rust-2nd/9781492052586/</span></a></p>
Marco Ivaldi<p>2025 is just around the corner. If <a href="https://infosec.exchange/tags/LearningRust" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>LearningRust</span></a> is among your New Year’s resolutions, I’ve got you. </p><p>Following my ongoing <a href="https://infosec.exchange/tags/Rust" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Rust</span></a> series on the <span class="h-card" translate="no"><a href="https://infosec.exchange/@hnsec" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>hnsec</span></a></span> blog (<a href="https://security.humanativaspa.it/tag/rust/" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">security.humanativaspa.it/tag/</span><span class="invisible">rust/</span></a>) and adding something along the way, in the next days I’ll recommend the learning resources that worked for me. </p><p>Stay tuned!</p>
Ainiriand<p>Understanding string slicing in <a href="https://mastodon.social/tags/RustLang" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>RustLang</span></a> 🦀:</p><p>Remember: slices are based on bytes, not characters! Slicing an ASCII string is different from slicing a multibyte Unicode string. If you slice incorrectly, Rust will panic at runtime. ⚠️</p><p>let multibyte_string = "España";<br>let slice_multibyte = &amp;multibyte_string[..5]; // This will panic! 🚫</p><p>Ensure your slices align with valid UTF-8 character boundaries.</p><p><a href="https://mastodon.social/tags/Programming" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Programming</span></a> <a href="https://mastodon.social/tags/CodeTips" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>CodeTips</span></a> <a href="https://mastodon.social/tags/LearningRust" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>LearningRust</span></a> <a href="https://mastodon.social/tags/RustCommunity" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>RustCommunity</span></a> <a href="https://mastodon.social/tags/Unicode" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Unicode</span></a></p>
Juhis<p>After a year since the last update, I returned to write some Rust to build a new feature for 235.</p><p>I documented my process of making it work and then extensively refactoring to make it nice. </p><p><a href="https://hamatti.org/posts/learning-rust-10-added-new-feature-with-hashmap/" target="_blank" rel="nofollow noopener noreferrer" translate="no"><span class="invisible">https://</span><span class="ellipsis">hamatti.org/posts/learning-rus</span><span class="invisible">t-10-added-new-feature-with-hashmap/</span></a></p><p><a href="https://mastodon.world/tags/LearningRust" class="mention hashtag" rel="tag">#<span>LearningRust</span></a> <a href="https://mastodon.world/tags/Rust" class="mention hashtag" rel="tag">#<span>Rust</span></a> <a href="https://mastodon.world/tags/RustLang" class="mention hashtag" rel="tag">#<span>RustLang</span></a></p>
Jeff Sonstein<p>sigh, I'm going to need stronger drugz to walk my way through this "example":</p><p>----- snip -----<br>use std::fmt::Display;</p><p>fn longest_with_an_announcement&lt;'a, T&gt;(<br> x: &amp;'a str,<br> y: &amp;'a str,<br> ann: T,<br>) -&gt; &amp;'a str<br>where<br> T: Display,<br>{<br> println!("Announcement! {}", ann);<br> if x.len() &gt; y.len() {<br> x<br> } else {<br> y<br> }<br>}<br>----- snip -----<br><a href="https://masto.deoan.org/tags/LearningRust" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>LearningRust</span></a></p>
Jeff Sonstein<p>master of understatement:</p><p>"Most of the time, an error message suggesting the 'static lifetime results from attempting to create a dangling reference or a mismatch of the available lifetimes. In such cases, the solution is fixing those problems, not specifying the 'static lifetime."</p><p>translation: if you have to use a shotgun, then you are probably doing something wrong.</p><p><a href="https://masto.deoan.org/tags/LearningRust" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>LearningRust</span></a></p>
Jeff Sonstein<p>hmmmm, going to have to re-read "10.3. Validating References with Lifetimes" a few more times to grok it. in the first example set, the problem lifetimes is aimed at solving looks to me like an artifact of the language avoiding using an explicit return statement.</p><p>either I am missing something and later sections of this chapter will clarify, or this is really just a way to overcome a logical ambiguity problem which the language itself has introduced.</p><p><a href="https://masto.deoan.org/tags/LearningRust" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>LearningRust</span></a></p>
Jeff Sonstein<p>"Note that it isn’t possible to call the default implementation from an overriding implementation of that same method."</p><p>traits ain't interfaces, in the OOP sense... no calling "super"</p><p><a href="https://masto.deoan.org/tags/LearningRust" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>LearningRust</span></a></p>
Jeff Sonstein<p>hmmm, "traits" are pretty sweet... and subtly different than "interfaces"c</p><p>reading: "Traits: Defining Shared Behavior"</p><p><a href="https://masto.deoan.org/tags/LearningRust" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>LearningRust</span></a></p>
Jeff Sonstein<p>ugh, I understand why they re-used names in the example-set code and... ugh. Phil Karlton wuz right.</p><p><a href="https://masto.deoan.org/tags/LearningRust" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>LearningRust</span></a></p>
Jeff Sonstein<p>moving on to CH 10: "Generic Types, Traits, and Lifetimes"</p><p><a href="https://masto.deoan.org/tags/LearningRust" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>LearningRust</span></a></p>