Rust Search

Find the best content on Rust, curated by the community; a search engine for Rustaceans.
e014: Stringing things along
18:58
New Rustacean newrustacean.com
Strings &strs and Vecs and slices (and Unicode) – oh, my! Notes This episode, I take a deep dive on strings in Rust, looking at the differences between String and &str, discussing Unicode a bit, and then expanding the discussion to think about how these types relate to the types they’re built on (like Vec). Links Strings: The Rust Book Rust by Example str docs: module primitive type String module type definition Dereferencing coercions std::ops::Deref Sponsors Aleksey Pirogov Chris Palmer Derek Morr Hamza Sheikh Lachlan Collins Leif Arne Storset Luca Schmid Micael Bergeron Pascal Hertleif Ralph Giles (“rillian”) Ralph “FriarTech” Loizzo reddraggone9 Ryan Ollos Vesa Kaihlavirta William Roe (Thanks to the couple people donating who opted out of the reward tier, as well. You know who you are!) Become a sponsor Patreon Venmo Dwolla Cash.me Flattr Contact New Rustacean: Twitter: @newrustacean Email: hello@newrustacean.com Chris Krycho GitHub: chriskrycho Twitter: @chriskrycho
Podcast 2016-04-26 18:58
Bonus 4: We can have nice things
10:17
New Rustacean newrustacean.com
Just how good Rust is, and how you can learn it even if you’re busy. Notes Sometimes life goes crazy and I don’t have time to do all the technical writing required for a full episode, but I can’t get Rust off my mind, so I record an episode like this one. Where I talk a bit about how versatile Rust is and suggest some surprising ways you might be able to use it. Links Rust 1.8 blog post Fake build tool in F♯ HackerNews on Rust 1.8 Someone using it for personal projects Using it in place of scripting languages “Feels like Python, runs like C” Sponsors Aleksey Pirogov Chris Palmer Derek Morr Hamza Sheikh Lachlan Collins Leif Arne Storset Luca Schmid Micael Bergeron Pascal Hertleif Ralph Giles (“rillian”) Ralph “FriarTech” Loizzo reddraggone9 Ryan Ollos Vesa Kaihlavirta William Roe (Thanks to the couple people donating who opted out of the reward tier, as well. You know who you are!) Become a sponsor Patreon Venmo Dwolla Cash.me Contact New Rustacean: Twitter: @newrustacean Email: hello@newrustacean.com Chris Krycho GitHub: chriskrycho Twitter: @chriskrycho
Podcast 2016-04-19 10:17
e013: Staying alive
17:40
New Rustacean newrustacean.com
Reasoning about and using lifetimes in Rust (and why we need them) Notes Lifetimes are our way of reasoning about how long a given piece of data is available and safe to use in Rust. The reason we don't have the dangling pointer problem is that we do have lifetimes instead. They're not magic, they're just a bit of semantics and syntax that let us specify the rules for how long any given item lives, and how long references to data must be valid. Links Diesel Tutorial API docs Mio, an I/O library Getting Started API Docs Sponsors Aleksey Pirogov Chris Palmer Derek Morr Hamza Sheikh Lachlan Collins Leif Arne Storset Luca Schmid Micael Bergeron Pascal Hertleif Ralph Giles ("rillian") Ralph "FriarTech" Loizzo reddraggone9 Ryan Ollos Vesa Kaihlavirta William Roe (Thanks to the couple people donating who opted out of the reward tier, as well. You know who you are!) Become a sponsor Patreon Venmo Dwolla Cash.me Contact New Rustacean: Twitter: @newrustacean Email: hello@newrustacean.com Chris Krycho GitHub: chriskrycho Twitter: @chriskrycho
Podcast 2016-04-04 17:40
e012: I'm not familiar with that expression
16:41
New Rustacean newrustacean.com
What it means to be an expression-oriented language, and how that works out in Rust. Notes Rust is an expression-oriented language. What does that mean, and how does it play out in Rust? We look at if and match blocks, discuss looping constructs, and examine functions, and then widen out to discuss how having an expression-oriented language can change the way we think about programming. Links Redox Servo alpha announcement WebRender Wired article on Dropbox Rust documentation on expression-oriented-ness: Rust Book Rust by Example Rust Reference Removing Rust ternary Digits of pi necessary for astronavigation Sponsors Aleksey Pirogov Chris Palmer Derek Morr Hamza Sheikh Lachlan Collins Leif Arne Storset Luca Schmid Micael Bergeron Pascal Ralph Giles (“rillian”) Ralph “FriarTech” Loizzo reddraggone9 Ryan Ollos William Roe Become a sponsor Patreon Venmo Dwolla Cash.me Contact New Rustacean: Twitter: @newrustacean Email: hello@newrustacean.com Chris Krycho GitHub: chriskrycho Twitter: @chriskrycho
Podcast 2016-03-21 16:41
e011: Once Upon a Type
17:51
New Rustacean newrustacean.com
Type systems: strong vs. weak, dynamic vs. static, and degrees of expressivity. Notes Talking about type systems! A broad and wide-ranging discussion about type systems in general, with specific examples from languages like PHP, JavaScript, Python, C, C++, Java, C♯, Haskell, and Rust! What is a type system? What are the kinds of things we get out of type systems? What are the tradeoffs with different type systems? What is Rust’s type system like? What is especially attractive about Rust’s type system? A comment on the C integer/character string addition example: what’s actually happening there is that the character string is an array “under the covers,” and as such has an address. C silently switches to using the memory address, which is of course just an integer, when you try to add the two together. As I said on the show: the result is nonsense (unless you’re using this as a way of operating on memory addresses), but it’s compileable nonsense. In a stricter and stronger type system, memory addresses and normal numbers shouldn’t be addable! Links Rust 1.7 released HashMap changes Introduction to Type Theory Visualizing Rust’s type-system The Many Kinds of Code Reuse in Rust Sponsors Aleksey Pirogov Chris Palmer Derek Morr Hamza Sheikh Lachlan Collins Leif Arne Storset Luca Schmid Micael Bergeron Pascal Ralph Giles (“rillian”) Ralph “FriarTech” Loizzo reddraggone9 Ryan Ollos William Roe Become a sponsor Patreon Venmo Dwolla Cash.me Contact New Rustacean: Twitter: @newrustacean Email: hello@newrustacean.com Chris Krycho GitHub: chriskrycho Twitter: @chriskrycho
Podcast 2016-03-08 17:51
Interview 1::Part 2 – Sean Griffin
22:14
New Rustacean newrustacean.com
Sean Griffin on type systems and hopes for Rust's future Notes Chris chats with Sean Griffin about the tradeoffs between mental overhead and type safety, the expressiveness of different type systems, and some of the places where Rust currently falls down. Corrigenda Sean noted he could be wrong about IEnumerable<T> not having a Sum method in C♯, and post-show research indicated that he was (it's possible it was added after he had stopped doing .NET work, of course). See the documentation for details on how IEnumerable<T>.Sum it behaves in C♯ if you're curious. As a related note, I (Chris) have done a little bit of digging on C♯ in the interval and it's fair to say that while a lot of the "ceremony" involved in writing C♯ is annoying, it's much more than just a "slightly nicer Java", and indeed is a much nicer language than my previous, limited exposure had led me to believe. It's no Rust or F♯, but its type system is substantially more capable than Java's. Links fmap Discussion of fmap with Optional in Swift In Haskell Rust: Trait objects Specialization RFC Implementation Diesel Sponsors Aleksey Pirogov Chris Palmer Derek Morr Hamza Sheikh Leif Arne Storset Luca Schmid Micael Bergeron Ralph Giles ("rillian") reddraggone9 Ryan Ollos William Roe Become a sponsor Patreon Venmo Dwolla Cash.me Follow New Rustacean: Twitter: @newrustacean Email: hello@newrustacean.com Chris Krycho GitHub: chriskrycho Twitter: @chriskrycho
Podcast 2016-02-25 22:14
Interview 1::Part 1 – Sean Griffin
24:50
New Rustacean newrustacean.com
Sean Griffin on Rust, ORMs, and Web Frameworks Notes Chris chats with Sean Griffin about his programming background and initial experience with Rust, Rust's appeal, and what he's doing with Diesel and some of his plans for a new web framework in Rust. Links Ruby on Rails Active Record Diesel GitHub Gitter The Bike Shed episodes which include talk of Rust and Diesel 51: Is Sim City Still Running (with Steve Klabnik) 49: A More Practical Haskell 48: Is Everyone Trying Their Best? 46: Don't Breath, Save the Planet 44: It Won't Crash... It Might Crash 39: Okay With Instability 32: Bug for Bug Compatibility 31: Oxidizing an ORM 27: I've Got 29.97 Problems (and codecs are some) 23: Why Did They Call It Rust? Maybe Haskell Sponsors Aleksey Pirogov Chris Palmer Derek Morr Hamza Sheikh Leif Arne Storset Luca Schmid Micael Bergeron Ralph Giles ("rillian") reddraggone9 Ryan Ollos William Roe Become a sponsor Patreon Venmo Dwolla Cash.me Follow New Rustacean: Twitter: @newrustacean Email: hello@newrustacean.com Chris Krycho GitHub: chriskrycho Twitter: @chriskrycho
Podcast 2016-02-15 24:50
Bonus 3: Building as a community
12:03
New Rustacean newrustacean.com
Community is one of the most important parts of a programming language community, or indeed any technical community. In this episode, I talk a bit about what happens when you don't have a good community, how Rust's community has done well so far, and then how to keep building a good community and how to build good things as a community. Sponsors Aleksey Pirogov Chris Palmer Derek Morr Hamza Sheikh Luca Schmid Micael Bergeron Ralph Giles (“rillian”) reddraggone9 William Roe Become a sponsor Patreon Venmo Dwolla Cash.me Follow New Rustacean: Twitter: @newrustacean App.net: @newrustacean Email: hello@newrustacean.com Chris Krycho Twitter: @chriskrycho App.net: @chriskrycho
Podcast 2016-02-01 12:03
e010: Macros rule!
16:32
New Rustacean newrustacean.com
Macros rule! Notes Because of the way macros are exported—before name resolution on crates occurs—the documentation for the macros defined in the source for this episode occurs in the Macros section of the show_notes crate documentation, rather than within the documentation for this module. (See the Rust Book discussion of documenting macros for details.) Even so, the source is still in this module; see the implementations for details. Links Rust book: Macros Rust by Example: Macros Rust reference: Macros “Macro by Example” (original paper) Nick Cameron: Macros Macros in Rust Part 1: macro_rules! Part 2: procedural macros Part 3: hygiene Part 4: scoping and import/export Part 5: current problems and possible solutions Part 6: more issues with macro_rules! concat_idents and macros in ident positions Macro plans, overview Macro hygiene in all its guises and variations Sets of scopes macro hygiene Macro plans: syntax Procedural macros, framework Sponsors Aleksey Pirogov Chris Palmer Derek Morr Hamza Sheikh Luca Schmid Micael Bergeron Ralph Giles (“rillian”) reddraggone9 William Roe Become a sponsor Patreon Venmo Dwolla Cash.me Follow New Rustacean: Twitter: @newrustacean App.net: @newrustacean Email: hello@newrustacean.com Chris Krycho Twitter: @chriskrycho App.net: @chriskrycho
Podcast 2016-01-18 16:32
e009: Composing a Rustic tune
17:23
New Rustacean newrustacean.com
Notes Last time, we looked at generics and traits at a high level. This time, we dig deeper on traits, looking specifically at std::iter::Iterator as an example of a powerful trait that can be composed across types, and then at how we might compose multiple traits on a single type. We also talk about the syntax for traits, the use of marker traits, some of the things you can’t presently do with traits, and even just a smidge about the future of traits in Rust. All that in less than 20 minutes! You’ll find today’s source example fairly interesting, I think: it’s just one type, but it uses almost every concept discussed on the show today! Links Nick Cameron: “Thoughts on Rust in 2016” “Upcoming breakage starting in Rust 1.7, from RFCs 1214 and 136” RFC 1214: Clarify (and improve) rules for projections and well-formedness RFC 136: Ban private items in public APIs The Rust Book: Traits Trait objects (dynamic dispatch) The Rust reference: std::iter and std::iter::Iterator Add Drop PartialEq and Eq PartialOrd and Ord Special traits Trait objects RFC: impl specialization Aaron Turon: “Specialize to reuse” Sponsors Aleksey Pirogov Chris Palmer Derek Morr Hamza Sheikh Luca Schmid Micael Bergeron Ralph Giles (“rillian”) reddraggone9 William Roe Become a sponsor Patreon Venmo Dwolla Cash.me Follow New Rustacean: Twitter: @newrustacean App.net: @newrustacean Email: hello@newrustacean.com Chris Krycho Twitter: @chriskrycho App.net: @chriskrycho
Podcast 2016-01-09 17:23
e008: Just like something else
17:37
New Rustacean newrustacean.com
Notes In this episode we cover—at a very high level—two more fundamental concepts in Rust programming: generics and traits. Generics gives us the abilitty to write types and functions which can be used with more than one type. Traits give us the ability to specify behavior which can be implemented for more than one type. The combination gives us powerful tools for higher-level programming constructs in Rust. Comments on source code Now that we have a handle on how tests work, we’ll use them to validate the behavior of our code going forward. This is great: we can show that the tests do what we think. To today’s point, though: we actually know even apart from whether the tests run successfully that these generic functions and the associated traits are behaving as we want. Failure with generics is a compile-time error, not a runtime error. Links Rust Book Generics Traits – includes a discussion of trait bounds and generic traits* Rust by Example Generics Traits Generic traits Traits bounds Generics and traits in use in Diesel Sponsors Chris Palmer Derek Morr Luca Schmid Micael Bergeron Ralph Giles (“rillian”) reddraggone9 William Roe Become a sponsor Patreon Venmo Dwolla Cash.me Follow New Rustacean: Twitter: @newrustacean App.net: @newrustacean Email: hello@newrustacean.com Chris Krycho Twitter: @chriskrycho App.net: @chriskrycho
Podcast 2015-12-27 17:37
e007: Testify
18:46
New Rustacean newrustacean.com
Notes All about testing in Rust! In order, we take a look at: Why you need tests. Unit tests in other (dynamically-typed) languages vs. in Rust. How to write unit tests in Rust. How and why to write integration tests in Rust. How and why to use benchmarks in Rust. The detailed code samples for this episode are heavy on showing; because of the nature of test functions, you will be best off just reading the source rather than leaning heavily on the descriptions generated by rustdoc. (The descriptions are still there, but they’re much less useful than they have been in previous episodes.) In particular, the test module here is excluded because of the use of the #[cfg(test)] attribute marker on it. Because we are using the feature-gated benchmarking functionality, the show notes “library” can now only be compiled with the Rust nightly (as of 1.5, the version current as this episode is produced). One thing that isn’t necessarily obvious from reading the test documentation in the Rust book and Rust reference: the extern crate test statement needs to be not in this module, but at the module (lib.rs) which defines the library/crate; in this case, show_notes/lib.rs. Links Rust Book: Testing Attributes Benchmark tests Rust reference: Attributes Diesel (Rust ORM) 31: Oxidizing an ORM 32: Bug for Bug Compatibility Sponsors Chris Palmer Derek Morr Luca Schmid Micael Bergeron Ralph Giles (“rillian”) reddraggone9 William Roe Become a sponsor Patreon Venmo Dwolla Cash.me Follow New Rustacean: Twitter: @newrustacean App.net: @newrustacean Email: hello@newrustacean.com Chris Krycho Twitter: @chriskrycho App.net: @chriskrycho
Podcast 2015-12-13 18:46
Bonus 2: Legacy Code
9:41
New Rustacean newrustacean.com
Legacy Code Software developers spend a large part of our careers dealing with legacy code. But what is the best way to deal with legacy code? When should you rip out the old and rewrite it, and when should you opt for smaller clean-up jobs because, however ugly, what is already present works? Sponsors Chris Palmer Derek Morr Luca Schmid Micael Bergeron Ralph Giles (“rillian”) reddraggone9 William Roe Become a sponsor Patreon Venmo Dwolla Cash.me Follow New Rustacean: Twitter: @newrustacean App.net: @newrustacean Email: hello@newrustacean.com Chris Krycho Twitter: @chriskrycho App.net: @chriskrycho
Podcast 2015-12-06 9:41
Bonus 1: Polyglot Programming Promises and Perils
8:28
New Rustacean newrustacean.com
Polyglot Programming Promises and Perils Sometimes, you’re doing a technical interview, and you just cannot figure out why your JavaScript function isn’t behaving like it should… and then, prompted by the interviewer, you realize that you’re not returning anything. Polyglot programming is beautiful, and wonderful, and sometimes it bites you when you aren’t looking. Links Scala F♯ Elixir Sponsors reddraggone9 Chris Patti Become a sponsor Patreon Venmo Dwolla Cash.me Follow New Rustacean: Twitter: @newrustacean App.net: @newrustacean Email: hello@newrustacean.com Chris Krycho Twitter: @chriskrycho App.net: @chriskrycho
Podcast 2015-11-25 8:28
e006: Modularize this!
18:22
New Rustacean newrustacean.com
Notes Today, we are talking about modules, packages, and APIs in Rust. Taking a bit of a breather after some pretty hard material the last few weeks. For reference, the Rust book section on Crates and Modules will be very helpful. Corrigenda I accidentally called this episode 5, instead of episode 6. Whoops. Just before the 15:00 mark, while discussing libraries, I referred to “e006.md” when I meant to say “e006.rs”. Slips of the tongue inspired by the fact that Rust (delightfully) uses Markdown for its documentation. Links Roguelike in Rust Yehuda Katz on Ruby FFI Sponsors reddraggone9 Chris Patti Become a sponsor Patreon Venmo Dwolla Cash.me Follow New Rustacean: Twitter: @newrustacean App.net: @newrustacean Email: hello@newrustacean.com Chris Krycho Twitter: @chriskrycho App.net: @chriskrycho
Podcast 2015-11-16 18:22
e005: Allocate it where?
18:30
New Rustacean newrustacean.com
Allocate it where? Subject: Returning functions from other functions, and thinking about the stack, the heap, and reference types. MP3 Notes This episode, we look at returning functions from other functions, and as part of that discuss some basics about the stack and the heap—and why we need to care about them for returning functions. The functions themselves are not especially interesting; they just show you the basic form you use to return functions from other functions, and how to then use them in another function. You’ll want to take a detailed look instead at the documentation for each (or just read the source!), because that’s where the meat of the discussion in this week’s code is. Links Rust 1.4 release announcement “Clarify (and improve) rules for projections and well-formedness” MSVC support tracking issue Rust 1.4 full release notes “What and where are the stack and the heap?” Sponsors reddraggone9 Chris Patti Become a sponsor Patreon Venmo Dwolla Cash.me Follow New Rustacean: Twitter: @newrustacean App.net: @newrustacean Email: hello@newrustacean.com Chris Krycho Twitter: @chriskrycho App.net: @chriskrycho
Podcast 2015-11-08 18:30
e004: Functionalized
17:07
New Rustacean newrustacean.com
Date: October 29, 2015 Subject: Functions, methods, closures, and function as arguments! Notes This week’s episode covers the basics of all sorts of functions: normal functions, methods, and closures. Closures An explanation (in Ruby) by Martin Fowler Rust book Rust by Example “What is a closure?” (Progammers Stack Exchange) – the first answer is the best, but the second answer may be a helpful stepping stone for people just getting their heads around this and coming from OOP languages like C++ or Java (even though I disagree with the explanation in some ways). “What is a closure?” (Stack Overflow) – careful, thorough answer using JavaScript as an example. Links Exercism (hat tip: Lechindanier on GitHub) Rust Learning Rust and Swift (viii) Follow/Support New Rustacean: Twitter: @newrustacean App.net: @newrustacean Patreon Dwolla Email: hello@newrustacean.com Chris Krycho Twitter: @chriskrycho App.net: @chriskrycho
Podcast 2015-10-30 17:07
e003: No. more. nulls.
16:51
New Rustacean newrustacean.com
No More Nulls Subject: Enumerated (enum) types, pattern matching, and meaningful return types. Notes Today’s episode discusses, in order: Enumerated types, with an eye to the difference between structs and enums, and to the differences between enums in C and in Rust. Pattern matching, with a focus on using them with enumerated types and some discussion about how they differ from switch blocks in C-like languages. Using the Option and Result enumerated types with pattern matching to provide meaningful returns from functions safely. Order There is a specific order to the examples below, and it is not the automatically-alphabetized order rendered by rustdoc. Instead, you should work through in the sequence they appear in the source: RelatedishThings demonstrate_basic_enumeration demonstrate_match get_an_option demonstrate_option get_a_result demonstrate_result Links New Rustacean Pull Request #1 Work on IDE support! Landing page My chosen tool: JetBrains/IntelliJ Rustlings Rust FFI Omnibus Follow/Support New Rustacean: Twitter: @newrustacean App.net: @newrustacean Patreon Email: Chris Krycho Twitter: @chriskrycho App.net: @chriskrycho
Podcast 2015-10-21 16:51
e002: Something borrowed, something… moved?
17:12
New Rustacean newrustacean.com
Something borrowed, something… moved? Subject: The struct data type constructor, and the basics of Rust’s “ownership” concept and “borrowing” and “moving”. Follow/Support New Rustacean: Twitter: @newrustacean App.net: @newrustacean Patreon Email: hello@newrustacean.com Chris Krycho Twitter: @chriskrycho App.net: @chriskrycho Notes Today’s episode discusses, and the associated source code demonstrates, a few basic behaviors of structs… including borrowing! After taking a short look at one of Rust’s basic approaches to creating new types, we dive into a fairly thorough overview of how borrowing works in fairly run-of-the-mill Rust code. This is a basic introduction, and as such I’m not getting into things like heap-allocated memory (Box) or dealing with move semantics with threads or closures. (I haven’t actually figured those out well enough yet to write something like this for them!) As usual, you’ll want to have the src open to see what I’m doing with the components documented below. Links rustfmt – a tool for formatting Rust code repo “rustfmt-ing Rust` Reddit discussion RFC for incremental compilation Text of the RFC GitHub pull request
Podcast 2015-10-12 17:12
e001: Document All the Things
17:06
New Rustacean newrustacean.com
Document all the things! Subject: Documentation in general, and rustdoc and cargo doc in particular. Follow/Support New Rustacean: Twitter: @newrustacean App.net: @newrustacean Patreon Email: hello@newrustacean.com Chris Krycho Twitter: @chriskrycho App.net: @chriskrycho Notes This is a mostly-empty module, and it is intended as such. Why? Well, because almost all the sample code exists in these comments, which serve as the show notes. If you listen to the episode or take a look at the source files, you’ll see how it works! The components below are included solely so you can see how the docstrings work with each kind of thing. Make sure to click on the names of the items: there is more documentation there. Again, take a look at the source to see how it looks in the context of a file module. Note that this module-level docstring uses rather than `///`-style comments. This is because this docstring is documenting the item which contains it, rather than the following item. Per [Rust RFC 505][1], the preferred approach is always to use the "following" form (`///`) rather than the "containing" form (), except for module-level docs like these. (I will be following RFC 505 throughout.) Links Rust and MSVC tracking issue Other documentation tools: Predecessors: Python’s Sphinx tool Doxygen JSDoc JavaDoc Other new languages with Markdown tooling Julia has a built-in documentation system Elixir has ex_doc Rust 1.3 release announcement Rust’s package hosting: crates.io Crater for testing for backwards compatibility Semantic versioning “Stability as a Deliverable”: Rust official blog post on version stability, backwards compatibility, and release channels. The Rust book chapter on rustdoc
Podcast 2015-10-03 17:06
"We'd have buttons on the screen to control the fans of the car. I had to write a lot of code before I could compile it all, a big jenga tower. But onc..."

Search tips

Type anything to search across articles, videos (including conference talks), podcasts, research, crates, and Rust API documentation. These operators give you finer control — click an example to try it.

Find pages containing all your words. Pages where the words appear together rank higher.
Quote part of your query to keep those words together as an exact phrase within a larger search.
Wrap the whole query in quotes for a verbatim search that matches text exactly, punctuation and all — perfect for Rust syntax. Needs at least 3 characters.
Limit results to a single site. Works on its own () too. One site: per search.

Use the tabs and filters above the results to narrow by content type, publication year, and sort order.