#rust
Articles tagged #rust, newest first. All tags
Introducing arborium, a tree-sitter distribution
About two weeks ago I entered a discussion with the docs.rs team about, basically, why we have to look at this: When we could be looking at this: And of course, as always, there are reasons why…
14 min
Does Dioxus spark joy?
Note: this article is adapted from a presentation I gave at a Rust Paris Meetup — that’s why it sounds a little different than usual. Enjoy! Good evening! Tonight, I will attempt to answer the…
11 min
Engineering a Rust optimization quiz
There are several Rust quizzes online, including one that’s literally called the “Unfair Rust Quiz” at https://this.quiz.is.fckn.gay/, but when I was given the opportunity to record an episode of the…
14 min
Making our own spectrogram
A couple months ago I made a loudness meter and went way too in-depth into how humans have measured loudness over time. Today we’re looking at a spectrogram visualization I made, which is a lot more…
20 min
crates.io phishing attempt
Earlier this week, an npm supply chain attack. It’s turn for crates.io, the main public repository for Rust crates (packages). The phishing e-mail looks like this: And it leads to a GitHub login page…
1 min
Introducing facet: Reflection for Rust
I have long been at war against Rust compile times. Part of the solution for me was to buy my way into Apple Silicon dreamland, where builds are, like… faster. I remember every time I SSH into an…
20 min
The virtue of unsynn
Addressing the rumors. There have been rumors going around, in the Reddit thread for facet, my take on reflection in Rust, which happened a bit too early, but here we are, cat’s out of the bag, let’s…
21 min
Open sourcing the home CMS
I’ve been bragging about my website software for years! For… whew, it’s been 5 years! I’ve been teasing folks about the cool things I did from the beginning — here are all the articles and series…
7 min
The promise of Rust
The part that makes Rust scary is the part that makes it unique. And it’s also what I miss in other programming languages — let me explain! Rust syntax starts simple. This function prints a number:…
29 min
The case for sans-io
The most popular option to decompress ZIP files from the Rust programming language is a crate simply named zip — At the time of this writing, it has 48 million downloads. It’s fully-featured…
26 min
Catching up with async Rust
In December 2023, a minor miracle happened: async fn in traits shipped. As of Rust 1.39, we already had free-standing async functions: pub async fn read_hosts() -> eyre::Result<Vec<u8>> {. // etc. }.…
20 min
ktls now under the rustls org
What’s a ktls. I started work on ktls and ktls-sys, a pair of crates exposing Kernel TLS offload to Rust, about two years ago. kTLS lets the kernel (and, in turn, any network interface that supports…
3 min
Cracking Electron apps open
I use the draw.io desktop app to make diagrams for my website. I run it on an actual desktop, like Windows or macOS, but the asset pipeline that converts .drawio files, to .pdf, to .svg, and then to…
15 min
Extra credit
We’ve achieved our goals already with this series: we have a web service written in Rust, built into a Docker image with nix, with a nice dev shell, that we can deploy to fly.io. But there’s always…
9 min
Generating a docker image with nix
There it is. The final installment. Over the course of this series, we’ve built a very useful Rust web service that shows us colored ASCII art cats, and we’ve packaged it with docker, and deployed it…
16 min
Doing geo-location and keeping analytics
I sold you on some additional functionality for catscii last chapter, and we got caught up in private registry / docker shenanigans, so, now, let’s resume web development as promised. Adding…
11 min
Using the Shipyard private crate registry with Docker
Wait wait wait, so we’re not talking about nix yet? Well, no! The service we have is pretty simple, and I want to complicate things a bit, to show how things would work in both the Dockerfile and the…
17 min
Deploying catscii to fly.io
Disclaimer: Because I used to work for fly.io, I still benefit from an employee discount at the time of this writing: I don’t have to pay for anything deployed there for now. fly.io is still…
10 min
Writing a Dockerfile for catscii
Now that our service is production-ready, it’s time to deploy it somewhere. There’s a lot of ways to approach this: what we are going to do, though, is build a docker image. Or, I should say, an OCI…
15 min
Serving ASCII cats over HTTP
Our catscii program does everything we want it to do, except that it’s a command-line application rather than a web server. Let’s fix that. Enter axum. The documentation for the axum crate tells us…
18 min
Printing ASCII cats to the terminal
Now that our development environment is all set up, let’s make something useful! Creating the catscii crate. From a VS Code window connected to our VM (as we just set up), let’s make a new Rust…
20 min
Building a Rust service with Nix
I often give bits and pieces of advice on how to build Rust stuff the comfy way. But it can be hard to see how everything comes together, especially when it comes to, say, deploying a web service in…
3 h 1 min
The bottom emoji breaks rust-analyzer
Some bugs are merely fun. Others are simply delicious! Today’s pick is the latter. Reproducing the issue, part 1. (It may be tempting to skip that section, but reproducing an issue is an important…
36 min
Day 18 (Advent of Code 2022)
This time around, we’re porting a solution from C++ to Rust and seeing how it feels, how it performs, and what we can learn about both languages by doing that. See Day 17 for the rationale re:…
8 min
Day 17 (Advent of Code 2022)
Advent of Code gets harder and harder, and I’m not getting any smarter. Or any more free time. So, in order to close out this series anyway, I’m going to try and port other people’s solutions from…
11 min
Day 16 (Advent of Code 2022)
Let’s tackle the day 16 puzzle! Parsing. The input looks like this: Valve AA has flow rate=0; tunnels lead to valves DD, II, BB. Valve BB has flow rate=13; tunnels lead to valves CC, AA. Valve CC has…
14 min
Day 15 (Advent of Code 2022)
The day 15 puzzle falls into the “math puzzle” territory more than “let’s learn something new about Rust”, but since several folks asked if I was going to continue… let’s continue. The sample input…
7 min
Day 14 (Advent of Code 2022)
I like how the day 14 puzzle sounds, because I think it’ll give me an opportunity to show off yet another way to have Rust embedded in a web page. But first… Let me guess: parsing? You bet your furry…
9 min
Day 13 (Advent of Code 2022)
The day 13 puzzle needs a speech therapist. ??? …because it has an awful lisp!! Ahhhahahahhhh. Are you ok? What is.. what is going on with you? No but seriously we have what are ostensibly…
4 min
Day 12 (Advent of Code 2022)
Alright! The day 12 puzzle involves path finding, and it seems like a good time to lean more heavily on the WASM embeds I’ve set up for the previous parts. Let’s start by setting up the types we’ll…
8 min