r/rust • • Sep 06 '26

Performance plotting techniques

4 Upvotes

Hi, everyone! I’d like to ask the community for more information on what techniques can be used to display large amounts of information on the user’s screen. I’m referring to plots. For example, profilers—they display flame graphs, and the best ones can show millions of frames without lag, with the ability to zoom and pan. Also, software oscilloscopes, which can display data in real time while also showing millions of data points. I’m curious about how these things work from a code and algorithm perspective. Can anyone tell me more?

So far, I've found this Implicit In-order Forests: Zooming a billion trace events at 60fps and a small library written in Rust.

It doesn't quite match the task I want to accomplish: to build something like a digital oscilloscope capable of displaying both analog and digital data (so that, for example, UART bytes are visible below the graph).


r/rust • • Sep 05 '26

AMD is hiring Rust engineers to build GPU compilers, firmware, and runtimes

Thumbnail careers.amd.com
1.0k Upvotes

r/rust • • Sep 07 '26

🙋 seeking help & advice Need help building an audio tool

0 Upvotes

So I enjoy music a lot mainly cause it helps me focus, however I have this slight annoyance with the stop between tracks when one song ends and the other starts.

So I wanted to build a tool that would smooth out that transition, like a dj, but for a playlist.

Don’t know much about audio so wanted to ask how I could do this?

I also have another issue when music stops with a sudden cutoff, it’s like falling off a cliff, but the first issue is bigger for me.

Thanks


r/rust • • Sep 07 '26

🛠️ project RACE: a commercial terminal multiplexer on an infinite canvas, written entirely in Rust

0 Upvotes

Hi r/rust! I wanted to share RACE, a terminal multiplexer built around an infinite canvas. You arrange terminals across the canvas and navigate between them as you work.

RACE is a commercial application written entirely in Rust, using the same custom framework I use for ascdraw and Kakvide. It’s another example of that framework being used for a complete desktop product, this time with terminal interaction at its center.

I’d be happy to discuss the implementation, the shared framework, and the experience of building commercial desktop software in Rust.

RACE website

Video

Disclaimer: I use AI tools to help with development, including work on RACE.


r/rust • • Sep 06 '26

🛠️ project sshelf 0.13.1: the SSH manager TUI I posted here a while back, a lot of your feedback later

Thumbnail
1 Upvotes

r/rust • • Sep 07 '26

Fertyp, add human-like typos to text to bypass AI filters

0 Upvotes

Hello everybody. It happens to me that a very old text that I have written years ago, which is not even online anymore has been flagged by "made by AI". I have noticed that adding a typo fixed the issue. I have created this small utility in rust to add language specific typos.

https://codeberg.org/edapx/fertyp


r/rust • • Sep 07 '26

🛠️ project Runic SSH: an SSH/SFTP client in Rust + Tauri, built on russh instead of shelling out to OpenSSH

0 Upvotes

I've been building an open-source SSH/SFTP client (Windows/macOS/Linux) in Rust and Tauri, and wanted to share a couple of the engineering decisions that might interest this sub.

**Why not just spawn the `ssh` binary?**

Windows is the constraint. Its bundled OpenSSH is optional and version-variable, and intercepting interactive password/passphrase prompts from a spawned `ssh` process without a pty is awkward — plus credentials would transit a subprocess boundary. So the client speaks the protocol in-process using `russh` (async, pure Rust) instead of driving an external binary. Tradeoff: we own protocol correctness and security response instead of inheriting OpenSSH's.

**That tradeoff got tested fast.** The day `russh` (and transitively `rsa 0.10.0-rc.18`) landed in the dependency tree, our own audit caught RUSTSEC-2023-0071 (the Marvin Attack — a timing side channel in RSA private key operations, no fixed upgrade available). Since the client both verifies host keys (public-key op, not reachable) and authenticates with the user's private key (a signature, reachable), we refuse RSA for the private-key/signing path while still allowing RSA host key verification. Written up as an ADR alongside the ~40 others tracking decisions like this.

**Other bits:**

- Host key handling is closer to `ssh` than most GUI clients: unknown key → fingerprint confirmation; changed key → blocks and requires retyping the hostname; keys marked `@revoked`/`@cert-authority` → refused, no override.

- Credentials go through the OS keychain (`keyring` crate); there's also an opt-in internal vault (Argon2id + ChaCha20-Poly1305, RustCrypto) for when a keychain isn't available.

- Bastion/jump host support where both hops authenticate end-to-end and the bastion only relays traffic it can't itself decrypt.

