Field Guide
A language empowering everyone to build reliable and efficient software.
Rust’s industry-grade tools make collaboration fearless, allowing teams to focus on the tasks that matter.
Focus on the code that matters, leaving debates about semicolons in the past.
Rustfmt automatically formats Rust code, making it easier to read, write, and maintain. And most importantly: never debate spacing or brace position ever again.
Clippy builds on top of the Rust compiler to help you write more idomatic and efficient code.
Documentation tooling built-in to the cargo package manager removes the barriers to writing and shipping documentation.
Take a guided tour of the Rust programming language from
Rust can be a very familiar langauge to people coming from JavaScript based backgrounds. Rustlings covers what you'll need to know to get up and running quickly.
Rustlings also touches on more advanced concepts such as threading that developers in other langauges might not have been familiar with before.
Build Discord bots, Serverless HTTP APIs, CLI tools for JS developers.
Rust's Serenity crate enables you to build async Discord bots with distributed tracing built-in.
Group commands and restrict access to using them, or even seeing them in the automated help output, using highly customizable role based access control.
Build rich user interactions by awaiting user input or reactions in the middle of control flow using collector streams.
Organize your code with the Serenity Command Framework. Build async hooks to execute before every message, bucket commands into rate-limited groups, and handle errors in command execution.
What can you do with Rust?
From building CLI tools to serverless functions, from parsing markdown to running Discord bots, Rust can handle a wide array of applications.
Using structopt we can derive our arguments from an enum to generate subcommands.
JSON, being untyped, can represent multiple types in the same field. Serde can parse these into Rust enums in a few ways.
A key insight into the Rust language is what an expression is and that they return values in tail position, leading to 'implicit returns'.
The Salsa crate allows us to trigger incremental computation through input chagnes. When paired with file watching, we can trigger regeneration of derived queries through file changes.
Rust's Command allows us to execute subcommands and gather the output easily allowing us to do things like check for a node version when building tools for JS devs.
You can pipe code directly to rustfmt when sharing code on different platforms (or your blog) to make it more readable for other people.
Parsing can result in many application specific errors. Here's how to signal that when using the Nom parser-combinator library.
When building tools for JS devs, one way we can enable users to write JS that communicates with our Rust implementations is via sockets.
Using format! to concatenate two strings is idomatic Rust, even though it's not the absolute fastest way.
My newsletter is where you'll find exclusive content from me. I write about technology, startups, and why you shouldn't call yourself a junior engineer