r/rust • • 5h ago

🙋 seeking help & advice Anything I should know before I start learning Rust?

0 Upvotes

I've know moderate amount of javascript for a while and have been thinking about learning another language. I have decided upon rust for a variety of reasons (mainly so I can say I rewrote it in rust.)

What things should I know before I start? And, are there any features of this language I might want to know about?


r/rust • • 2h ago

🗞️ news CVE-2026-124851 in the Zstandard decoder, and why mzstd is not affected

Thumbnail m-compressors.github.io
13 Upvotes

r/rust • • 15h ago

How we got GPUI into the browser

Thumbnail youtu.be
10 Upvotes

Anyone watched this yet?


r/rust • • 14h ago

Rust game site | WASM | Game engine

0 Upvotes

Hi everyone,

I've spent a while building a web based Rust game engine. Here is the link https://rust-game-app-b5nt8.ondigitalocean.app/

I use a ECS-like implementation for the engine and I use github actions to compile each of the games to WASM.

Let me know if you guys have feedback and if I get some love I'll make a tutorial / breakdown.


r/rust • • 6m ago

🛠️ project Phai Studio: a drag-and-drop designer and IDE for Windows desktop apps in Rust

Post image
0 Upvotes

I've been building Phai Studio, an IDE for making Windows programs in Rust. You lay out a form by dragging controls onto it, double-click one to get its event handler, write Rust, and press F5.

Full disclosure: most of the code was written with an AI assistant. I designed it, tested it and decided what goes in. That's partly why I'm posting: I'm still learning Rust myself, and I'd love people who know it better to look at what came out.

What's in it

  • A form designer with 40+ controls: buttons, text boxes, a data grid, tree and list views, charts, a calendar, menus, toolbars and a web view. Forms are a plain TOML file (.phf), and the generated _ui.rs is ordinary Rust you can read.
  • An editor built on rust-analyzer: completion, hover docs, go to definition, rename, plus a debugger, a test runner and Git.
  • Data: MySQL/MariaDB (its own wire-protocol client), PostgreSQL and SQLite, with tables bound to the grid and saves in one transaction.
  • Publish: makes a setup.exe and a portable folder. Release builds remap local paths (project, ~/.cargo, rustup, the home folder), so the exe you hand out doesn't carry C:\Users\<you>\... in panic locations.
  • Web: the same forms can run as a web app/PWA on a phone.
  • The UI is native Win32 + GDI+, not a web view. It runs in English or Thai.

Licence: the runtime libraries that go into your programs (phai-ui, phai-data, phai-web) are MIT, and what you build is yours. The IDE itself is source-available under PolyForm Perimeter, free to use, including for programs you sell.

Windows 10/11 only for now. Feedback very welcome, especially on the generated code and the phai-ui API.


r/rust • • 2h ago

🛠️ project A new name for ntpd-rs: Statime - Trifecta Tech Foundation

Thumbnail trifectatech.org
10 Upvotes

Interestingly this has nothing to do with https://fr.wikipedia.org/wiki/Jason_Statham


r/rust • • 2h ago

🛠️ project Run Hermes’s terminal and file tools on your own sandbox cloud with Flame

Post image
0 Upvotes

We’ve updated hermes-flamepy so Hermes can use remote Flame sandboxes through its standard terminal and file tools. Set terminal.backend: flamepy—there’s no separate toolset for the model to learn.

Hermes stays on your laptop or controller, while commands execute in gVisor sandboxes on Linux workers you operate. While a sandbox stays open, files, installed packages, working directories, and exported shell variables remain available across tool calls.

flame-cluster handles deployment, worker enrollment, and a console for inspecting workers, sessions, executors, and task progress.

A few reasons we built this on Flame:

  • Shared worker capacity: Run independent agent environments across a pool of machines.
  • Low execution latency: Earlier in-cluster SDK tests measured 8.56 ms median for trivial shell commands in a warm sandbox.
  • Small worker footprint: FEM, the worker manager, used about 17.3 MiB RSS on each of two idle workers.
  • Support for other agents: Flame’s APIs and language support also make it possible to build integrations beyond Hermes.

One limitation to know: suspend/resume currently preserves the session ID but starts with fresh files and shell state. Local project files also need to be transferred explicitly.

We’ve written a walkthrough with setup instructions, architecture, live console screenshots, and measurement details:

https://xflops.io/blog/build-your-own-sandbox-cloud-with-flame/

Would this fit your Hermes workflow? We’d be interested in which capabilities matter most—project sync, durable workspaces, or something else.


r/rust • • 22h ago

How do you cope with ecosystem immaturity?

0 Upvotes

