Deno Doing Deno Things
Today’s Issue: Making the rav1d Decoder 1% Faster, Writing Into Uninitialized Buffers in Rust, and Measuring CO2 With I2C & Embedded Rust.
Hello Rustaceans!
Welcome to another edition of the Rust Bytes newsletter.
In this issue, we’ll discuss the latest release of Deno, challenge you with a puzzle, spotlight an amazing Rust project, and share some incredible links of the week.
Here’s issue 68 for you!
THE MAIN THING
Deno Doing Deno Things
Amidst their ongoing legal battle against Oracle regarding the "JavaScript" trademark, Deno continues to push the boundaries of JavaScript tooling. For those unfamiliar, Deno is a JavaScript runtime built with Rust.
Their recent Deno v2.3 update is full of niceties for JavaScript enthusiasts, demonstrating a clear commitment to developer experience.
Here are some notable changes:
The big headliner, the one that makes us raise a single, skeptical eyebrow, is the improved deno compile. Now, your compiled Deno binaries can actually play nice with Foreign Function Interface (FFI) and even Node native add-ons. That means if you've got some Rust magic you want to use or a bcrypt dependency (because who isn't hashing passwords these days?), deno compile can now bundle that bad boy up.
Plus, you can even exclude files, which is a godsend for keeping those binary sizes lean and mean. No one wants a bloaty executable, unless it's a particularly delicious burrito. And hey, Deno.build.standalone is a new boolean, perfect for adding a cheeky "Running in a compiled binary!" message to your console logs.
And for those of us who live and breathe formatted code (or at least pretend to), deno fmt got a revamp. It's now smart enough to format embedded CSS, HTML, and SQL in your tagged templates. No more Frankenstein-monster formatting where your HTML is perfectly aligned but your SQL looks like a toddler typed it.
Plus, they've added a truckload of new formatting options – 14, to be precise. From bracePosition to trailingCommas, you can now tweak deno fmt to match your team's (or your own highly opinionated) coding style.
Speed demons will appreciate the faster dependency resolution and installation – they're claiming a 2.5x speed increase for deno install.
So there you have it, Rustaceans. Deno v2.3 isn't just a point release, they're making it easier to build and distribute, better to work with local packages, and generally smoothing out those rough edges that can turn a fun coding session into a hair-pulling marathon.
Now, if you'll excuse us, we have a freshly compiled Deno binary to deploy.
RUST CHALLENGE 🦀
Last week, we challenged you to write the string permutation function.
Thanks to markids sao paulo, and Serpent7776 who shared their solution to the challenge. You rock! 🫶
Let's move on to this week’s challenge.
What will be printed in the code shown below.
Once completed, please share your solution and tag us either on X, BlueSky, Mastodon, or reply to this email.
PROJECT SPOTLIGHT 💡
Ferron
In today’s web-driven world, speed, security, and simplicity are paramount. Whether you’re building a personal website or managing enterprise-grade infrastructure, your choice of web server matters.
Powered by Rust, Ferron combines blazing speed with memory safety and security. With a growing community and impressive benchmark results, Ferron is quickly gaining traction as a compelling alternative to web servers like Apache and Caddy.
Here are some awesome features that make Ferron tick:
High Performance - Ferron is engineered for speed. So, if you're tired of your website loading slower than a dial-up connection, Ferron is here to inject some serious velocity into your online presence.
Extensibility - Ferron boasts a modular architecture, making customization a breeze. Ferron's design allows for easy expansion, so you're not boxed into a rigid system.
Secure - Ferron inherently emphasizes robust security practices and safe concurrency. This isn't just a marketing blurb; it's a fundamental design principle.
ferron-passwd
- Your Password Pal - Need to generate hashed passwords for your server's configuration? Ferron includesferron-passwd
, a handy tool that does the heavy lifting for you.
Ready to take Ferron’s speedster for a spin? Ferron is free to use and modify, because who doesn’t love open-source awesomeness?
AWESOME LINKS OF THE WEEK 🔗
Microsoft open-sourced edit, a simple and user-friendly text editor written in Rust, inspired by the classic MS-DOS Editor.
Ohad Ravid gave the performance bounty a try and improved the rav1d video decoder's speed by 1%. Read his write-up, 'Making the rav1d Video Decoder 1% Faster,' for details.
Matthias Endler is back again with another article on Don't Unwrap Options: There Are Better Ways.
Kobzol's discussed how disabling debuginfo generation in Rust's Cargo dev profile can significantly improve incremental rebuild performance, achieving up to 30-40% faster compilation times in some cases.
Dan Gohman wrote about “Writing into uninitialized buffers in Rust” introducing a new Buffer trait in the rustix crate, designed to safely and efficiently handle reading into uninitialized buffers in Rust, supporting types like &mut [u8], &mut [MaybeUninit], and Vec spare capacity.
The Rust Team at NLnet Labs released Roto, a compiled scripting language for Rust.
Filtra interviewed Steven Wu (CTO of Scanner) and talked about how they are accelerating log analysis with Rust. Also their part II series on How To Get A Rust Job is out.
Measuring CO2 with I2C & Embedded Rust is a video series that guides you through transforming a micro:bit into an air quality monitor. [video]
Chris Woodruff, a seasoned C# developer, documented a 42-day challenge to learn Rust, sharing daily insights and comparisons between Rust and C# from a .NET developer’s perspective.
Rust-powered tools like Rolldown & Oxlint are game-changers for Mercedes Benz with up to 38% faster builds & 97% faster linting with drop-in replacements.
CodeCrafters: Become a Better Rust Engineer
CodeCrafters created amazing Rust courses that push your skills beyond the basics.
You’ll have fun building real-world projects from scratch, including Git, Docker, Redis, Kafka, SQLite, Grep, BitTorrent, HTTP Server, an Interpreter, and DNS.
The courses are self-paced, so you can learn at your own speed.
If you’re itching to level up your Rust skills, these courses are perfect for you.
Here’s what makes CodeCrafters stand out:
Learn by building projects that challenge you beyond just implementing CRUD features.
Strengthen your fundamentals by working on awesome low-level projects.
Get really good at reading and writing idiomatic Rust code.
Plus, take part in monthly contests for a chance to win exciting prizes.
You can get your CodeCrafters fees fully reimbursed through your corporate Learning & Development (L&D) budget.
Be sure to check with your employer about tapping into your L&D budget to save money and make this a no-brainer opportunity to level up your skills.
Get 40% off when you sign up here. [affiliate]
SUPPORT RUST BYTES
You’re Rust Bytes’ biggest fans, and we love to see it.
Here’s how you can help spread the word:
❤️ Recommend Rust Bytes to your friends.
🤳 Connect with us on our socials: X, BlueSky, Mastodon, Publication.
☕️ Support our editors by buying us coffee.
📨 Email us at rustaceanseditors@gmail.com for sponsorship, feedback or ideas.
Thank you for always opening our newsletter. We really appreciate it.
That's all for now, Rustaceans.
John & Elley.