PLAY PODCASTS
New Rustacean

New Rustacean

103 episodes — Page 3 of 3

e002: Something borrowed, something… moved?

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: [email protected] 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

Oct 12, 201517 min

e001: Document All the Things

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: [email protected] 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

Oct 3, 201517 min

e000: Hello, world!

Hello, World! Subject: The host, the language, and the show! Today’s show is pretty meta. You can skip it if you just want to start with something more technical, but I thought listeners might want to know a little about the origins of the show and my own background, so that’s what you get today. Next time, we’ll be tackling the rustdoc command in some detail. This is an almost-empty module: we aren’t doing any fun code samples yet. I included the standard “Hello, world!” example, because how could I not? However, at some point in the future, there will be much more detailed code samples available: in the GitHub repository for the show in the show notes attached to each episode Hopefully, the result will be a pretty helpful bunch of side content along with the audio of the podcast itself.

Sep 24, 201517 min