I'm loving the lang so far, but most crates are early 0.x versions. Do they lack functionality, have bugs? I am talking about even basic things like HTTP client.

Is Rust community driven, do some big names do drive its growth? Does ecosystem immaturity limit you?


r/rust • • 18h ago

📸 media How I made my app 100x faster with Rust (and dropped bundle size from 180MB to 2.8MB)

Post image
0 Upvotes

Hey everyone,

I wanted to share a post-mortem and benchmark breakdown of rewriting my Windows camera studio application (LumaShot Pro) from Electron to pure Rust.

The Problem with the Electron Version

The app does live camera framing, zoom, color grading, HDR bracketing, and video capture. In Electron:

  • The packaged .msix was ~180MB because it carried full Chromium and Node.js binaries.
  • Launching the app consumed 400MB–500MB of memory before the user even snapped a photo.
  • On battery, running a 4K feed through Electron caused laptops to spin their fans almost immediately.

The New Architecture: Pure Rust (wry + tao)

Instead of bundling another copy of Chromium, Windows 10/11 already ships with an evergreen Edge WebView2 runtime. We rebuilt the app from scratch in Rust:

  • tao: Cross-platform window creation and event loop handling.
  • wry: Native WebView2 host bindings with full permission handling (PermissionKind::Camera, PermissionKind::Microphone).
  • Zero-copy Custom Protocol (snapcam://localhost/): Static assets (HTML, CSS, JS, Super HD JPEG backdrops) are embedded into the compiled binary via include_bytes! at compile time and served through memory with zero disk I/O.
  • Compiler Optimization: Built with lto = true, opt-level = 3, codegen-units = 1, and strip = true.

The Numbers (Before vs After)

MetricElectron (Old)Pure Rust (New)Delta
Binary / Package Size182 MB2.84 MB-98.4%
Idle Memory (RAM)~460 MB~32 MB14x less RAM
Cold Start Time~3.8 seconds~110 msNear instant
Video Recording CPU28% – 34%6% – 9%4x cooler

New Features Added During the Rewrite

  • Real-Time Super HD AI Virtual Backgrounds: Photorealistic 1080p virtual studio environments (Studio Office, Neon Cyberpunk, Library, Bokeh blur) composited in real-time.
  • Studio Audio Sync: Unified MediaStream merging canvas video tracks with active microphone audio (hardware echo cancellation & AGC).
  • 120 FPS Export Engine: GPU compositor animations (will-change: transform, box-shadow) with instant HUD toast feedback.

Microsoft Store Link

It just went live as an official update on the Windows Store: 🔗 Store Link: https://apps.microsoft.com/detail/9NDCJLBR4VV0?hl=en-us&gl=IN&ocid=pdpshare

Happy to answer any questions about the WebView2 integration, MSIX packaging with makeappx, or packaging Rust apps for the Microsoft Store!


r/rust • • 6h ago

🛠️ project Shipping a ~30k-line Rust/wgpu drawing engine inside an Expo (React Native) app: write-up

0 Upvotes

I wrote up how we run a Rust/wgpu engine (about 30k lines) inside an Expo / React Native app. The app is Doodraw, a drawing app where every stroke wiggles live as you draw it (the hand-drawn "boiling line" look, no timeline or keyframes):

https://expo.dev/blog/doodraw-rust-gpu-engine-expo-config-plugin-100k-installs

Some Rust-side context, since the post is written for an Expo audience:

  • The engine owns the canvas as a native view. React Native only drives tools, layers and UI, and talks to the engine through thin Swift and Kotlin native modules (including MP4 export). The crate builds to an XCFramework for iOS and native libs for Android.
  • The wiggle happens inside the brush at render time, so strokes stay alive while you keep drawing instead of being baked into frames.
  • The same core compiles to WebAssembly and draws through WebGPU for the Windows build (a Tauri 2 shell), so wgpu gives us one renderer across iOS, Android and desktop.
  • The ios/ and android/ folders aren't in git. An Expo config plugin copies the prebuilt engine and bridge files at prebuild and fails fast if a binary is missing, instead of letting Xcode fail half an hour later.

What was hard: keeping rendering consistent across Android GPU drivers (still the part that bites us most), and keeping the native boundary small enough that upgrading Expo / React Native stays a version bump plus a prebuild.

Happy to answer questions about the FFI boundary or the wgpu setup.


r/rust • • 3h ago

🧠 educational Miscompilation in Rust 1.97

29 Upvotes

I reported a miscompilation in Rust 1.97 back in July. In this presentation, I went through the details of the bug and the investigation as it unfolded in the Zulip chat with the Rust team, and shared my takeaways and conclusions.

https://youtu.be/-dNsUB7QRk4?si=n-jBhJQ5N-XZOyNI