24 days from node.js to Rust

A Rust guide from a JavaScript perspective

Jarrod Overson
2 min readDec 1, 2021

When I started building Vino, I chose Rust because of its rich WebAssembly support. The first few weeks (ahem, months) were rougher than I expected. If it wasn’t for the fact that Rust was so fast and so obnoxiously safe, I would have switched to something easier to use like assembly (joking). Now that I’m a year+ in, I figured it was time to give back what I wish existed when I started. Fort the next 24 days I’m posting guides that map node.js workflows and idiomatic JavaScript/TypeScript to Rust.

Many Rust guides assume a systems programming background. I don’t know about you, but I’ve spent most of the last decade in JavaScript. The last time I worked with C was in the early 2000’s. I barely remember it and what I do remember I didn’t like. All I wanted was something that compared Rust to JavaScript (or TypeScript, really). I didn’t need hyper-performant code that respectfully managed every single byte on day one. I needed the F5-refresh version. The version that allowed me to get something usable ASAP and work backward from there.

The Rust ecosystem is also less mature than JavaScript. Features and tools that you imagine must exist simply don’t. Like configuring your lint settings in a file and not hard coding it into your source code. I had to double/triple check that once again even now. Writing it out sounds crazy. It is crazy but it’s also true. Here’s the ~4 year old issue tracking the feature. I spent hours — if not days — assuming I must be using the wrong search terms or looking in the wrong places before finding enough evidence that I had to accept the reality.

So for each of the 24 days until Christmas, I’m posting a piece of the puzzle that will bring you from a productive node.js environment to a Rust one. I’ll map tools and commands to their Rusty counterparts, set up VS code for code-completion and debugging, translate idiomatic JavaScript to equivalent Rust, and explain Rust features in JavaScripty terms.

The first post is up at vino.dev and starts at zero: getting Rust and managing versions as you would with nvm. I’ll post weekly wrap-ups on Medium but head to vino.dev/blog for the dailies.

Node to Rust: Day 1 — nvm to rustup



Jarrod Overson

I write about JavaScript, Rust, WebAssembly, Security. Also a speaker, O'Reilly Author, creator of Plato, CTO @Candle