Rust for JavaScript Developers (@rustforjsdev) header
Rust for JavaScript Developers (@rustforjsdev) profile picture

A practical Rust course by @chatsidhartha, especially for JavaScript developers. Preorders open!

Joined May 2022
Photo by Rust for JavaScript Developers (@rustforjsdev)Photo by Rust for JavaScript Developers (@rustforjsdev)
Rust’s ownership rules 1. Every value in Rust must have a single owner 2. A value can have any number of immutable references 3. You can only create a single mutable reference to a value 4. If there’s a mutable reference to a value, you cannot have an immutable reference to it
4
6
45
7,215
It’s exciting how much of modern JavaScript tooling is adopting Rust! There’s swc, turbopack, turborepo rewrite (nice work @vercel friends), the new parcel CSS compiler and now the new Tailwind compiler. It’s great to see.
Whipped up a tiny abstraction to make it easier to run the Tailwind test suite against both our stable engine and the new Rust stuff... Couldn't resist the name 🏒🥅
2
3
1
30
30,417
Getting the finishing touches in on the Building an API server module. We’re going to build an API that runs on @flydotio and persists answers to Postgres for quiz questions for the course. Coming next week!
1
1
12
2,027
In Rust, it is possible to force-ably allocate values on the heap using the Box type, here is an example of an i32 value allocated on the heap. age is now a pointer to a heap allocated i32.
1
5
1,568
Rust lets you iterate through something iterable using an Iterator. Here's an example of filtering an array for even numbers. We create an Iterator from our array using into_iter in this case, a version of iter that moves ownership of each value into our closure.
4
11
2,117
In Rust, unwrap is a quick and easy way to get a Some value from within an Option when you know for sure that a value is present (because it will panic if the Option is None)
1
2
8
3,484
unwrap is fine for code in development or tests but for production, you should probably be calling unwrap_or which lets you set a default for when the value is None instead of panicking!
4
1,186
Rust for JavaScript Developers now has a release date. The course will be out in its entirety on the 1st of August, 2022! 🦀 Preorders are still open if you’re interested. rustforjs.dev
8
10
3
44
To celebrate this new account, the first 20 folks using the code HELLORUST get a 20% discount off their preorder of Rust for JavaScript Developers. Go! 🚀
1
2
1
7