Rust Icon

Rust

Rust is a systems programming language created by Mozilla.
69 Stories
All Topics

Rust blog.rust-lang.org

Five years of Rust

This year marks five years of Rust. On the Rust blog they reflect back on all the major changes since 1.0.

Rust has changed a lot these past five years, so we wanted to reflect back on all of our contributors’ work since the stabilization of the language.

When Rust turned 1.0 you could count the number of companies that were using it in production on one hand. Today, it is being used by hundreds of tech companies with some of the largest tech companies such as Apple, Amazon, Dropbox, Facebook, Google, and Microsoft choosing to use Rust for its performance, reliability, and productivity in their projects.

Christian Scott christianfscott.com

Making Rust as fast as Go (fake news)

Is this more proof of Cunningham’s law, which says, “The best way to get the right answer on the Internet is not to ask a question; it’s to post the wrong answer.”

Update: as some keen HN commenters have pointed out, it looks like the rust program is not actually equivalent to the go program. The go program parses the string once, while the rust program parses it repeatedly inside every loop. It’s quite late in Sydney as I write this so I’m not up for a fix right now, but this post is probably Fake News.

Read Christian’s post then have fun in the comments and discussions on HN and Reddit analyzing his hypothesis, which includes a repo of code to backup his ideas.

Shell github.com

A fast `cd` command that learns your habits

zoxide keeps track of your most frequently used directories and uses a ranking algorithm to navigate to the best match. It was inspired by z and z.lua, but it’s written in Rust and out-performs both:

On my system, compiled with the x86_64-unknown-linux-musl target, hyperfine reports that zoxide runs 10-20x faster than z.lua, which, in turn, runs 3x faster than z. This is pretty significant, since this command runs once at every shell prompt, and any slowdown there will result in an increased loading time for every prompt.

Amos Wenger fasterthanli.me

30 minutes to learn Rust

In order to increase fluency in a programming language, one has to read a lot of it. But how can you read a lot of it if you don’t know what it means?

This 28 minute read will walk you through lots of Rust snippets and explain the meaning of the keywords and symbols they contain. Additional learning resources are included at the end too.

Special thanks to the 46 patrons mentioned by name at the end of the post who enable Amos to write and share this type of content.

Rust blog.discordapp.com

Why Discord is switching from Go to Rust

The TLDR of their reasoning is Go’s garbage collection was causing performance problems at scale. Since Rust doesn’t have a garbage collector, it allowed the team to manage their memory use more effectively. Their results were… uplifting:

Remarkably, we had only put very basic thought into optimization as the Rust version was written. Even with just basic optimization, Rust was able to outperform the hyper hand-tuned Go version. This is a huge testament to how easy it is to write efficient programs with Rust compared to the deep dive we had to do with Go.

This is not a Go sucks switch to Rust story. It is a well-reasoned argument for using one technology over the other when it makes sense to do so.

When starting a new project or software component, we consider using Rust. Of course, we only use it where it makes sense.

Rust evrone.com

Why Rust is meant to replace C

The Rust programming language is an ambitious project of the Mozilla Foundation – a language that claims to be the next step in evolution of C and C++. Over the years of existence of these languages some of their basic flaws still haven’t been fixed, like segmentation errors, manual memory control, risks of memory leaks and unpredictable compiler behavior. Rust was created to solve these problems while improving security and performance along the way.

Why Rust is meant to replace C

Gaming github.com

The NES you left outside in the rain but let dry and still kind of works

This is an NES emulator and a work in progress. The CPU, PPU, and APU mostly work, though there are still at least a couple bugs. I’ve mostly tested on Donkey Kong and Super Mario Bros. so far. There are plenty of full-featured emulators out there; this is primarily an educational project but I do want it to run well.

If you’re interested in learning about Rust and/or emulators, this is for you.

The NES you left outside in the rain but let dry and still kind of works

Rust github.com

The Rust SQL Toolkit 🧰

SQLx is a modern SQL client built from the ground up for Rust, in Rust.

  • Truly Asynchronous. Built from the ground-up using async-std using async streams for maximum concurrency.

  • Type-safe SQL (if you want it) without DSLs. Use the query!() macro to check your SQL and bind parameters at compile time. (You can still use dynamic SQL queries if you like.)

  • Pure Rust. The Postgres and MySQL/MariaDB drivers are written in pure Rust using zero unsafe code.

Command line interface github.com

A CLI for displaying network utilization by process, connection, and remote host

bandwhich sniffs a given network interface and records IP packet size, cross referencing it with the /proc filesystem on linux or lsof on MacOS. It is responsive to the terminal window size, displaying less info if there is no room for it. It will also attempt to resolve ips to their host name in the background using reverse DNS on a best effort basis.

This looks much better than me fumbling through lsof’s man page for ten minutes and then giving up.

A CLI for displaying network utilization by process, connection, and remote host

Rust blog.rust-lang.org

Blog-driven roadmap for Rust?

The Rust core team put out a post today titled “A call for blogs 2020” where they put Rust’s 2020 roadmap into the community’s hands, by way of blogging. Here’s the breakdown…

  • Anyone and everyone in the Rust community writes a blog post about what they’d like Rust development to be like in 2020.
  • The core team reads all the posts, and writes up a “Roadmap RFC” to make a formal proposal.
  • The RFC is reviewed by everyone, comments are made, adjustments are made, and eventually it is accepted.
  • This RFC is a guide to either accept or postpone RFCs for 2020. If a proposal fits into the themes of what we want to accomplish, we’ll take it, but if it doesn’t, we’ll put it off until the next year.

The core team will begin reviewing all the posts starting December 1 with a plan to produce the RFC draft a few weeks after.

The Changelog The Changelog #363

Nushell for the GitHub era

Jonathan Turner, Andrés Robalino, and Yehuda Katz joined the show to talk about Nushell, or just Nu for short. It’s a modern shell for the GitHub era. It’s written in Rust, and it has the backing of some of the greatest minds in open source. We talk through what it is, how it works and cool things you can do with it, why Rust, ideas for the future, and ways for the community to get involved and contribute.

0:00 / 0:00