Dioxus Keeps Getting Better
Today’s Issue: Building Your Own Shell Using Rust, Thoughts on Rust Hashing and a Retro Game Engine That Will Make Mario Blush
Season's Greetings, Rustaceans!
Welcome to another edition of the Rust Bytes newsletter.
In this issue, we'll discuss the amazing new features that came with Dioxus version 0.6, challenge you to implement pathfinding in a grid, spotlight an amazing Rust project, and share some incredible links of the week.
Here’s issue 48 for you!
THE MAIN THING
Dioxus Keeps Getting Better
When we first introduced Dioxus a few months ago, it was a promising, young project. Fast forward to today, and Dioxus has just released version 0.6, packed with a host of exciting new features and tools.
Dioxus aims to be 'Flutter, but better'—and with its latest release, version 0.6, it’s living up to that promise!
This release focuses on improving the developer experience with a complete overhaul of the CLI, massive hot-reloading improvements, and tons of new features across the board.
Here's a quick rundown of the highlights:
Interactive Command Line - The CLI has been completely rewritten, featuring live progress bars, interactive filters, log-level control, and more
Magical Hot-Reloading - Dioxus now supports hot-reloading for formatted strings, component properties, nested RSX blocks, and even mobile assets!
Toasts and Loading Screens - Dioxus now displays toast notifications and loading screens for web apps in development mode.
Desktop and Mobile Fullstack Support - Server functions now work seamlessly with both desktop and mobile apps, simplifying backend logic handling across platforms.
And if that’s not enough:
Suspense and HTML Streaming - Suspense gracefully handles loading states, while streaming enables the server to send chunks of rendered HTML to the browser as they become available.
Static Site Generation and ISG - Generate static HTML files or take advantage of incremental static generation (ISG) for frequently updated content.
Synchronous prevent_default - Dioxus now supports synchronous event handling, allowing you to call
event.prevent_default()
directly within event handlers. This opens up possibilities for richer interactions with components likeLink {}
.Hybrid WGPU Overlays - Overlay native Dioxus apps on existing windows with the "child window" feature, offering integration with other renderers like WGPU and OpenGL.
This is just a glimpse of what Dioxus v0.6 has to offer. For a deeper dive, check out the official release notes. And a big thank you to the amazing team behind all these incredible features! You Rock! 🙏
RUST CHALLENGE
In the previous issue, we challenged you to implement Matrix transposition. A special thanks to Jack Hawkins for submitting the solution to the Matrix challenge. You can find the solution in the Rust Playground.
Let's move on to our next challenge.
Pathfinding in a Grid
Instructions
You are given a 2D grid representing a map where:
0
represents an empty space.1
represents a wall or an obstacle.
Your task is to write a Rust function that finds the shortest path from the top-left corner (0, 0)
to the bottom-right corner (n-1, m-1)
of the grid. You can move up, down, left, or right, but you cannot move diagonally or through walls.
If there is no valid path, return None
. If there is a path, return the length of the shortest path.
Use Breadth-First Search (BFS) for the algorithm, as it is optimal for finding the shortest path in an unweighted grid.
Function Signature:
fn shortest_path(grid: Vec<Vec<i32>>) -> Option<usize>;
Input:
A 2D vector
grid
wheregrid[i][j]
is either0
(empty space) or1
(wall).
Output:
The shortest path length if a path exists, or
None
if no path exists.
You can start writing and testing your code on Rust Playground. Once completed, please share your solution on Twitter, or as a reply to this email.
PROJECT SPOTLIGHT 💡
PYXEL
Remember those boxy, colorful graphics from the golden age of gaming? The chunky 8-bit sprites that felt like digital frontier breakthroughs—sparking imaginations and keeping us glued to the screen for hours.
What is Pyxel, exactly?
Pyxel is a Python-based retro game engine that lets you create your very own pixelated worlds and characters. It's like picking up a paintbrush specifically designed for chiptunes and low-res perfection.
Why should you care?
Here’s why Pyxel is worth checking out:
Simple but Powerful - If you can handle basic Python, you're good to go. It’s a user-friendly platform that lets you dive straight into pixel perfection without much fuss.
Classic Retro Palette - Pyxel’s built-in 16-color palette is your ticket to creating vibrant, nostalgic worlds. You don't need a thousand shades to bring your characters to life—just the essentials, like the good old days.
8-Bit Soundtrack? You Got It - Every pixel masterpiece needs its own soundtrack. Pyxel comes with tools to create catchy 8-bit tunes and sound effects. It’s like having your own retro sound studio packed right into the engine.
Python-Powered, Game-Ready - Whether you’re crafting platformers, side-scrollers, or puzzlers, you’ve got all the tools to bring your retro visions to life without the hassle.
Pyxel is more than just a game engine—it’s a creative canvas. Build side-scrollers that’ll make Mario blush, design platformers that challenge the sharpest players, or create mind-bending puzzles that’ll have everyone hooked.
Retro is timeless, and Pyxel makes it possible to reimagine the past while creating something completely new.
AWESOME LINKS OF THE WEEK 🔗
Mariam Fawzi wrote an article on how we rewrote Stakpak in Rust!
The talented team behind Turso Database has open-sourced Limbo, an SQL database engine written in Rust.
Alisa Sireneva wrote about Thoughts on Rust hashing.
The SeaQuery team has released v0.32, packed with amazing features—and we really mean it!
Valentin Golev wrote about Running teloxide bots cheaply on Fly.io.
Matthew Plant wrote a walkthrough on Garbage collected smart pointers in Rust via concurrent cycle collection.
Martijn Faassen wrote about The Humble For Loop in Rust.
Ellen Poe released farebox, a fast RAPTOR implementation in Rust designed for memory-constrained machines.
Josh Mcguigan wrote an article on Building Your Own Shell using Rust.
In other news, async closures in Rust have now been officially stabilized.
SUPPORT RUST BYTES👋
You're Rust Bytes biggest fans, and we love to see it.
Here are a few ways you can help us spread the word:
❤️ Recommend Rust Bytes to your friends.
🤳 Connect with us on our socials: X, Rustaceans Publication.
📨 Email us at rustaceanseditors@gmail.com feedback is welcome.
☕️ Support our editors and Buy Us Coffee.
That's all for now, Rustaceans. Keep going at it.
John & Elley.