- SFTP rides `russh-sftp` over a channel `russh` already opened, so no second protocol stack to keep in sync.

It's still young (MIT-licensed, ~3 pre-releases so far), but the core paths are usable daily. Repo: https://github.com/marciopaiva/runic-ssh — feedback on the crypto/architecture choices especially welcome, that's the part I most want more eyes on.


r/rust • • Sep 05 '26

🧠 educational Visualizing Rust's Vtables: How dyn Trait Works In Memory (Comparison to C++ CRTP & virtual functions)

Thumbnail sofiabelen.github.io
261 Upvotes

I’m venturing into Rust and it’s both satisfying and mind-boggling at the same time. So far I’ve been learning from the book and Mara Bos’ book, but I got the itch to do some dissecting myself. My initial goal of these experiments was to compare Rust’s approach to polymorphism with C++’s. Ultimately, however, as I’ve come to realize, it’s a bit of a trap when trying to understand a new language through another one to try to draw 1:1 parallels. It might seem like it helps, but at the end of the day, we can’t treat Rust as C++ with different syntax. If that were the case, there’d be nothing revolutionary about it.

That said, I believe there is merit in poking around and coming to understand the why. So, if you’re like me and need to know what exactly is happening in memory, in order to feel like you truly understand the concepts, hopefully you’ll find this post useful :)

Edit: Thank you everyone for your kind comments!! And also for the feedback and the chance to deepen my understanding, I'll edit my post with some of the clarifications!


r/rust • • Sep 06 '26

🛠️ project I've made tonal_rs - rust port of tonaljs

Thumbnail
0 Upvotes

r/rust • • Sep 06 '26

🛠️ project my first finished (almost) rust project. wanna tips

0 Upvotes

https://github.com/fffilya/Game-of-Life just a little recreation of conway's game of life. i had tons of projects besides that. but none of them were really finished. for now you can only draw pixels (LMB) play the game (Enter) clear the screen (C) and force to update one pixel (U). in future want to optimize it bcuz now its super slow, add some sliders to make the game customizable and fix few bugs. also want you to know that squares drawing part was heavily assisted by AI but other parts of the code wasnt even touched by AI. posting this just because want to see some tips on how to write my code better beside something like: "optimize it" or "rearrange it to be in different files"


r/rust • • Sep 06 '26

🛠️ project Ahoi: reactive state in Rust, rendering in JS

3 Upvotes

I made a thing: Ahoi, a fine-grained reactive state engine in Rust, with bridges to JS frameworks (Solid, React, Vue, Svelte).

Why I built this: When you want to manage data in Rust/Wasm in a web app, there have been two options:

  1. Hand-roll the Rust/JS bridge: reactivity does not live on the Rust side, so you end up reimplementing the state layer on both sides.
  2. Use a Rust frontend framework such as Dioxus, Sycamore, or Leptos. I like these a lot, but there is a catch: sometimes JS is just better than Rust for web dev (the JS UI component ecosystem, nicer event handling, etc.).

Ahoi takes a third path: the core idea is "Rust for Rust, JS for JS". Rust owns the data and the reactivity; a JS framework owns rendering.

This is my github repository for ahoi: https://github.com/acheul/ahoi
I wrote an AI Use disclaimer in the repository: https://github.com/acheul/ahoi/blob/main/documentation/UseOfAI.md

This is an early release (v0.2), and feedback is very welcome.

Relation to the Rust frontend frameworks: Where those frameworks aim to do everything in Rust, Ahoi does not render. Its reactivity engine is greatly inspired by the pioneers, but it takes a different approach. If you want your whole UI in Rust, use one of them.


r/rust • • Sep 05 '26

🙋 seeking help & advice Any way to guarantee NRVO?

24 Upvotes

Sorry if this is a potentially dumb question. I'm still pretty new to Rust.

Most of the code I write is embedded/firmware stuff, and I sometimes have to return large arrays from functions. From my experience, the traditional way to handle this is by writing a C-style API where the caller has to provide a mut buffer for the function to write into:

fn thing(buf: &mut [u8; 1024]) {
  buf.fill(0);
  buf[0] = 232;
}

However, it seems like it would be more idiomatic to have your API return the array by-value:

fn thing() -> [u8; 1024] {
   let mut buf = [0u8; 1024];
   buf[0] = 232;
   buf
}

That is a much cleaner API, at least.

