Top 5 Most Interesting Things From Rust v1.79.0

Today’s Issue: Extremely Fast Vite-Compatible Web-Building Tool, The Rust Stdlib Is Getting Blazingly Faster Sort Implementations, and My Rust Error Handling Best Practices

John Philip
Rustaceans
5 min readJun 28, 2024

--

Ferris the crab mascot — Image courtesy of tweedegolf

Hello Rustacean!

Welcome to another edition of the Rust Bytes newsletter. In this issue, we’ll highlight changes that came to Rust v.1.79.0, present a Rust challenge, spotlight an amazing Rust project, and highlight some incredible links of the week.

Welcome to issue 37.

THE MAIN THING

Top 5 Most Interesting Things From Rust v1.79.0

Rust v1.79.0 was released a few days ago and it’s packed with more goodies than a hacker’s conference swag bag. While we were involved with other things, we thought we would cover it when all the dust had settled down.

So we went over through it and here are some of the nice things we found that made us giggle. Early we were interested with some of the API’s being stabilized including the new Inline const Expressions (we wrote about this) earlier in issue 20.

Enough with the talk, here are out top 5 most interesting things from Rust v1.79.0

1. Inline const Expressions. Say Goodbye to Boilerplate, Hello to Magic

Remember those clunky const declarations that took forever to write? Rust 1.79 throws them out the window with inline const expressions. Now you can write clean, concise code that reads like a dream. It's like sprinkling fairy dust on your programs!

2. Tighter Type Bounds. Unleash the Power of Precision

Think of type bounds as the bouncers at your code’s nightclub. Rust 1.79 lets you be even more specific about who gets in (or what data types are allowed), making your code even more secure and expressive. Imagine, a world without type mismatches — a developer’s utopia!

3. Automatic Lifetime Extension. The Borrow Checker Just Got More Chill

Ever get those pesky lifetime errors that make you want to tear your hair out? Rust 1.79 has your back with automatic lifetime extension. The borrow checker is now more lenient with temporary data, letting you focus on writing awesome code instead of wrestling with compiler errors.

4. Standard Library Profiling Boost. Get Under the Hood Like a Boss

Want to see how your code is really performing? Rust 1.79 enables frame pointers by default in the standard library, making it easier than ever to profile your programs. It’s like having a built-in performance monitor — knowledge is power, after all!

5. A smorgasbord of Stabilized APIs. New Tools for Your Rustacean Toolkit

This update brings a whole buffet of new stabilized APIs to the table. From working with integers and strings to slices and more, you’ve got a wider range of tools to tackle any programming challenge. Consider it your Rust developer toolbox on steroids!

There’s a ton more waiting to be discovered in the official release notes. Check out Announcing Rust 1.79.0.

RUST CHALLENGE❓

In our previous issue you were tasked with a challenge to return a string of the form short+long+short, with the shorter string on the outside and the longer string on the inside. Here is our solution for the challenge.

Are their better way to write this? Tell us incase you have other solution.

Here is a Challenge for you.

GA-DE-RY-PO-LU-KI cypher

DESCRIPTION:

Introduction

The GADERYPOLUKI is a simple substitution cypher used in scouting to encrypt messages. The encryption is based on short, easy to remember key. The key is written as paired letters, which are in the cipher simple replacement.

The most frequently used key is “GA-DE-RY-PO-LU-KI”.

G => A
g => a
a => g
A => G
D => E
etc.

The letters, which are not on the list of substitutes, stays in the encrypted text without changes.

Task

Your task is to help scouts to encrypt and decrypt thier messages. Write the Encode and Decode functions.

Input/Output

The input string consists of lowercase and uperrcase characters and white . The substitution has to be case-sensitive.

Example

encode("ABCD")          // => GBCE 
encode("Ala has a cat") // => Gug hgs g cgt
encode("gaderypoluki"); // => agedyropulik
decode("Gug hgs g cgt") // => Ala has a cat
decode("agedyropulik") // => gaderypoluki
decode("GBCE") // => ABCD

You can share your solution with us or the code snippet on Rust Playground. Enjoy!

PROJECT SPOTLIGHT 💡

Farm

Farm is a extremely fast vite-compatible web-building tool written in Rust. It’s designed to be fast, powerful and consistent, aims to provide best experience for web development, which is the real next generation build tool.

Why Farm?

  • Farm starts React/Vue projects in milliseconds and updates in a blink (think 20ms!). Forget coffee breaks waiting for builds to finish. ☕️
  • Farm only recompiles what’s changed, saving you precious time and resources.
  • Supercharge your workflow with a universe of Farm and Vite plugins. ️
  • Handles all the essentials — JS/TS/JSX/TSX, CSS, modules, and static assets. Plus, official plugins for React, Vue, SolidJs, Sass, Less, and more!
  • Lazy Genius. Only compiles what’s needed, when it’s needed, keeping those bundles nice and lean.
  • Development Harmony. What you see in dev is what you deploy in production. Consistency is key!
  • Legacy Love. Supports both modern and legacy browsers, leaving no one behind.

And even more fun is Farm is completely open-source so you can toy with it.

AWESOME LINKS OF THE WEEK 🔗

  1. The Rust stdlib is getting blazingly faster sort implementations, Congratulations to Voultapher and orlp for all the research and implementation.
  2. Godot-rust team released godot-rust on crates.io with the godot crate. Huge Kudos to the godot-rust team.
  3. Tired of digging through mountains of documentation? to_tgo’s Rust SpeedSheet is the Rust cheat sheet that fits in your pocket or at least your browser window.
  4. Saoirse (aka Without Boats) wrote about Ownership, it’s all about keeping things shipshape, but not the kind you dock at a marina. We’re talking substructural type theory, folks!
  5. Adrian Taylor wrote about Thoughts on Pin.
  6. Let’s Encrypt just kicked off their memory makeover! They deployed ntpd-rs, the first graduate from Project Prossimo’s (hatched in 2020) to quest for safer systems.
  7. The latest update to Ratatouille Ratatui (v0.27.0) is here, and it’s bringing some delicious new features to the table.
  8. This AES encryption guide by Jake Purton is the Rosetta Stone of cryptography… for beginners. Seriously, it’s that good.
  9. Jeremy Chone released My Rust Error Handling Best Practices.
  10. Yoshua Wuyts wrote about IN-PLACE CONSTRUCTION SEEMS SURPRISINGLY SIMPLE?

Do you have a challenging Rust problem or a helpful tip you’d like to share with fellow Rustaceans? We’d be more than happy to feature them in a future issue, with full credit given to you. Submit your challenges or tips to us via email rustaceanseditors@gmail.com.

BEFORE YOU GO 👋

You’re our biggest fans, and we love to see it.

Here are a few ways you can help us spread the word:

That’s all for now, Rustaceans. Sun’s setting on another month, but let’s make the last rays shine bright! Wishing you a happy end-of-month blast.

John & Elley.

--

--