{"version":"https://jsonfeed.org/version/1","title":"Read Rust - Language","home_page_url":"https://readrust.net/","feed_url":"https://readrust.net/language/feed.json","description":"General posts about the Rust language.","author":{"name":"Wesley Moore","url":"https://www.wezm.net/"},"items":[{"id":"ad5f1111-0d73-4e39-b196-59820eed781c","title":"Why async Rust?","content_text":"Async/await syntax in Rust was initially released to much fanfare and excitement. Recently, the reception has been a bit more mixed. To some extent this is just the natural progression of the hype cycle, but I also think as we have become more distant from the original design process, some of the context has been lost.","url":"https://without.boats/blog/why-async-rust/","date_published":"2023-10-16T02:53:19Z","author":{"name":"Saoirse"},"tags":["Language"]},{"id":"065deb27-4c94-48dd-8300-dd407753efc0","title":"The Registers of Rust","content_text":"It’s been nearly two and half years since I was an active contributor to the Rust project. There are some releases that I’ve been very excited about since then, and I’m heartened by Niko’s recent blog post emphasizing stability and polish over grand new projects. But I’ve also felt a certain apprehension at a lot of the directions the project has taken, which has often occupied my thoughts. From that preoccupation this blog post has emerged, hopefully the first in a series over the next few weeks outlining my thoughts on the design of Rust in 2023, especially in connection to async, and I hope its impact will be chiefly positive.","url":"https://without.boats/blog/the-registers-of-rust/","date_published":"2023-03-09T00:17:25Z","author":{"name":"Saoirse"},"tags":["Language"]},{"id":"7d1d0b2a-e3a8-4f95-98aa-154305a390a3","title":"Keyword Generics Progress Report: February 2023","content_text":"About 9 months ago we announced the creation of the Keyword Generics Initiative; a group working under the lang team with the intent to solve the function coloring problem through the type system not just for async, but for const and all current and future function modifier keywords as well.\r\n\r\nWe're happy to share that we've made a lot of progress over these last several months, and we're finally ready to start putting some of our designs forward through RFCs. Because it's been a while since our last update, and because we're excited to share what we've been working on, in this post we'll be going over some of the things we're planning to propose.","url":"https://blog.rust-lang.org/inside-rust/2023/02/23/keyword-generics-progress-report-feb-2023.html","date_published":"2023-02-24T00:23:09Z","author":{"name":"Yoshua Wuyts"},"tags":["Language"]},{"id":"0f940b79-bca2-42b9-a22d-5f0f4079356a","title":"Why is building a UI in Rust so hard?","content_text":"In 2019, “GUI” was the 6th most highly requested feature that was preventing adoption of Rust. This is fundamentally a limitation in Rust: the design of the language itself makes modelling common approaches to building UI difficult.\r\n\r\nIn this post, I’ll discuss why Rust’s unique memory management model and lack of inheritance makes traditional techniques to build a UI framework difficult and a few of the ways we’ve been working around it. I believe one of these approaches, or some combination of them, will ultimately lead to a stable cross-platform UI toolkit for high-performance UI rendering that everyone can use.","url":"https://www.warp.dev/blog/why-is-building-a-ui-in-rust-so-hard","date_published":"2023-02-17T00:32:56Z","author":{"name":"Aloke Desai"},"tags":["Language"]},{"id":"8557684f-9c19-432c-a9dd-297ef49f26b9","title":"Rustler - Using Rust crates in Elixir","content_text":"In this blog post, I will show you how easily you can build and use small Rust programs inside Elixir using Rustler.","url":"https://mainmatter.com/blog/2023/02/01/using-rust-crates-in-elixir/","date_published":"2023-02-08T23:19:18Z","author":{"name":"Bartlomiej Dudzik"},"tags":["Language"]},{"id":"4f6bd9d4-aa60-4c84-a5cf-4559f18432ff","title":"Generate gem skeleton with Rust extension","content_text":"Do you think dynamically typed interpreted Ruby language and statically typed compiled Rust language could be friends? Yes, they can! And actually, they are!\r\n\r\nOfficially it all started when YJIT was ported to Rust and Ruby codebase has officially onboarded Rust code. This friendship matured when RubyGems 3.3.11 (with a new Add cargo builder for rust extensions feature) was released capable of compiling Rust-based extensions during gem installation process (similar to well-known C-based gem extensions like nokogiri, pg or puma).\r\n\r\nAnd now, with Bundler 2.4, bundle gem skeleton generator can provide all the glue you need to start using Rust inside your gems thanks to the new --ext=rust parameter!","url":"https://bundler.io/blog/2023/01/31/rust-gem-skeleton.html","date_published":"2023-02-06T22:10:31Z","author":{"name":"Josef Šimánek"},"tags":["Language"]},{"id":"5f6a9b4c-0ca3-4124-954d-973ed77953c1","title":"Rust 2023","content_text":"The core team used to put out a yearly call for blog posts. My colleage Nick published their \"Rust in 2023\" post last week, and encouraged others to do the same. I like the idea of taking a moment to reflect on larger topics, and so well, why not write a post!","url":"https://blog.yoshuawuyts.com/rust-2023/","date_published":"2022-12-21T22:51:56Z","author":{"name":"Yoshua Wuyts"},"tags":["Language"]},{"id":"5040f17c-6e1a-4e9f-9d49-df26723e5947","title":"Ten Years of Ru...ewriting my website","content_text":"December 21 is the anniversary of when I first heard about Rust way back in 2012. I used to write yearly posts about it; the last time I did was in 2018. That makes today ten years. I thought I’d have something big to say here, but… I just don’t.","url":"https://steveklabnik.com/writing/ten-years-of-ru---ewriting-my-website","date_published":"2022-12-21T22:45:25Z","author":{"name":"Steve Klabnik"},"tags":["Language"]},{"id":"2106efb4-341b-429d-a321-d68ee87ef026","title":"The carcinization of Go programs","content_text":"What if I told you there was a way that we could ship one binary from Rust, have that work on every platform Go supports, and not have to modify the build process beyond a simple go build? Imagine how much easier that would be. It's easy to imagine that such a thing would let users not even know that Rust was involved at all, even if they consume a package or program that uses it.\r\n\r\nI've done this with a package I call mastosan and here's why it exists as well as how I made it.","url":"https://xeiaso.net/blog/carcinization-golang","date_published":"2022-11-22T23:06:11Z","author":{"name":"Xe Iaso"},"tags":["Language"]},{"id":"e3507c8b-0d53-4319-8a51-a3e8d1f7fab5","title":"Generic associated types to be stable in Rust 1.65","content_text":"As of Rust 1.65, which is set to release on November 3rd, generic associated types (GATs) will be stable — over six and a half years after the original RFC was opened. This is truly a monumental achievement; however, as with a few of the other monumental features of Rust, like async or const generics, there are limitations in the initial stabilization that we plan to remove in the future. \r\n\r\nThe goal of this post is not to teach about GATs, but rather to briefly introduce them to any readers that might not know what they are and to enumerate a few of the limitations in initial stabilization that users are most likely to run into.","url":"https://blog.rust-lang.org/2022/10/28/gats-stabilization.html","date_published":"2022-10-29T03:16:23Z","author":{"name":"Jack Huey"},"tags":["Language"]},{"id":"57c5a854-aa88-4a4e-9ffd-ea5d07b63059","title":"Progress report on rustc_codegen_cranelift (Okt 2022)","content_text":"There has a ton of progress since the last progress report. There have been 303 commits since then. @afonso360 has been contributing a ton to improve Windows and AArch64 support. (Thanks a lot for that!)","url":"https://bjorn3.github.io/2022/10/12/progress-report-okt-2022.html","date_published":"2022-10-21T00:38:58Z","author":{"name":"bjorn3"},"tags":["Language"]},{"id":"1b831865-6b0e-40ad-aaa1-fad74c579eb3","title":"A deeper look into the GCC Rust front-end","content_text":"Philip Herron and Arthur Cohen presented an update on the \"gccrs\" GCC front end for the Rust language at the 2022 Kangrejos conference. Less than two weeks later — and joined by David Faust — they did it again at the 2022 GNU Tools Cauldron. This time, though, they were talking to GCC developers and refocused their presentation accordingly; the result was an interesting look into the challenges of implementing a compiler for Rust.","url":"https://lwn.net/Articles/909887/","date_published":"2022-10-21T00:25:01Z","author":{"name":"Jonathan Corbet"},"tags":["Language"]},{"id":"d00f607a-dd9a-439f-b575-4a3e8fc84bba","title":"RAII: Compile-Time Memory Management in C++ and Rust","content_text":"One of the biggest such features – perhaps the biggest one – is RAII, C++’s and now Rust’s (somewhat oddly-named) scope-based feature for resource management. And while RAII is for managing all kinds of resources, its biggest use case is as part of a compile-time alternative to run-time garbage collection and reference counting.\r\n\r\nI will start by talking about the problem that RAII was originally designed to solve. Then, I will re-hash the basics of how RAII works, and work through memory usage patterns where RAII needs to be combined with these other features, especially the borrow checker. Finally, I will discuss the downsides of these memory management techniques, especially performance implications and handling of cyclic data structures.","url":"https://www.thecodedmessage.com/posts/raii/","date_published":"2022-10-21T00:21:38Z","author":{"name":"Jimmy Hartzell"},"tags":["Language"]},{"id":"86cf9687-80b8-41d5-bcc6-6a2231cf6167","title":"Hard Mode Rust","content_text":"This post is a case study of writing a Rust application using only minimal, artificially constrained API (eg, no dynamic memory allocation). It assumes a fair bit of familiarity with the language.","url":"https://matklad.github.io//2022/10/06/hard-mode-rust.html","date_published":"2022-10-06T23:20:21Z","author":{"name":"Aleksey Kladov"},"tags":["Language"]},{"id":"a8b1fc93-d40e-4657-bc5c-4be74900d017","title":"Implementing truly safe semaphores in rust, and the costs we pay for safety","content_text":"A couple of weeks ago, we released an update to rsevents, our crate that contains a rusty cross-platform equivalent to WIN32 events for signaling between threads and writing your own synchronization primitives, and rsevents-extra a companion crate that provides a few handy synchronization types built on top of the manual- and auto-reset events from the rsevents crate. Aside from the usual awesome helpings of performance improvements, ergonomics enhancements, and more, this latest version of rsevents-extra includes a Semaphore synchronization primitive – something that the rust standard library surprisingly lacks… but not without good reason.","url":"https://neosmart.net/blog/2022/implementing-truly-safe-semaphores-in-rust/","date_published":"2022-10-04T22:41:38Z","author":{"name":"Mahmoud Al-Qudsi"},"tags":["Language"]},{"id":"23d19424-6b61-4b68-baf2-86d2bb0339ce","title":"cargo careful: run your Rust code with extra careful debug checking","content_text":"Did you know that the standard library is full of useful checks that users never get to see? There are plenty of debug assertions in the standard library that will do things like check that char::from_u32_unchecked is called on a valid char, that CStr::from_bytes_with_nul_unchecked does not have internal nul bytes, or that pointer functions such as copy or copy_nonoverlapping are called on suitably aligned non-null (and non-overlapping) pointers. However, the regular standard library that is distributed by rustup is compiled without debug assertions, so there is no easy way for users to benefit from all this extra checking.","url":"https://www.ralfj.de/blog/2022/09/26/cargo-careful.html","date_published":"2022-09-29T07:20:47Z","author":{"name":"Ralf Jung"},"tags":["Language"]},{"id":"4c86f33e-b0cb-4dfa-b6b3-f3c9a1afcb57","title":"Futures Concurrency IV: Join Ergonomics","content_text":"In this post I want to show some of the ergonomics improvements IntoFuture might enable, inspired by Swift's recent improvements in async/await ergonomics.","url":"https://blog.yoshuawuyts.com/futures-concurrency-4/","date_published":"2022-09-29T07:12:59Z","author":{"name":"Yoshua Wuyts"},"tags":["Language"]},{"id":"85880050-b10b-4dff-8e8d-9ebe0ba9dac1","title":"Improvements for #[doc] attributes in Rust","content_text":"Since Rust 1.54, we can now use function-like macros in attributes. It has a lot of advantages for the #[doc] attribute, let's check some of them!","url":"https://blog.guillaume-gomez.fr/articles/2021-08-03+Improvements+for+%23%5Bdoc%5D+attributes+in+Rust","date_published":"2021-08-03T22:32:48Z","author":{"name":"Guillaume Gomez"},"tags":["Language"]},{"id":"441fe215-d96a-46f9-9b14-d8454e96bf5c","title":"The push for GATs stabilization","content_text":"So, what does that mean? Well, all it really means is that when you use this feature on nightly, you'll no longer get the \"generic_associated_types is incomplete\" warning. However, the real reason this is a big deal: we want to stabilize this feature. But we need your help. We need you to test this feature, to file issues for any bugs you find or for potential diagnostic improvements. Also, we'd love for you to just tell us about some interesting patterns that GATs enable over on Zulip!","url":"https://blog.rust-lang.org/2021/08/03/GATs-stabilization-push.html","date_published":"2021-08-03T22:21:59Z","author":{"name":"Jack Huey"},"tags":["Language"]},{"id":"f6cc142b-0e71-4f14-961b-04acaed22f18","title":"Rust 2021 public testing period","content_text":"We are happy to announce that the Rust 2021 edition is entering its public testing period. All of the planned features for the edition are now available on nightly builds along with migrations that should move your code from Rust 2018 to Rust 2021. If you'd like to learn more about the changes that are part of Rust 2021, check out the nightly version of the Edition Guide.","url":"https://blog.rust-lang.org/2021/07/21/Rust-2021-public-testing.html","date_published":"2021-07-21T22:07:50Z","author":{"name":"Niko Matsakis"},"tags":["Language"]},{"id":"4dbb6701-62e7-4f07-a1fb-e615e7209edd","title":"Building a shared vision for Async Rust","content_text":"The Async Foundations Working Group believes Rust can become one of the most popular choices for building distributed systems, ranging from embedded devices to foundational cloud services. Whatever they're using it for, we want all developers to love using Async Rust. For that to happen, we need to move Async Rust beyond the \"MVP\" state it's in today and make it accessible to everyone.\r\n\r\nWe are launching a collaborative effort to build a shared vision document for Async Rust. Our goal is to engage the entire community in a collective act of the imagination: how can we make the end-to-end experience of using Async I/O not only a pragmatic choice, but a joyful one?","url":"https://blog.rust-lang.org/2021/03/18/async-vision-doc.html","date_published":"2021-03-18T22:42:10Z","author":{"name":"Niko Matsakis"},"tags":["Language"]},{"id":"5f441546-be0e-4188-8da7-ca50dd09a055","title":"Ferrocene Part 3: The Road","content_text":"Ferrocene is an effort led by Ferrous Systems and its newly formed subsidiary Critical Section GmbH to qualify the Rust Language and Compiler for use in the safety-critical domain. This is the third post in a series detailing our plans and actions around this effort, addressing topics discussed in The Pitch and The Plan. Ferrocene's draft name was \"Sealed Rust.\"","url":"https://ferrous-systems.com/blog/ferrocene-update-three-the-road/","date_published":"2021-02-25T00:43:54Z","author":{"name":"Ferrous Systems"},"tags":["Language"]},{"id":"a0ccf1a1-71f4-4af0-b747-4edfaf9e8852","title":"Rust & the case of the disappearing stack frames","content_text":"The requirements of our current charter, and the RFC creating the group, are effectively fulfilled by the specification of \"C unwind\", so one option is to simply wind down the project group. While drafting the \"C unwind\" RFC, however, we discovered that the existing guarantees around longjmp and similar functions could be improved. Although this is not strictly related to unwinding1, they are closesly related: they are both \"non-local\" control-flow mechanisms that prevent functions from returning normally. Because one of the goals of the Rust project is for Rust to interoperate with existing C-like languages, and these control-flow mechanisms are widely used in practice, we believe that Rust must have some level of support for them.","url":"https://blog.rust-lang.org/inside-rust/2021/01/26/ffi-unwind-longjmp.html","date_published":"2021-01-28T03:46:29Z","author":{"name":"Kyle Strand on behalf of the FFI-unwind project group"},"tags":["Language"]},{"id":"2869a0d6-d630-4596-b50d-48553d2812e0","title":"Rust in Production: 1Password","content_text":"To learn why this language is favored so much between developers, we have started a new series on Rust in production. In it, we’ll interview people that have used Rust for significant projects: apps, services, startup MVPs, and others.\r\n\r\nFor the first installment of the series, we interview Michael Fey, VP of Engineering at 1Password. Read further to find out why they chose Rust for their product, the benefits of Rust for security-centered applications, and what cool libraries you should look into if you’re developing something similar in Rust.","url":"https://serokell.io/blog/rust-in-production-1password","date_published":"2021-01-21T07:07:23Z","author":{"name":"Gints Dreimanis"},"tags":["Language"]},{"id":"320973eb-c4e7-419a-8443-384639d658d6","title":"Announcing Rust 1.49.0","content_text":"The Rust team is happy to announce a new version of Rust, 1.49.0. For this release, we have some new targets and an improvement to the test framework.","url":"https://blog.rust-lang.org/2020/12/31/Rust-1.49.0.html","date_published":"2021-01-01T22:33:12Z","author":{"name":"The Rust Release Team"},"tags":["Language"]},{"id":"44604af1-3b26-4526-8469-3fc3b32dade0","title":"Launching the Lock Poisoning Survey","content_text":"The Libs team is looking at how we can improve the std::sync module, by potentially splitting it up into new modules and making some changes to APIs along the way.\r\nOne of those API changes we're looking at is non-poisoning implementations of Mutex and RwLock.\r\n\r\nTo find the best path forward we're conducting a survey to get a clearer picture of how the standard locks are used out in the wild.","url":"https://blog.rust-lang.org/2020/12/11/lock-poisoning-survey.html","date_published":"2020-12-14T22:26:49Z","author":{"name":"Ashley Mannix"},"tags":["Language"]},{"id":"3b12df03-9627-4c4c-8c91-d56079e52f5a","title":"Announcing Rustup 1.23.0","content_text":"Rustup is now natively available for the new Apple M1 devices, allowing you to install it on the new Macs the same way you'd install it on other platforms!\r\n\r\nStarting from this release of rustup (1.23.0) you can also install a minor version without specifying the patch version, like 1.48 or 1.45.","url":"https://blog.rust-lang.org/2020/11/27/Rustup-1.23.0.html","date_published":"2020-11-27T22:10:09Z","author":{"name":"The Rustup Working Group"},"tags":["Language"]},{"id":"127e2f60-d549-450e-bd04-c711aea4ecf3","title":"What the Error Handling Project Group is Working On","content_text":"The Rust community takes its error handling seriously. There’s already a strong culture in place for emphasizing helpful error handling and reporting, with multiple libraries each offering their own take (see Jane Lusby’s thorough survey of Rust error handling/reporting libraries).\r\n\r\nBut there’s still room for improvement. The main focus of the group is carrying on error handling-related work that was in progress before the group's formation. To that end, we're working on systematically addressing error handling-related issues, as well as eliminating blockers that are holding up stalled RFCs.","url":"https://blog.rust-lang.org/inside-rust/2020/11/23/What-the-error-handling-project-group-is-working-on.html","date_published":"2020-11-24T06:24:26Z","author":{"name":"Sean Chen"},"tags":["Language"]},{"id":"f2dd94db-ddf5-4c16-aa0c-2890b856c586","title":"Announcing Rust 1.48.0","content_text":"The Rust team is happy to announce a new version of Rust, 1.48.0. The star of this release is Rustdoc, with a few changes to make writing\r\ndocumentation even easier!","url":"https://blog.rust-lang.org/2020/11/19/Rust-1.48.html","date_published":"2020-11-19T20:12:19Z","author":{"name":"The Rust Release Team"},"tags":["Language"]},{"id":"e0e60133-6e7b-46a5-9836-fe482295f6f5","title":"Non-Generic Inner Functions","content_text":"Steve Klabnik recently wrote about whether out parameters are idiomatic in Rust. The post ends by showing a snippet of code: a generic function, with a non-generic function inside of it which contains the actual implementation. Steve says this pattern may warrant its own post, so here is that post, where I’ll explain why this inner function is useful, discuss the trade-offs of doing it, and describe why this pattern will hopefully not be necessary in the future.","url":"https://www.possiblerust.com/pattern/non-generic-inner-functions","date_published":"2020-10-21T22:48:08Z","author":{"name":"Andrew Lilley Brinker"},"tags":["Language"]},{"id":"71ce0cf6-05fc-4aca-9485-85ed2b8be1bc","title":"Rust after the honeymoon","content_text":"Two years ago, I had a blog entry describing falling in love with Rust. Of course, a relationship with a technology is like any other relationship: as novelty and infatuation wears off, it can get on a longer term (and often more realistic and subdued) footing — or it can begin to fray. So well one might ask: how is Rust after the honeymoon?","url":"http://dtrace.org/blogs/bmc/2020/10/11/rust-after-the-honeymoon/","date_published":"2020-10-12T09:55:52Z","author":{"name":"Bryan Cantrill"},"tags":["Language"]},{"id":"2954ca43-e797-43fb-b590-33933c969fbe","title":"Announcing Rust 1.47.0","content_text":"This release contains no new language features, though it does add one long-awaited standard library feature. It is mostly quality of life improvements, library stabilizations and const-ifications, and toolchain improvements. See the detailed release notes to learn about other changes not covered by this post.","url":"https://blog.rust-lang.org/2020/10/08/Rust-1.47.html","date_published":"2020-10-08T22:14:49Z","author":{"name":"The Rust Release Team"},"tags":["Language"]},{"id":"f74d7084-d61f-460d-be70-54947c2284c6","title":"Announcing the Portable SIMD Project Group","content_text":"We're announcing the start of the Portable SIMD Project Group within the Libs team. This group is dedicated to making a portable SIMD API available to stable Rust users.","url":"https://blog.rust-lang.org/inside-rust/2020/09/29/Portable-SIMD-PG.html","date_published":"2020-09-30T06:24:34Z","author":{"name":"Jubilee and Lokathor"},"tags":["Language","Operating Systems"]},{"id":"d236ea20-477c-4eaa-9549-e8ba5d50ad06","title":"Async Iteration Semantics","content_text":"In a recent lang team meeting we discussed the upcoming Stream RFC. We covered both the steps required to land it, and the steps we'd want to take after that. One of the things we'd want eventually for streams is: \"async iteration syntax\". Just like for x in y works for Iterator, we'd want something similar to work for Stream.","url":"https://blog.yoshuawuyts.com/async-iteration/","date_published":"2020-09-22T22:00:16Z","author":{"name":"Yoshua Wuyts"},"tags":["Language"]},{"id":"d88da501-4e4e-4b6c-b064-62e69e6b0aa4","title":"Call for 2021 Roadmap Blogs Ending Soon","content_text":"We will be closing the collection of blog posts on October 5th. As a reminder, we plan to close the survey on September 24th, later this week.","url":"https://blog.rust-lang.org/2020/09/21/Scheduling-2021-Roadmap.html","date_published":"2020-09-21T21:40:21Z","author":{"name":"The Rust Core Team"},"tags":["Language"]},{"id":"07d182e9-6e49-491a-b6ca-6d70bc9ac22a","title":"Throw Away Code","content_text":"There’s an ongoing discussion about what makes Python better prototyping language than Rust (with Python being probably just the archetype of some scripted weakly-typed language). The thing is, I prefer doing my prototypes in Rust over Python. Apparently, I’m not the only one. So I wanted to share few things about what makes Rust viable for these kinds of throw-away coding sprints, at least for me.\r\n","url":"https://vorner.github.io/2020/09/20/throw-away-code.html","date_published":"2020-09-21T00:29:34Z","author":{"name":"Michal Vaner"},"tags":["Language"]},{"id":"86e79ae7-04eb-4bea-afba-4459439c606b","title":"Planning the 2021 Roadmap","content_text":"The core team is beginning to think about the 2021 Roadmap, and we want to hear from the community. We’re going to be running two parallel efforts over the next several weeks: the 2020 Rust Survey, to be announced next week, and a call for blog posts.","url":"https://blog.rust-lang.org/2020/09/03/Planning-2021-Roadmap.html","date_published":"2020-09-04T00:48:46Z","author":{"name":"The Rust Core Team"},"tags":["Language","Rust 2021"]},{"id":"e75b99c2-87b7-42b6-b6b5-15e8c0afdf90","title":"Refactoring Rust Transpiled from C","content_text":"The C2Rust project shows that most C code can be converted into something that is technically Rust. That is not to say that we’ve exhausted all opportunities for automation; far from it. What we can do today is making syntactic changes. The structure of the program is preserved including the way memory is managed. Therefore, the Rust output is as unsafe as the input C. To take advantage of Rust’s type system, we must also make semantic changes so the code comports with Rust’s ownership-based model which is how we enforce memory safety.\r\n\r\nThis post explores how the current output of the C2Rust translator can be further hardened. Most blog posts on porting C code to Rust rely on human intelligence. The goal here is to explore the smallest set of changes we can make to get to safe Rust without a human in the loop. The idea is that the simpler the changes, the greater the odds that we can automate them.","url":"https://immunant.com/blog/2020/09/transpiled_c_safety/","date_published":"2020-09-02T10:14:06Z","author":{"name":"Per Larsen"},"tags":["Language"]},{"id":"931184e7-9939-44ef-94f7-07d77717c227","title":"Headcrab: August 2020 progress report","content_text":"We are working towards creating a modular, composable, and modern debugger library for Rust, and this month there has been a lot of exciting progress thanks to our supporters and contributors.\r\n\r\nWe have extended core functionality, implementing important debugger features such as stack unwinding (which is necessary for displaying backtraces), reading of local variables, and disassembly view.","url":"https://headcrab.rs/2020/08/31/august-update.html","date_published":"2020-09-02T10:12:37Z","author":{"name":"Headcrab"},"tags":["Language"]},{"id":"03084c56-40c9-4502-869d-e53e0a6e908a","title":"This Month in Mun - August 2020","content_text":"This month brings some big community and core team updates, paving the way for the release of all Mun crates - including the compiler - to crates.io.","url":"https://mun-lang.org/blog/2020/08/30/this-month-august/","date_published":"2020-09-02T10:08:03Z","author":{"name":"Mun Programming Language"},"tags":["Language"]},{"id":"ae893076-355b-459c-8403-10007797a55e","title":"Sudoku solver in idiomatic Rust","content_text":"While looking at applications of recursion, I stumbled across a video for solving sudokus using Python by Pr. Thorsten Altenkirch from the University of Nottingham (UK) . The elegant solution got me wondering what an idiomatic Rust implementation would look like. Here is what I came up with.","url":"https://vegapit.com/article/sudoku-solver-idiomatic-rust","date_published":"2020-08-31T10:29:54Z","author":{"name":"Vegapit"},"tags":["Language"]},{"id":"63ef0bf8-68d1-49a3-a6b0-c270240d6a5c","title":"Announcing Rust 1.46.0","content_text":"This release enables quite a lot of new things to appear in const fn, two new standard library APIs, and one feature useful for library authors.","url":"https://blog.rust-lang.org/2020/08/27/Rust-1.46.0.html","date_published":"2020-08-27T23:16:43Z","author":{"name":"The Rust Release Team"},"tags":["Language"]},{"id":"d3f0e9cb-dc14-4b19-8d69-a5933cc2e7c6","title":"Objective-Rust","content_text":"This is going to be another one of those posts where I did something ridiculous and then show you how I got there, so let’s just get right to it. Yep, Rust code with embedded Objective-C syntax, and it works. Why would you do such a thing? Maybe you want tighter interop between the Rust and Objective-C parts of your iOS app. Maybe you want to write your iOS app entirely in Rust. Or maybe you just wanted to see if it was possible after your colleague’s offhand remark.","url":"https://belkadan.com/blog/2020/08/Objective-Rust/","date_published":"2020-08-27T23:15:52Z","author":{"name":"Jordan Rose"},"tags":["Language"]},{"id":"7fc33219-240e-4cf5-8916-3eaac24a1714","title":"Fixing include_bytes!","content_text":"Rust's include_bytes! macro lets you statically include the contents of a file into your executable's binary. The builtin is a quick-and-dirty solution for packaging data with your executable, and perhaps even helping the compiler optimize your code!\r\n\r\nA few years ago, for coursework, I implemented a basic neural network for recognizing digits. Ever-obsessed with having the fastest implementation in the class, I statically included the learned network parameters it was wrong, and I got lucky.\r\n\r\nA Matrix<f64, U784, U10> has a minimum alignment of 8, but include_bytes! merely produces a reference to a byte array—with no care for alignment.\r\n\r\nHow can we ensure the included bytes are properly aligned?","url":"https://jack.wrenn.fyi/blog/include-transmute/","date_published":"2020-08-27T11:16:36Z","author":{"name":"Jack"},"tags":["Language"]},{"id":"7623458b-9004-432b-9063-49e80d2dc23b","title":"Different levels of async in Rust","content_text":"First there was cooperative multiprocessing. Then there were processes. An operating system could run multiple processes, each performing a series of sequential, blocking actions. Then came threads. A single processes could spawn off multiple threads, each performing its own series of sequential, blocking actions. (And really, the story starts earlier, with hardware interrupts and the like, but hopefully you'll forgive a little simplification.)\r\n\r\nSitting around and waiting for stuff? Ain't nobody got time for that. Spawning threads at the operating system level? That's too costly for a lot of what we do these days.\r\n\r\nPerhaps the first foray into asynchronous programming that really hit the mainstream was the Nginx web server, which boasted a huge increase in throughput by natively using asynchronous I/O system calls. Some programming languages, like Go, Erlang, and Haskell, built runtimes systems that support spawning cheap green threads, and handle the muck of asynchronous system calls for you under the surface. Other languages, such as Javascript and more recently Rust, provide explicit asynchronous support in the language.\r\n\r\nGiven how everyone seems to be bending over backwards to make it easy for you to make your code async-friendly, it would be fair to assume that all code at all times should be async. And it would also be fair to guess that, if you stick the word async on a function, it's completely asynchronous. Unfortunately, neither of these assumptions are true. This post is intended to dive into this topic, in Rust, using a simple bit of code for motivation.","url":"https://www.fpcomplete.com/blog/different-levels-async-rust/","date_published":"2020-08-25T11:06:16Z","author":{"name":"Michael Snoyman"},"tags":["Language"]},{"id":"06e93ba1-63e1-431e-a2bd-4a80e1b84891","title":"Writing a Test Case Generator for a Programming Language","content_text":"Maxime Chevalier-Boisvert requested resources for learning about fuzzing programming language implementations on Twitter: \r\n\r\n \r\n> I’d like to learn about fuzzing, specifically fuzzing programming language\r\n> implementations. Do you have reading materials you would recommend, blog\r\n> posts, papers, books or even recorded talks? \r\n \r\nMaxime received many replies linking to informative papers, blog posts, and lectures. John Regehr suggested writing a simple generative fuzzer for the programming language.","url":"http://fitzgeraldnick.com/2020/08/24/writing-a-test-case-generator.html","date_published":"2020-08-25T11:02:14Z","author":{"name":"Nick Fitzgerald"},"tags":["Language"]},{"id":"24195757-b669-448f-8d3a-f653c727e5dd","title":"Code Smell: Concrete Abstraction","content_text":"This is a hand-wavy philosophical article about programming, without quantifiable justification, but with some actionable advice and a case study.\r\n","url":"https://matklad.github.io//2020/08/15/concrete-abstraction.html","date_published":"2020-08-24T09:50:03Z","author":{"name":"Aleksey Kladov"},"tags":["Language"]},{"id":"d237d4eb-6da5-4019-b61e-0953c1add6b5","title":"Temporarily opt-in to shared mutation","content_text":"The purpose of this blog post is to celebrate the anniversary of two really neat methods\r\non the Cell type:\r\n\r\nCell::from_mut This method turns a &mut T into a &Cell<T>.\r\nCell::as_slice_of_cells This method turns a &Cell<[T]> into a &[Cell<T>].\r\n \r\nBoth methods were released in version 1.37.0 of Rust, exactly one year ago from the date this post was published.","url":"https://ryhl.io/blog/temporary-shared-mutation/","date_published":"2020-08-24T09:48:24Z","author":{"name":"Alice Ryhl"},"tags":["Language"]},{"id":"69582d03-1be8-4d2d-b61e-658e10278152","title":"The CXX Debate","content_text":"Let's talk about safe and unsafe in Rust.","url":"https://steveklabnik.com/writing/the-cxx-debate","date_published":"2020-08-24T09:38:21Z","author":{"name":"Steve Klabnik"},"tags":["Language"]},{"id":"21b48cc8-fccd-44f8-8f99-ea859792cde8","title":"The problem of safe FFI bindings in Rust","content_text":"Google has published a document on Rust and C++ interoperability in the context of Chromium. It describes their criteria for the experience of calling C++ from Rust — minimal use of unsafe, no boilerplate beyond existing C++ declarations, and broad support for existing Chromium types. \r\n\r\nThe response to this document has included a lot of confusion and misinformation. Really, this is a continuation of a larger ongoing discussion of how to use unsafe properly. Rust FFI and unsafe are complicated and often subtle topics, so here I am going to attempt to summarize the issues and suggest how we might address them.","url":"https://www.abubalay.com/blog/2020/08/22/safe-bindings-in-rust","date_published":"2020-08-24T09:35:22Z","author":{"name":"Russell Johnston"},"tags":["Language"]},{"id":"82fd8aa2-239b-46b8-997d-5af23dc41c68","title":"Understanding Rust slices","content_text":"Recently I was passing ownership of a Rust array to a C function from a Box<[T]> and found that I actually didn’t know whether my code would lead to a memory leak. This lead me down a rabbit hole to understand how exactly slices work in Rust.","url":"https://codecrash.me/understanding-rust-slices","date_published":"2020-08-24T09:30:33Z","author":{"name":"Leon"},"tags":["Language"]},{"id":"12421292-4ff1-4857-80d5-31c80bf386d8","title":"\"Rust does not have a stable ABI\"","content_text":"I've seen GNOME people (often, people who have been working for a long time on C libraries) express concerns along the following lines:\r\n\r\n1. Compiled Rust code doesn't have a stable ABI (application binary interface).\r\n2. So, we can't have shared libraries in the traditional fashion of Linux distributions.\r\n3. Also Rust bundles its entire standard library with every binary it compiles, which makes Rust-built libraries huge.\r\n\r\nThese are extremely valid concerns to be addressed by people like myself who propose that chunks of infrastructural libraries should be done in Rust.\r\n\r\nSo, let's begin.","url":"https://people.gnome.org/~federico/blog/rust-stable-abi.html","date_published":"2020-08-24T09:28:52Z","author":{"name":"Federico Mena Quintero"},"tags":["Language"]},{"id":"b3575d5b-86ac-4e2b-ab1b-bf2d839adbff","title":"Webassembly Without The Browser Part 1","content_text":"Most WebAssembly tutorials and examples you will find online focus on using it inside the browser in order to accelerate various functionality of a website or web app. However, there is an area where WebAssembly is really powerful but not talked too much about: outside the browser usage scenarios. That is what we’ll focus on in this series of posts.","url":"https://alexene.dev/2020/08/17/webassembly-without-the-browser-part-1.html","date_published":"2020-08-20T10:13:06Z","author":{"name":"Alexandru Ene"},"tags":["Language"]},{"id":"f3704ab4-bbe3-4597-807d-0d255043b58c","title":"Rust and C++ interoperability","content_text":"Chrome engineers are experimenting with Rust. For the foreseeable future, C++ is the reigning monarch in our codebase, and any use of Rust will need to fit in with C++ — not the other way around. This seems to present some C++/Rust interoperability challenges which nobody else has faced.\r\n\r\nWe'd need to solve these before considering Rust as (nearly) a first-class citizen in our codebase. If we can’t solve these, Rust would at best be isolated to “leaf nodes” which don’t interact much with the rest of our codebase. And if that’s all we can use Rust for, that calls into question whether the costs of an extra language are justified in the first place.","url":"https://www.chromium.org/Home/chromium-security/memory-safety/rust-and-c-interoperability","date_published":"2020-08-20T10:05:47Z","author":{"name":"The Chromium Project"},"tags":["Language"]},{"id":"e3260b57-b747-4857-99a6-a1dd81e044c3","title":"Laying the foundation for Rust's future","content_text":"The Rust project was originally conceived in 2010 (depending on how you count, you might even say 2006!) as a Mozilla Research project, but the long term goal has always been to establish Rust as a self-sustaining project. In 2015, with the launch of Rust 1.0, Rust established its project direction and governance independent of the Mozilla organization. Since then, Rust has been operating as an autonomous organization, with Mozilla being a prominent and consistent financial and legal sponsor.\r\n\r\nMozilla was, and continues to be, excited by the opportunity for the Rust language to be widely used, and supported, by many companies throughout the industry. Today, many companies, both large and small, are using Rust in more diverse and more significant ways, from Amazon’s Firecracker, to Fastly’s Lucet, to critical services that power Discord, Cloudflare, Figma, 1Password, and many, many more.\r\n\r\nOn Tuesday, August 11th 2020, Mozilla announced their decision to restructure the company and to lay off around 250 people, including folks who are active members of the Rust project and the Rust community. Understandably, these layoffs have generated a lot of uncertainty and confusion about the impact on the Rust project itself. Our goal in this post is to address those concerns. We’ve also got a big announcement to make, so read on!","url":"https://blog.rust-lang.org/2020/08/18/laying-the-foundation-for-rusts-future.html","date_published":"2020-08-18T22:04:15Z","author":{"name":"The Rust Core Team"},"tags":["Language"]},{"id":"d4a95988-62b4-4392-89a1-6a40ebbd3f30","title":"Why Rust's Unsafe Works","content_text":"I want to outline why Rust's unsafe keyword works, while similar measures in C/C++ don't.","url":"https://jam1.re/blog/why-rusts-unsafe-works","date_published":"2020-08-18T10:38:28Z","author":{"name":"jam1garner"},"tags":["Language"]},{"id":"f775c77e-67f0-4410-a2a9-c849301c1178","title":"Frustrated? It's not you, it's Rust","content_text":"Learning Rust is... an experience. An emotional journey. I've rarely been more frustrated than in my first few months of trying to learn Rust.\r\n\r\nWhat makes it worse is that it doesn't matter how much prior experience you have, in Java, C#, C or C++ or otherwise - it'll still be unnerving.\r\n\r\nIn fact, more experience probably makes it worse! The habits have settled in deeper, and there's a certain expectation that, by now, you should be able to get that done in a shorter amount of time.\r\n\r\nMaybe, after years of successfully shipping code, you don't have quite the same curiosity, the same candor and willingness to feel \"lost\" that you did back when you started.\r\n\r\nLearning Rust makes you feel like a beginner again - why is this so hard? This doesn't feel like it should be that hard. I've done similar things before. I know what I want. Now I just need to... make it happen.\r\n\r\nI'm going to keep including introductions like these in all my beginner-level articles, because they're very important: if you're picking up Rust, expect roadblocks.","url":"https://fasterthanli.me/articles/frustrated-its-not-you-its-rust","date_published":"2020-08-18T10:29:34Z","author":{"name":"Amos"},"tags":["Language"]},{"id":"87d0a317-5d3d-41be-8853-ea1e6031e1aa","title":"What’s the difference between a Rust char and a Go rune?","content_text":"Rust and Go have similar ways of dealing with UTF-8 encoded text. Rust gives you the .chars() method on strings, which returns a sequence of chars (no surprise). Go on the other hand gives you []rune(str), which returns a slice of runes. What’s the difference between these two things?\r\n\r\nThe answer is that a char is a Unicode Scalar Value, whereas a rune is a Unicode Code Point. That is… not very helpful. What’s the difference between those things?\r\n\r\nA crappy but correct answer to this question is “a unicode scalar value is any unicode code point except high surrogate and low surrogate code points”. Ugh. You need a fair bit of context to understand this, so I will do my best to explain it from the beginning.","url":"https://www.christianfscott.com/rust-chars-vs-go-runes/","date_published":"2020-08-13T09:54:15Z","author":{"name":"Christian Scott"},"tags":["Language"]},{"id":"904e6ae4-68cf-4113-87c8-dbc340dfccfe","title":"Five years of Rust - a full-stack programming language for the next decade(s)","content_text":"To celebrate the five years of the Rust programming language, this blog post is the second of a series where I explain why I think Rust will be the programming language for the next decade(s), and why you should learn and use it too! In the first blog post, we have seen why Rust is truly cross-platform. In this post, we’ll explore the range of application domains where Rust can be used to build software. Or rather, we’ll only scratch the tip of the iceberg, given that Rust is growing in so many domains!\r\n\r\nWhether Rust is a full-stack programming language is still a hot debate, my opinion is that it is, and I hope that this blog post will convince you as well!\r\n\r\nAfter that, I’ll conclude this series of posts with some perspectives on the Rust ecosystem, and Rust’s upcoming role in the job market.","url":"https://gendignoux.com/blog/2020/06/16/rust-5-years-full-stack.html","date_published":"2020-08-13T09:47:14Z","author":{"name":"Guillaume Endignoux"},"tags":["Language"]},{"id":"3bcd7f77-2bb8-4e73-b578-785a4a1c33b3","title":"Who Builds the Builder?","content_text":"This is a short note on the builder pattern, or, rather, on the builder method pattern.","url":"https://matklad.github.io//2020/08/12/who-builds-the-builder.html","date_published":"2020-08-13T09:45:54Z","author":{"name":"Aleksey Kladov"},"tags":["Language"]},{"id":"5fd8fef3-b672-429a-9ce0-7d073f24ef46","title":"Property-based testing in Rust with Proptest","content_text":"Software testing is an industry-standard practice, but testing methodologies and techniques vary dramatically in their practicality and effectiveness.\r\n\r\nToday you’ll learn about property-based testing (PBT), including how it works, when it makes sense, and how to do it in Rust.","url":"https://blog.logrocket.com/property-based-testing-in-rust-with-proptest/","date_published":"2020-08-12T09:35:40Z","author":{"name":"Zach Mitchell"},"tags":["Language"]},{"id":"74e96b4b-6a79-4a17-a20b-df2726867e23","title":"Five years of Rust - a cross-platform programming language for the next decade(s)","content_text":"Last month, the Rust programming language celebrated its 5th anniversary. I’ve joined this journey roughly halfway through, and since then I had the opportunity to work on various Rust projects, but also to witness many improvements in the language, as well as in Rust libraries. Given what’s already possible to do in Rust today and this trajectory of improvements, I think that Rust will continue to grow into a cross-platform and full-stack programming language of choice for the next decade (at least).\r\n\r\nTherefore, to celebrate these five years, I’ve decided to write a series of blog posts explaining why I think Rust is a language of choice, and where to find relevant resources to use Rust across platforms and along the software stack. In this first post of the series, after a brief summary of what is Rust and why it’s relevant, I’ll go through the various platforms where Rust can already be used. And Rust already supports so many platforms that I’m sure I’ll forget some!","url":"https://gendignoux.com/blog/2020/06/16/rust-5-years-cross-platform.html","date_published":"2020-08-12T09:34:38Z","author":{"name":"Guillaume Endignoux"},"tags":["Language"]},{"id":"2892657e-0a2a-4cf5-ad98-fab62d8bb715","title":"Implementing the .NET Profiling API in Rust","content_text":"Here is a simple .NET profiler implemented in Rust that prints the name of a function just before it is JIT compiled. The client library must create a type that implements all of the CorProfilerCallback traits. All of the methods in the callback traits have default implementations, so you only need to implement the methods that you actually want to use. COM boilerplate is set up for you behind the scenes with the register! macro call at the end of the code snippet.","url":"https://code.camdenreslink.com/dev/implementing-the-dot-net-profiling-api-in-rust/","date_published":"2020-08-12T09:27:02Z","author":{"name":"Camden"},"tags":["Language"]},{"id":"8109beb6-1e4b-495a-9060-f71ea72f03ee","title":"A Tour of Seq's Storage Engine","content_text":"This post is the first in a series on Seq’s storage engine. It’s a technical dive meant to share some of the more interesting aspects of its design and implementation.\r\n\r\nSeq is a log server with its own embedded storage engine for log events written (mostly) in Rust. We call this storage engine Flare. We’ve written a bit about our experiences with Rust in the past, but we’ve been wanting to dive into the design of Flare itself since we first shipped it in August of 2018.\r\n\r\nTo get a sense of what Flare is all about we’ll first introduce its broad design and then explore some of its components. We’ll do this by tracing the ingestion of an event through Seq’s HTTP API through to disk, and then later back from disk via a query, and finally deleting the event entirely. This post is a long and tangential tour of the design and implementation of the database to provide context for deeper dives into specific components in future posts.","url":"https://blog.datalust.co/a-tour-of-seqs-storage-engine/","date_published":"2020-08-12T09:25:35Z","author":{"name":"Ashley Mannix"},"tags":["Language"]},{"id":"8531ae0c-a4c5-48ec-abf7-e9e362c6c24d","title":"Implementing a Type-safe printf in Rust","content_text":"I show how to use heterogeneous lists and traits to implement a type-safe printf in Rust. These mechanisms can ensure that two variadic argument lists share important properties, like the number of format string holes matches the number of printf arguments.","url":"https://willcrichton.net/notes/type-safe-printf/","date_published":"2020-08-11T10:57:45Z","author":{"name":"Will Crichton"},"tags":["Language"]},{"id":"c89b304b-4c2f-43e3-8cf6-cce4d681bea4","title":"Rust Lints You May Not Know","content_text":"The Rust compiler ships with a number of useful lints on by default, and many use Clippy to provide additional lints. It’s less well known that the Rust compiler ships with some useful lints which are set to allow by default, meaning they don’t generate warnings. In this post, I’ll explain what each of these lints does, and why it might be useful.","url":"https://www.possiblerust.com/pattern/rust-lints-you-may-not-know","date_published":"2020-08-11T10:55:50Z","author":{"name":"Andrew Lilley Brinker"},"tags":["Language"]},{"id":"595082c1-445c-4392-a242-6d104ae8d514","title":"Building Chekov - Part 1: Design the EventStore","content_text":"CQRS/ES have been trending topics for some times now and there are some pretty nice libraries out there to build application following these patterns. But I found myself missing some of those tools to build Rust applications for a while so I decided to try to fulfil this gap by implementing it myself.\r\n\r\nIn this blog series I will cover my way of building an OpenSource framework called Chekov. I will try to describe how I design and implement the whole thing. I will start from scratch, I will fail sometimes, but I will learn a lot and you too. I will try to cover as much part of the reflexion I have, feel free to ask for more details on Twitter or at the end of each blog post.","url":"https://freyskeyd.fr/posts/building-chekov-part-1-design-the-eventstore/","date_published":"2020-08-11T10:48:38Z","author":{"name":"Simon Paitrault"},"tags":["Language"]},{"id":"78320bf3-9a53-4ea7-a0d9-7c10034373ce","title":"Scaling Debuginfo For Zero-Cost Abstractions","content_text":"In yesterday's post I raised the issue that Rust and C++ promise zero-cost abstractions, but with the standard build configurations people use today, you have to choose between \"zero-cost abstractions\" and \"fast and debuggable builds\". Reflecting on this a bit more, I realized that the DWARF debuginfo format used with ELF binaries inherently conflicts with the goal of having both zero-cost abstractions and fast debuggable builds, because of the way it handles inline functions (and possibly for other reasons).","url":"https://robert.ocallahan.org/2020/08/scaling-debuginfo-for-zero-cost.html","date_published":"2020-08-11T10:39:22Z","author":{"name":"Robert O'Callahan"},"tags":["Language"]},{"id":"b73a7049-39a2-47c8-aa3e-a9bc97fd5756","title":"7 Things I Learned From Porting a C Crypto Library to Rust","content_text":"Rust has always been the programming language that reminds me the most of my game hacking days, and for good reasons. Rust is a natural fit for embedded systems like video game consoles – or rather emulators thereof. The compiler supports a high number of platforms and lets you drop down to C or assembly if necessary. Plus, the language lends itself well to implementing (reverse-engineered) cryptographic algorithms and other low-level shenanigans. \r\n\r\nGiven these benefits, it’s no surprise that I keep coming back to Rust. This time, I decided to revisit a pull request from five years ago, which has been lingering in my mind ever since. The ambiguous goal of the pull request is to port cb2util, one of my old crypto tools for PlayStation 2, from C to pure Rust.","url":"https://sharpend.io/7-things-i-learned-from-porting-a-c-crypto-library-to-rust/","date_published":"2020-08-10T10:38:30Z","author":{"name":"Mathias Lafeldt"},"tags":["Language","Security"]},{"id":"352f34cd-f354-4504-ae3c-1112504eaaf0","title":"Surviving Rust async interfaces","content_text":"I used to be afraid of async Rust. It's easy to get into trouble!\r\n\r\nBut thanks to the work done by the whole community, async Rust is getting easier to use every week. One project I think is doing particularly great work in this area is async-std.","url":"https://fasterthanli.me/articles/surviving-rust-async-interfaces","date_published":"2020-08-10T10:29:11Z","author":{"name":"Amos"},"tags":["Crates","Language"]},{"id":"0cddc991-71f1-472b-80ef-844fb73d6a40","title":"A Guide to Contiguous Data in Rust","content_text":"Many modern languages have collections called \"array,\" \"slice,\" or \"vector.\" Rust has all three, plus many third-party libraries! This is an opinionated guide that tries to help you choose the best way to store contiguous data in Rust. It covers tools from Rust's core and standard library as well as third-party crates that meet more specific needs.\r\n\r\nContiguous data is when multiple pieces of data are stored next to each other in memory. It is often a great way to store collections, because it can provide great cache locality and branch prediction.","url":"https://github.com/paulkernfeld/contiguous-data-in-rust","date_published":"2020-08-10T10:22:28Z","author":{"name":"Paul Kernfeld"},"tags":["Language"]},{"id":"cbedfe4d-5a19-479a-99e1-560047882aa6","title":"Cloning yourself - a refactoring for thread-spawning Rust types","content_text":"I recently discovered for myself a very nice Rust refactoring (or pattern?) which produced a very significant simplification in some code I am working on.\r\n\r\nI would like to share it with you. I’d say this is an intermediate-level article, since the Rust compiler won’t lead you towards this design, good as its error messages are.","url":"https://www.philipdaniels.com/blog/2020/self-cloning-for-multiple-threads-in-rust/","date_published":"2020-08-08T10:25:39Z","author":{"name":"Philip Daniels"},"tags":["Language"]},{"id":"3218a357-048d-421b-b4c0-6a4693cd9d6a","title":"Two easy ways to test async functions in Rust","content_text":"One reason to like the Rust ecosystem is testing. No test runners need to be installed, no reading up on 10 variations of unit testing frameworks, no compatibiltity issues…\r\n\r\n… or are there? Rust has recently started supporting full async/await abilities after years of development and it looks like there is a missing piece there: tests. How so?","url":"https://blog.x5ff.xyz/blog/async-tests-tokio-rust/","date_published":"2020-08-08T10:23:29Z","author":{"name":"Claus"},"tags":["Language"]},{"id":"2663e6dd-7afd-42a2-a1bf-f3eea61f9884","title":"Inbound & Outbound FFI","content_text":"Foreign Function Interfaces (FFI) are a core mechanism for enabling integration of new languages into existing codebases or building on existing libraries. That said, the term “FFI” is often overloaded in ways that may be unclear or ambiguous, and the area can seem overwhelming to approach. In this post, I explain the two “directions” of FFI, some patterns for how FFI in each direction is handled in Rust and further break down some FFI design approaches.","url":"https://www.possiblerust.com/guide/inbound-outbound-ffi","date_published":"2020-08-08T10:16:34Z","author":{"name":"Andrew Lilley Brinker"},"tags":["Language"]},{"id":"aebfc319-de3c-4a45-9cf7-9b02ca561d20","title":"Graceful keyboard shutdown of thread pool in Rust","content_text":"While writing a Discord bot using serenity-rs I wanted to create a thread pool to properly process events coming from Discord. When I ran this code I’ve expected everything working properly - that I should see “Worker loop done”, “dropped worker pool thread” and “Good bye!” messages. Unfortunately, this is not the case.","url":"https://killavus.github.io/posts/thread-pool-graceful-shutdown/","date_published":"2020-08-08T10:10:47Z","author":{"name":"Marcin Grzywaczewski"},"tags":["Language"]},{"id":"27112569-1a6a-4ea1-bb2a-45f7dadf5de6","title":"Allocation API, allocators and virtual memory","content_text":"I like to look at standard libraries of programming languages! It feels like being in a candy store: there are so many interesting functions and nice tools one can use! Some of them may feel useless at a particular moment, but may come handy later to save on some typing, to avoid reinventing the wheel, or even to guide a design choice.\r\n\r\nIn Rust, standard library documentation is extremely readable and even has a section \"How to read this documentation\" for people like me. Let me quote from it: \"If this is your first time, the documentation for the standard library is written to be casually perused. Clicking on interesting things should generally lead you to interesting places.\"\r\n\r\nSo, I started reading and here we go. The very first module in the documentation is: alloc.","url":"https://notes.iveselov.info/programming/allocation-api-and-allocators","date_published":"2020-08-08T10:07:02Z","author":{"name":"Ivan Veselov"},"tags":["Language"]},{"id":"73558f62-b55e-4b75-a47c-999ed72740de","title":"First Impressions of Rust","content_text":"I've been wanting to write a big project in Rust for a while as a learning exercise, and actually started one in late 2018 (a FUSE server implementation). But then life happened and I got busy and never went anywhere with it. Due to certain world circumstances I'm currently spending a lot of time indoors so rust-fuse (docs) now exists and is good enough to write basic hello-world filesystems. I plan to polish it up a bit more with the goal of releasing a v1.0 that supports the same use cases as libfuse. \r\n I took some notes along the way about things that struck me as especially good or bad. Overall I quite like Rust the language, have mixed feelings about the quality of ancillary tooling, and have strong objections to some decisions made by the packaging system (Cargo + crates.io).","url":"https://john-millikin.com/first-impressions-of-rust","date_published":"2020-08-07T00:47:47Z","author":{"name":"John Millikin"},"tags":["Language"]},{"id":"538f2223-3f96-4ff7-a7cf-c67760da52fd","title":"Building Canrun: A statically typed logic programming library for Rust (part 1)","content_text":"Canrun is a new logic programming library for Rust with static types and constraints.\r\n\r\nIn my initial post I mentioned going through a few fundamental revisions before settling on the current approach. Here I'll try to do a quick recap for two reasons: 1) I think it's neat, and 2) with luck I'll snag the attention of someone with deeper experience and a willingness to share some tips.\r\n\r\nMy first successful attempt was actually based on an article by Tom Stuart titled \"Hello, declarative world\", which described a way to implement μKanren in Ruby. I recommend reading that if you find yourself confused about any of the \"why\" I gloss over here.","url":"https://esimmler.com/building-canrun-part-1/","date_published":"2020-08-06T10:19:35Z","author":{"name":"Erik Simmler"},"tags":["Language"]},{"id":"4c05c438-5778-45bd-82f3-4259a34a533e","title":"Hunting down a non-determinism-bug in our Rust Wasm build","content_text":"We recently learned that the WebAssembly build in our system isn't deterministic any longer. This is a short summary of what we did to chase down the bug in the hope that this helps others facing similar issues, give some help and guidance on what to try or how this kind of thing works.","url":"https://dev.to/gnunicorn/hunting-down-a-non-determinism-bug-in-our-rust-wasm-build-4fk1","date_published":"2020-08-06T10:14:03Z","author":{"name":"Benjamin Kampmann"},"tags":["Language"]},{"id":"377afeba-3051-44eb-8e7a-1d907856f968","title":"I Rewrote The C Donut In Rust","content_text":"You know that cool donut written in C that made a donut when ran? You know, that one? I decided to have some fun and rewrote it all in Rust!","url":"https://www.reddit.com/r/rust/comments/hzkgep/i_rewrote_the_c_donut_in_rust/","date_published":"2020-08-06T10:12:49Z","author":{"name":"Dan Conleh"},"tags":["Language"]},{"id":"6fa1befb-5f61-464d-8887-95f8ae322cf4","title":"Writing a simple query system in Rust","content_text":"What I mean by query system here is a pattern for requesting and computing data in a program in on-demand way. The data don’t need to be computed ahead of time at the start of the program, but only when they are actually needed. In this post, I will walk you through a solution to this approach I came up with in Rust, which happened to be a good fit in one of my projects. If not yet, you will eventually be able to implement your own, tailored to your needs.","url":"https://pnevyk.github.io/posts/query-system-in-rust/","date_published":"2020-08-05T10:14:57Z","author":{"name":"Petr Nevyhoštěný"},"tags":["Language"]},{"id":"ff2ff756-d63b-419d-86af-168e3c132017","title":"A Heaping Helping of Stacks","content_text":"We recently landed support for Windows in Krustlet. Although the final PR was relatively small, there was a lot of learning behind it. While adding this support, we came across an oddity that forced us to learn a whole bunch about stack vs heap allocation in Rust and figured it would be good to share with the world. As with most learning opportunities, this one starts with a story.","url":"https://deislabs.io/posts/a-heaping-helping-of-stacks/","date_published":"2020-08-05T10:12:31Z","author":{"name":"Taylor Thomas"},"tags":["Language"]},{"id":"57db6da3-5230-4b7f-ab09-1bc6b251f9a1","title":"My Rust experiences over a year","content_text":"I had a whole lot of fun with the Typeracer post I made showing how the program itself had changed throughout its lifetime.\r\n\r\nWhat I didn’t mention (although is fairly obvious if you look at the code) is that Typeracer was my first real exposure to Rust.\r\n\r\nI went through a bit of the rust book and wrote a tiny compression tool that did a sort of run length encoding algorithm, but both of them were super simple and I really wanted something I could work on for longer to understand the language.\r\n\r\nWorking on the two I almost never interacted with the borrow checker. I had no idea what I was getting myself into. But there had to be a reason for uh, super vocal subreddits about rust, so I figured it was time to see what all the hype was about.","url":"https://blog.darrien.dev/posts/my-rust-experiences/","date_published":"2020-08-05T10:11:28Z","author":{"name":"Darrien"},"tags":["Language"]},{"id":"0f8978d6-db73-4c25-aeb7-c13aa10d23b3","title":"How to use the Rust compiler as your integration testing framework","content_text":"When I started developing in Rust 2.5 years ago, I was fascinated by how often my program would just work once it compiled. The Rust compiler is known for being a bit pedantic, which can be quite frustrating in the beginning. Over time, though, I actually learned to love this aspect. These days, I often find myself deliberately thinking about how I can use Rust’s type system in clever ways that allow me to catch or prevent bugs early on in the development cycle.\r\n\r\nIn this guide, I’ll share some of the knowledge I’ve built up on this topic and present some techniques to make integration testing almost redundant. Ultimately, the question is: Could “It compiles, let’s ship it!” actually be true for Rust?","url":"https://blog.logrocket.com/using-the-rust-compiler-as-your-integration-testing-framework/","date_published":"2020-08-05T10:06:19Z","author":{"name":"Thomas Eizinger"},"tags":["Language"]},{"id":"cb8a62a3-3fe8-4d96-91d5-2d9f47949d6a","title":"Building a Brainf*ck Compiler with Rust and LLVM","content_text":"LLVM is a collection of compiler toolchain technologies used to compile dynamic and static programming languages. It’s heavly used in programming languages, such as Clang, Emscripten, and Rust!\r\n\r\nThis tutorial is going to go over how to create a simple compiler using LLVM for Brainf*ck in Rust. The completed code can be found here: brainfrick-rust","url":"http://benkonz.github.io//building-a-brainfuck-compiler-with-rust-and-llvm/","date_published":"2020-08-05T10:02:34Z","author":{"name":"Ben Konz"},"tags":["Language"]},{"id":"ad2699b9-b23f-464f-9152-385848a11518","title":"A gentle intro to assembly with Rust","content_text":"One of the things I’ve wanted to do for a while is really dig into assembly and get into the weeds of how programs actually run. A rework of the asm macro has recently landed in nightly rust so it seemed like a good time.\r\n\r\nAnd compared to some other ways I’ve tried to approach this there’s a lot less setup we need to do if we just use the rust playground to do all the heavy lifting.\r\n\r\nMy process for figuring things out has been pretty simple. I write a tiny bit of rust code, look at the assembly output and try to figure out what’s going on (with lots of googling). I’m going to walk you through what I did, and what I figured out.","url":"https://lfn3.net/2020/08/03/a-gentle-intro-to-assembly-with-rust/","date_published":"2020-08-05T09:59:02Z","author":{"name":"Liam"},"tags":["Language"]},{"id":"7c2867a5-f2e0-4d27-ab5c-7428fcd32a33","title":"Writing Hamlet with evolutionary algorithms","content_text":"I discovered evolutionary algorithms in my teens and was fascinated. After a bit of research, I somehow managed to hack together a neural network in GameMaker, attach it to the brains of a virtual car and watch it crash into walls.\r\n\r\nI’ll use Rust for my examples, but follow along in any language you like! It’s said that if you put a monkey in front of a typewriter, given enough time it will produce the complete works of Shakespeare. We haven’t infinite time (or easy access to monkeys!), so let’s try something simpler, reproducing just this fragment from Hamlet:\r\n\r\nconst HAMLET: &str = \"To be, or not to be--that is the question\";\r\n","url":"https://blog.ael.red/2020/08/02/evolutionary-algorithms.html","date_published":"2020-08-05T09:56:55Z","author":{"name":"Felix Chapman"},"tags":["Language"]},{"id":"0e43f8e7-16d0-4226-a3b0-58e84d1aa253","title":"Go vs Rust: Writing a CLI tool","content_text":"This text is about my adventure writing a small CLI application (twice) using two languages I had little experience with.","url":"https://cuchi.me/posts/go-vs-rust","date_published":"2020-08-04T09:49:58Z","author":{"name":"Paulo Henrique Cuchi"},"tags":["Language"]},{"id":"a3268b22-019c-4e83-b00a-8048c05a3c63","title":"Announcing Rust 1.45.2","content_text":"1.45.2 contains two fixes, one to 1.45.1 and the other to 1.45.0.","url":"https://blog.rust-lang.org/2020/08/03/Rust-1.45.2.html","date_published":"2020-08-03T22:31:59Z","author":{"name":"The Rust Release Team"},"tags":["Language"]},{"id":"bfe8b996-2fbf-4e2c-942a-547e59f2959c","title":"Blue Team Rust: What is \"Memory Safety\", really?","content_text":"Rust, as a compiled language without garbage collection, supports what have traditionally been C/C++ domains. This includes everything from high-performance distributed systems to microcontroller firmware. Rust offers an alternative set of paradigms, namely ownership and lifetimes. If you've never tried Rust, imagine pair programming alongside a nearly-omniscient but narrowly-focused perfectionist. That's what the borrow checker, a compiler component implementing the ownership concept, can sometimes feel like. In exchange for the associated learning curve, we get memory safety guarantees.\r\n\r\nLike many in the security community, I've been drawn to Rust by the glittering promise of a safe alternative. But what does \"safe\" actually mean on a technical level? Is the draw one of moths to flame, or does Rust fundamentally change the game?\r\n\r\nThis post is my attempt to answer these questions, based on what I've learned so far. Memory safety is a topic knee-deep in operating system and computer architecture concepts, so I have to assume formidable prior systems security knowledge to keep this post short-ish. Whether you're already using Rust or are just flirting with the idea, hope you find it useful!","url":"https://tiemoko.com/blog/blue-team-rust/","date_published":"2020-08-03T09:40:36Z","author":{"name":"Tiemoko Ballo"},"tags":["Language"]},{"id":"d7a475b2-3491-4ebe-b3a0-2014bc0968a1","title":"Announcing Rust 1.45.1","content_text":"1.45.1 contains a collection of fixes, including one soundness fix. All patches in 1.45.1 address bugs that affect only the 1.45.0 release; prior releases are not affected by the bugs fixed in this release.","url":"https://blog.rust-lang.org/2020/07/30/Rust-1.45.1.html","date_published":"2020-08-03T09:38:06Z","author":{"name":"The Rust Release Team"},"tags":["Language"]},{"id":"e2adc251-bd52-48f4-85e8-5442e6204ec8","title":"Some Learnings from Implementing a Normalizing Rust Representer","content_text":"I’ve been helping out and contributing to exercism.io for the past few months. As an open source platform for learning programming languages that supports Rust, Exercism aligns very well with all the things I’m currently passionate about: open source, teaching, and Rust.\r\n\r\nOne of the most challenging hurdles the Exercism platform faces is the fact that students who opt in to receive mentor feedback on their work have to wait for a live person to get around to reviewing their submission. Decreasing wait times for students is thus an important metric to optimize for in order to improve the overall student experience on the platform.\r\n\r\nIn this post I’ll be talking about a project I’ve been working on that aims to address this problem. I’ll also be discussing the learnings I’ve been taking away from working on this project, as it’s my first non-toy Rust project that I’ve undertaken.","url":"https://seanchen1991.github.io/posts/rust-representer/","date_published":"2020-07-29T10:03:19Z","author":{"name":"Sean Chen"},"tags":["Language"]},{"id":"d14cd33b-6af1-42e5-b3c1-8c8262208a12","title":"From C# to Rust: Introduction","content_text":"Rust has been the most loved programming language for the last 5 years. This, and many other factors, made me interested in learning more about Rust, especially from the perspective of a C#-developer.","url":"https://sebnilsson.com/blog/from-csharp-to-rust-introduction/","date_published":"2020-07-29T09:37:25Z","author":{"name":"Seb Nilsson"},"tags":["Language"]},{"id":"1736a344-41dd-497b-8414-3bc814c53975","title":"Opening up the Core Team agenda","content_text":"The Rust Core Team is happy to announce that we're opening up the agenda of our weekly triage meetings!\r\n","url":"https://blog.rust-lang.org/inside-rust/2020/07/27/opening-up-the-core-team-agenda.html","date_published":"2020-07-28T23:27:05Z","author":{"name":"Pietro Albini"},"tags":["Language"]},{"id":"60d63315-594d-42a2-a667-532813faaae3","title":"1.45.1 prerelease testing","content_text":"The 1.45.1 pre-release is ready for testing. The release is scheduled for this\r\nThursday, the 30th.","url":"https://blog.rust-lang.org/inside-rust/2020/07/27/1.45.1-prerelease.html","date_published":"2020-07-28T23:26:18Z","author":{"name":"Mark Rousskov"},"tags":["Language"]},{"id":"ecadb645-ef6c-42cb-858f-f9688e79a1be","title":"Rust at FP Complete, 2020 update","content_text":"At FP Complete, we have long spoken about the three pillars of a software development language: productivity, robustness, and performance. Often times, these three pillars are in conflict with each other, or at least appear to be. Getting to market quickly (productivity) often involves skimping on quality assurance (robustness), or writing inefficient code (performance). Or you can write simple code which is easy to test and validate (productivity and robustness), but end up with a slow algorithm (performance). Optimizing the code takes time and may introduce new bugs.\r\n\r\nFor the entire history of our company, our contention has been that while some level of trade-off here is inevitable, we can leverage better tools, languages, and methodologies to improve our standing on all of these pillars. We initially focused on Haskell, a functional programming language that uses a strong type system and offers decent performance. We still love and continue to use Haskell. However, realizing that code was only half the battle, we then began adopting DevOps methodologies and tools.\r\n\r\nIn this post, I wanted to share some thoughts on why we're thrilled to see Rust's adoption in industry, what we're using Rust for at FP Complete, and give some advice to interested companies in how they can begin adopting this language.","url":"https://www.fpcomplete.com/insights/rust-at-fpco-2020/","date_published":"2020-07-27T09:42:43Z","author":{"name":"Michael Snoyman"},"tags":["Language"]},{"id":"4ff07e4a-b171-48d3-a455-a5f3a05c5135","title":"My Bet on Rust has been Vindicated","content_text":"As a side project, I’m writing an Europa Universalis IV (EU4) leaderboard and in-browser save file analyzer called Rakaly. No need to be familiar with the game or the app, but feel free to check Rakaly out if you want, we’re just getting started.\r\n\r\nI’m writing this post as whenever Rust is posted on the internet, it tends to elicit polar opposite responses: the evangelists and the disillusioned. Both can be correct in their viewpoints, but when one is neck deep in a Rust side project and stumbles across a discussion that is particularly critical of Rust, self doubt may creep into thoughts. And while self doubt isn’t inherently bad (second guessing can be beneficial), too much doubt can cause one to disengage with their hobby. This post is me sharing struggles seen along the way and realizing that the wins Rust gave me far outweigh the struggles.","url":"https://nbsoftsolutions.com/blog/my-bet-on-rust-has-been-vindicated.html","date_published":"2020-07-27T09:37:25Z","author":{"name":"Nick Babcock"},"tags":["Language"]},{"id":"a2e4cdc4-06ad-4e3c-8638-7b8f4a6622b4","title":"(A Few) Advanced Variable Types in Rust","content_text":"Get a firm grasp of each of these smart pointers and other advanced variables in Rust: Box, Cell, RefCell, Rc, Arc, RwLock, Mutex, OnceCell (and there are others!)","url":"https://rust.graystorm.com/2020/07/20/a-few-advanced-variable-types-in-rust/","date_published":"2020-07-25T10:15:36Z","author":{"name":"Jeff Culverhouse"},"tags":["Language"]},{"id":"40f8b560-5dcf-4ac5-8b06-8c32daba2f4a","title":"Checking status of Rust features","content_text":"Sometimes I want to quickly tell whether a particular feature in Rust is supported and if so, to what extent?","url":"https://notes.iveselov.info/programming/checking-status-of-rust-features","date_published":"2020-07-25T10:11:39Z","author":{"name":"Ivan Veselov"},"tags":["Language"]},{"id":"9dfd8d9a-b93f-4514-bbac-ab818bbaf3ef","title":"Compile time CUDA device checking in Rust","content_text":"Stable Rust is soon getting const generics. Let’s look at how const generics can be used to avoid a certain bug at compile time. The bug? Trying to perform operations on data on separate CUDA devices in PyTorch.","url":"https://m-decoster.github.io/","date_published":"2020-07-25T10:04:10Z","author":{"name":"Mathieu De Coster"},"tags":["Language"]}]}