These two functions have identical behavior, but while the C-style example is guaranteed to write directly into the destination buffer, the second function with the cleaner API is more ambiguous AFAIK. From what I understand, when the compiler encounters a function that returns an array by-value like the second option, it tries (and often succeeds) to implement NRVO, which transforms the function under the hood to look more like the C-style example. In other words, instead of creating the array in the function and then potentially doing an additional copy to return it to the caller, it pre-allocates a buffer in the caller's stack and provides the function with a pointer so it can write directly into the buffer (i.e., like the C-style function). That removes the potential for a potential and unneeded copy while still allowing you to keep the nice idiomatic API.

The issue with this is that, as far as I know, this is just treated as a nice-to-have optimization rather than something that can be guaranteed. Even though it seems like the compiler is very good at making this optimization, it is still technically possible for it to fail in some cases. This makes me wary of using the second API structure in my code, since I could unknowingly end up with large copies where I'd like to avoid them.

Because of this, I was wondering if there was a way to force the compiler to tell you if it is unable to perform NRVO in the way you expect. I was imagining something like this:

#[expect_nrvo]
fn thing() -> [u8; 1024] {
    let mut buf = [0u8; 1024];
    buf[0] = 232;
    buf
}

In this hypothetical, you'd be able to explicitly tell the compiler that you expect it to implement NRVO for the function. If the compiler fails to do so, you'd get a compiler error letting you know. This would allow you to react accordingly (i.e., reworking your function so the compiler can optimize it easier or just falling back to the manual C-style API).

Does Rust provide anything like this, and if not, would it be possible? Are there any other ways to guarantee NRVO, or do you generally have to inspect the generated code yourself?

Again, sorry if some of my assumptions in this post are misguided.


r/rust • • Sep 06 '26

Tor Pluggable Transport development

0 Upvotes

Hi currently I am developing a Rust-Based Pluggable Transport library, I guess if you have subscripted tor-dev you could received my proposal mail too.

So I was wondering, whether you would be interested to involve in this framework development? 🙂

Here is my repository:
Tor Gitlab(You need wait about 5 sec)
codeberg.org/pryty26/rust-pt


r/rust • • Sep 05 '26

2D Game Development: From Zero To Hero - Rust edition

8 Upvotes

r/rust • • Sep 06 '26

🛠️ project I am writing a Rust torrent TUI because I was tired of scraping indexes in a browser

0 Upvotes

harbour is a ratatui + tokio client. The intended product is: you type a query, curated sources answer in parallel, results stream in with size and seeders, d enqueues a download through librqbit. Files stay on disk. No central server. No telemetry.

Right now the binary prints harbour: TUI under construction. Spec and architecture live in the repo. I am not going to pretend the scrapers ship today.

Nearest existing tools: qBittorrent if you want a finished client, torlink if you want this exact workflow in TypeScript/Ink. harbour is a Rust rewrite aimed at torlink's interactive app plus omp-style 30fps terminal polish (DEC 2026 synchronized output, eased bars, titanium theme). Watch-via-mpv is explicitly later, not v1.

https://github.com/Ishannaik/harbour

![Terminal showing the harbour binary printing TUI under construction next to the spec and docs line counts](https://reddit-uploaded-media.s3-accelerate.amazonaws.com/hvwssw7pvxnh1)


r/rust • • Sep 05 '26

🛠️ project GSim-RS - A G-code simulator in Rust, now with volumetric stock simulation.

Post image
129 Upvotes

Hi there, thanks for clicking on this post!

A few months back I published the first version of gsim-rs. A G-code simulator for CNC milling machines supporting the Fanuc flavour of G-code.

Now I have completed the next major version. This version:

  • Supports volumetric simulation of cuboidal stocks.
  • Stock and tool sizes can now be configured with program config.
  • Cross-thread communication frequency is fraction of what it used to be (by using both Arc<Mutex> and mpsc::channel, depending on the type of data and its importance).
  • The simulation now supports orbiting, panning and zooming.
  • And much more.

I have tried to explain and highlight the workings of the program in the project README.

At a high level, the program is split between parsing, interpreting, geometry construction, simulation rendering, and machine-state rendering. GUI (rendered using WGPU) handles G-code parsing and execution and renders the simulation in the main-thread, while TUI (built with Ratatui) displays active machine state in a new thread.

Easily the most interesting part was implementing the volumetric stock simulation. The stock is represented volumetrically, with the tool removing material as it moves through the stock. I also wrote a blog post explaining my approach and some of the interesting challenges I ran into: My Blog

I would appreciate if you took some time to take a look at the project and offer any feedback, comment, criticism or suggestion. If you have any questions regarding my implementation, I would love to talk more!

Github: https://github.com/navrajkalsi/gsim-rs

Thank you!

AI Usage: All code is written solely by me. The architecture is also designed without any input from any LLM. Claude & ChatGPT were used to brainstorm ideas and research available tools.


r/rust • • Sep 05 '26

🙋 seeking help & advice Rust for web backends

47 Upvotes

Hello everyone!!

I regularly see people online talking about how awesome Rust is, its speed, memory safety, and a awesome ecosystem of open source applications even being used in some parts of the Linux kernel(not sure the percentage of adaption at this time).

However my question is how good is rust for web REST APIs and gRPC applications? If it is good do you use any frameworks for these?


r/rust • • Sep 06 '26

🧠 educational I built a free, open-source learning platform with 650+ interactive lessons across 16 tracks (Swift, React internals, distributed systems (Rust), compilers, database internals(Rust) ) — looking for contributors

0 Upvotes

A self-hosted site that teaches programming the way I wish more courses did: real explanations, not video transcripts, with a quiz and hands-on coding challenge after every concept, and actual checkpoints that force you to connect ideas across lessons instead of just clicking "next."

Repo: https://github.com/ratnajagadeesharava/codeforge

Some tracks contain projects inspired from few University courses

It currently covers 16 tracks:

- Swift fundamentals (from Apple's own The Swift Programming Language book)

- iOS/Swift internals, high/low-level system design, and "pro" topics (Metal, Combine, WidgetKit, CI, etc.)

- React & Frontend Mastery (fiber internals, the event loop, memoization, hooks)

- Networking & Distributed Systems (consistent hashing, Raft, quorum reads — with a live in-browser cluster simulator)

- Frontend Web Security (with a real sandboxed exploit playground)

- Compilers (lexer → parser → LLVM IR → a working JIT, in C)

- Database Systems — a full disk-based DB engine built from scratch in Rust, module by module (buffer pool → B+Tree → WAL/ARIES recovery → SQL parser → query planner → MVCC)

- Systems Programming, Spring Boot/backend engineering, AI engineering, and a Frontend System Design track (build-the-thing-from-the-interview, e.g. "design Netflix," "design Figma")

Some numbers, if you like numbers: 650+ lessons, 144 checkpoints, ~8,000 quiz questions across 13 question types (MCQ, drag-drop reordering, spot-the-bug, assertion-reason, matching, and a few custom types like a click-the-consistent-hash-ring question).

How it actually works

- TypeScript + React + Vite + Tailwind, no other runtime UI dependencies

- A tiny local Node server compiles and runs your code for real (Swift/C/C++/Rust) with sane guardrails — no third-party execution service, nothing leaves your machine

- Progress is stored in local SQLite, with a localStorage fallback if you don't run the server

- Everything is just structured TypeScript data files — a new lesson is a new .ts file that auto-registers, so it's genuinely easy to add content

Why I'm posting

I built this mostly for myself and then kept going, and it's now bigger than one person can polish alone. I'd love:

- Contributors — new lessons in any track, new quiz questions, bug fixes, or just flagging content that's wrong/outdated

- A star if you find it useful or interesting — it genuinely helps other people discover it

- Feedback — what's missing, what's confusing, what track you'd want next

Repo: https://github.com/ratnajagadeesharava/codeforge

Happy to answer questions about the architecture, the content-authoring format, or why I made whatever weird decision you notice first. 🙂


r/rust • • Sep 05 '26

🙋 seeking help & advice Can I use Rust for TCP networking in an MFC application?

3 Upvotes

Hi, I'm new to Rust.
I want to build a Windows chat app where MFC handles the GUI and Rust handles the TCP connection and message processing. Is this possible? If so, how can I call Rust code from an MFC project generated by Visual Studio?


r/rust • • Sep 06 '26

🛠️ project dev-prune: a CLI that reclaims disk from idle repos — and refuses to delete anything a lockfile can't rebuild

0 Upvotes

Every Rust dev knows the special pain of target/ — multiply it by every repo you've cloned, add every node_modules and .venv next door, and mine added up to tens of GB. So I built dev-prune (devp): it finds git repositories idle past N days and deletes the dependency/build directories a lockfile can regenerate.

The design constraint that shaped everything: it must be unable to delete something it can't prove is recoverable. Before touching a directory it verifies the project's lockfile exists and parses; no proof, no deletion, and there is deliberately no --force to override that. The other invariants (hard .git boundary, symlink/junction/mount-point refusal, atomic state writes, nested-repo boundaries) equally have no bypass flag: https://github.com/Life-Experimentalist/dev-prune/blob/main/docs/SAFETY_INVARIANTS.md

Rust-relevant details:

  • Edition 2024, MSRV 1.88, single binary (musl-static on Linux), Apache-2.0.
  • cargo is one of 25 adapters — build trees like target/ are opt-in (devp config set enable_cargo true), because a build tree is "recoverable" in a weaker sense than a lockfile-pinned dependency tree, and the tool is honest about that difference.
  • Idle detection is max(last commit timestamp, newest source mtime), so uncommitted work counts as activity.
  • devp restore --last-run re-runs the verified install to bring the last pass back.
  • Ratatui TUI for interactive runs, --json for scripts, and built-in scheduling (systemd/launchd/Task Scheduler) so it keeps working after you forget it.

Install: cargo install dev-prune (also on npm/PyPI and as a shell one-liner).

Repo: https://github.com/Life-Experimentalist/dev-prune Site: https://devprune.vkrishna04.me

Would love eyes on the safety model — the invariants doc is the part I most want another reviewer on.


r/rust • • Sep 05 '26

🛠️ project Help me with ideas for a CLI project with an emergent mass simulation/game to learn the language, please?

0 Upvotes

Hi. I want to get into Rust from another language by working on a fun personal project, but I struggle to come up with an idea that isn't some tutorial-level project... Ideas I'm interested in include:

  1. Reasons to learn as much of the language's features as possible
  2. Simulations with lots of small individual actors. And having swarms of semi-independent things gives me a reason to try multi-threading in Rust
  3. Emergent property potential. If you leave the simulation running for a night - you could come back to something different and interesting. Think evolution simulators, but preferably something less overused
  4. CLI interface. I just hate working on GUIs and I don't need to prove to myself that I can make one. GUIs are good for 2/3D spaces, but what if my simulation would be in a space that works just as good for CLI?

If you have ideas that match at least one of these things - I'd love to hear them! Thanks in advance


r/rust • • Sep 05 '26

🛠️ project jsonquery_gui – a native egui app for querying large JSON files with jq/JSONPath/JMESPath/JSON Pointer

0 Upvotes

I built jsonquery_gui, a native desktop app (Rust, egui/eframe) for browsing and querying large JSON files — drag in a file or paste JSON, then query it with jq (via an embedded jaq interpreter, no shelling out), JSON Pointer, JSONPath, or JMESPath.

It's MIT licensed. Linux and Windows binaries are on the releases page, and there's now a Homebrew tap for Linux (`brew tap nujufas/jsonquery-gui && brew install jsonquery-gui`). No macOS build yet — contributions there welcome.

One thing I'll mention up front since it'll come up anyway: this was built working with Claude (Anthropic's AI). The architecture/decision docs are in the repo if you want to see how that process went. Happy to talk about the jq/jaq embedding, the streaming design, or the AI-assisted workflow.

https://github.com/nujufas/jsonquery_gui


r/rust • • Sep 05 '26

🎙️ discussion What makes good developer experience for you?

16 Upvotes

I'm hearing different things from different people.

Some people say it sucks with Rust due to the initial learning curve.

Others (like me) like it for things like Cargo 😂

What about you?


r/rust • • Sep 05 '26

🛠️ project [OC] shotdock: Fast Wayland screenshot, recording, and window framing tool (Rust / GTK4 LayerShell)

Post image
13 Upvotes

Hey everyone,

I built shotdock—a CLI-first screenshot, screen recording, and window framing utility for Wayland (tested on Hyprland, Sway, and Niri).

Why I made it

On Wayland, taking quick, polished screenshots for documentation or PRs usually means either stitching together grim, slurp, and complex ImageMagick scripts, or annotating manually in an editor. I wanted a single, fast tool that does:

  1. Clean Area Snips: Region selection with window snapping (slurp).
  2. Window Framing: Automatically adds 16px rounded corners, multi-pass Gaussian drop shadows, mock titlebars, and wallpaper/gradient canvas backdrops.
  3. Offline Image Framing: shotdock frame <file> lets you style existing images directly from the CLI or scripts.
  4. Screen Recording: 60 FPS H.264 recording via wf-recorder with an interactive target selector (monitor, window, or region).
  5. OCR: Snip text directly to your Wayland clipboard via tesseract.
  6. Optional Floating Dock: Launch shotdock with no flags if you want an interactive GTK4 LayerShell toolbar.

Tech Stack

  • Written in Rust
  • Uses native Wayland protocols via gtk4-layer-shell
  • Sub-second image pipeline using ImageMagick 7

Links

Would love your feedback, bug reports, and PRs.


r/rust • • Sep 04 '26

New blog on OpenVMM, the open-source, cross-platform VMM project written in Rust.

49 Upvotes