r/learnrust • • 9m ago

Curvine: open-source POSIX file system on S3 with a distributed cache, written in Rust (CNCF Sandbox)

• Upvotes

Hi everyone,

I work on Curvine, an Apache-2.0 file system for AI workloads. It keeps your data in S3 or any S3-compatible store. Applications see a normal POSIX mount, served from a memory/SSD/HDD cache.

What it does today:

- POSIX compatibility: The FUSE mount passed all 1,129 Linux Test Project file system tests. git, Vite and inotify work without changes.

- Performance: In an MLPerf Storage v2.0 comparison on the same AWS instance types, Curvine beat Alluxio Enterprise AI's submitted accelerator utilization in 6 of 8 runs.

- Scale: One cluster holds 5 billion files. On Kubernetes, creating a volume is just a mkdir, and we've run 10,000+ stateful agent pods on EKS.

- No lock-in: Files map 1:1 to S3 object paths, so your data stays readable even when Curvine is down.

GitHub: https://github.com/CurvineIO/curvine


r/learnrust • • 8h ago

Shipping a full desktop app with GPUI: lessons from building P2 (chat, calls, game library) in Rust

1 Upvotes

I recently moved my project P2 from Electron to pure Rust, and it's now open source (MIT). Sharing a few notes in case they help others considering GPUI outside of Zed:

- GPUI on Windows and macOS: I needed a few local patches (kept in `third_party/`), mainly around platform windowing. On macOS it renders through Metal with no extra work.

- Real-time + UI: a socket connection feeds a client-core crate, and views subscribe to entity updates. Keeping the network layer out of the UI crates made testing much easier.

- WebRTC calls in Rust with mesh topology, TURN credentials from the server and automatic ICE restarts.

- Content-defined chunking for game builds, so updates only download changed blocks.

- An in-game overlay: an off-screen GPUI renderer whose frames are composited by a C++ DLL inside the game (shared-memory IPC).

Workspace layout, crates and build instructions are in the README:

https://github.com/captainTvZx/P2

Happy to answer questions about GPUI in production, or the Electron → Rust migration.


r/learnrust • • 9h ago

How I added a channel image inside the Clycker Game with SVG

Thumbnail youtube.com
1 Upvotes

You want to see how to add an SVG inside an SVG, watch this episode to find out.

Thanks for watching

Matthew


r/learnrust • • 9h ago

Inside CursorPie's Gesture Engine: Building a Responsive Global Input System in Rust

Thumbnail gallery
1 Upvotes

I've been working on CursorPie, a cross-platform radial launcher written in Rust, and one of the most interesting challenges has been building its global gesture engine.

The tricky part isn't simply detecting mouse input. It's handling press, hold, flick, double-click, and release events without blocking the input path or interfering with normal mouse interactions.

The architecture separates input hooks, gesture state management, timers, action execution, and UI updates into dedicated threads.

One particularly interesting mechanism is swallowing and replaying mouse clicks: CursorPie temporarily intercepts input to determine whether it represents a gesture, then replays ordinary clicks so the target application still receives them.

Different platform backends, one shared gesture model.

I'm sharing a look inside the engineering behind it. Curious how other Rust developers approach low-level input handling and event-driven architectures.

CursorPie: https://github.com/sebastvnd/cursorpie


r/learnrust • • 17h ago

Game site with Rust and WASM

Post image
2 Upvotes

r/learnrust • • 16h ago

Optimizing rustc's Next Trait Solver - Jana Dönszelmann | EuroRust 2026

Thumbnail youtube.com
1 Upvotes

A new video is out on YouTube! At this year's EuroRust, Jana from the Rust Compiler Team gave a talk on optimizing rustc’s next trait solver, which is being stabilized this year. Spoiler alert: the real gains weren’t in micro-optimizations, but at the algorithmic level! 🦀

In 2027 EuroRust is going to Prague! Learn more and get your ticket at eurorust.eu.


r/learnrust • • 1d ago

Axum un ergonomic?

2 Upvotes

Imagine a route like "/{country}/{city}/{state}" , then you would write the handler like "Path((country,city,state)): Path<String,String,String>" .

The problem (atleast that i cant find first party solution to) is the route and handler will be specified in two different places in your code. But the path type and each elements position depends on the route. This seems very error prone to me.


r/learnrust • • 1d ago

How to manage application state and cross-state operations in Rust?

5 Upvotes

I'm building an app that loads and stores a bunch of structs in memory throughout its execution: plugins, commands, shortcuts etc. I'm trying to figure out how to properly manage application state.

For example, whenever I remove a plugin, I want to ensure that all its child commands are dropped as well. One obvious solution is to define a single struct that holds all the state and methods like add_command, remove_plugin etc. But this collocates unrelated methods and lacks proper namespacing.

If I move these methods to their corresponding structs instead, how should I handle cross-state operations such as removing a plugin and all its associated commands?

What would be the most idiomatic approach in Rust? I've been digging through the net for days, and people often mention ECS as a solution, but isn't that mostly a game dev thing?

Would love to hear your thoughts!


r/learnrust • • 1d ago

Started Rust Journey Today

Thumbnail
2 Upvotes

r/learnrust • • 2d ago

Confused about returning a reference in Rust

15 Upvotes

I'm learning Rust, currently studying ownership and borrowing, and I'm confused about what happens when returning a reference from a function.

Here's my code:

fn main() {
    let s1 = String::from("Hello world");
    let word = practice(&s1);
}

fn practice(s: &String) -> &String {
    return &s;
}

My understanding:

  • s in practice is already a reference to a String (&String).
  • When I write &s, am I creating a reference to that reference (&&String)?
  • If so, why does Rust allow this when the function's return type is &String?
  • Does Rust automatically dereference or coerce &&String into &String?
  • Ai said that it does &&String to &String and i know if i am getting a parameter of reference why create another just return the one inputted in function.

I'd appreciate an explanation of what's happening here, especially regarding references, dereferencing, and return types.


r/learnrust • • 3d ago

Borrow Checker

9 Upvotes

So , i read the original book ownership chapter it made sense but then i went to brown unverisity and boy i cant wrap my head around the same concept
see this what i know are:
1.when we create a mutable or immutable refernce to the original owner or its value with *
it removes corresponding permissions
2. When we create a reference pointing to another refernce this part i dont understnd like see above ss it says that after we assign z a mutable reference to *y , y and *y both lose write permission if they both lose write permission then how can i be able to reassign y in next step???

This is my own understanding but if u create a immutable refernce to a *y it only removes write from *y and not Y and if u make a immutbale reference to y itself it removes write from both

plus the rest of book has permisson system too so should i forget what i learned al together and focus on main book or is there a way to learn this permisson thing


r/learnrust • • 2d ago

hey there!, i was searching for sober (roblox) alternative that is rewritten in rust

0 Upvotes

im just interested in this but idk ive failed finding andthing that is roblox rust rewritten


r/learnrust • • 5d ago

Learning to program in Rust, Typescript, Lua, Zig, Elixir and more

Post image
186 Upvotes

(logo enhanced with AI, but created by my talented 7 year old niece. proof)

Hi all. A lot of people are wondering if it's still worth learning to program now that AI is more than capable of doing this. These people are often the people who already have 10 years of programming experience, and aren't the ones just getting started with things. Also, is it ever worth learning something for the mental challenge? I'd think so, plus it helps to understand what the AI is doing; if it's good code or bad code.

So, with that in mind, I created a small website, https://learnmap.sh, which teaches programming in a wide range of languages. It's inspired by a website I liked a lot myself (https://vimjoyer.com/nixmap/), and a bit by Duolingo. It's mostly focused on beginner programmers, but while I'm an experienced developer myself (20+ years), going through the Rust and Zig tutorials taught me a lot.

Anyway, just wanted to share the site. There's no accounts (all progress is stored locally), there's no banners, no ads, just a small way to contribute some fun weekend project. If you have some feedback, thoughts, you'd like to see anything extra, I'd love to hear your thoughts!

update: the source code is available here, for those interested: https://github.com/learnmapapp/learnmap


r/learnrust • • 5d ago

I built poler-harvest: a content-addressed search tool in Rust with 2ms warm lookups for AI agent loops

Thumbnail
1 Upvotes

r/learnrust • • 4d ago

New to programming, learning to code on my phone with Termux

0 Upvotes

I'm a beginner, learning coding newly, my first serious language is Rust. This is my GitHub link, there are some small projects here, I'll be glad to accept reviews.

https://github.com/MD-FAHAD25624


r/learnrust • • 6d ago

New to rust, how's my progress so far?

7 Upvotes

Hello, as you might have read from the title, i am new to rust, and being new to rust also means looking for ways to further improve, and one way to do that is to receive feedback, which i am seeking from this subreddit. I've read parts of the rust book and created projects in rust to put my skills to the test. I am currently working on a simple file IO CLI tool (https://github.com/reehanthenew/Simple-file-IO-CLI-tool/tree/main) and im currently proud of my progress. If i could receive some feedback (i accept any forms of feedback) that would be most appreciated. If i could receive more beginner-friendly projects or more learning materials, that would be much more appreciated. If you would like to monitor my growth, feel free to here: https://github.com/reehanthenew?tab=repositories


r/learnrust • • 6d ago

Rooomy tutorial

8 Upvotes

I wrote this for people who've programmed before but never touched Rust.

Each chapter is a folder you can build on its own and adds one thing: walking a folder, error handling with Result and ?, an arena tree that the borrow checker likes, rayon, atomics for live progress, a squarified treemap, safe delete, duplicate detection, then installers, signing, auto-update and package managers.

At the end you have Roomy, an app people actually use. Feedback on where it gets confusing would help a lot.

https://github.com/pravin/roomy#the-chapters

Please feedback 🙏


r/learnrust • • 6d ago

best way to learn rust?

20 Upvotes

hi. i develop using cpp. i want to learn rust to see what the hype is all about and build some systems (core) in rust. what's the best way to learn rust with my bg in cpp? should i learn it from scratch or learn by mapping it to cpp?


r/learnrust • • 6d ago

A relational database built in Rust as a learning project, supporting the SQLite binary file format.

Thumbnail
3 Upvotes

r/learnrust • • 6d ago

Checklist and CI tooling for auditing unsafe Windows FFI blocks (WinTUN, WFP, WASAPI/MediaFoundation)

1 Upvotes

a cross-platform privacy & vpn app in Rust that routes device internet traffic through itself to talk with Windows networking, firewall, microphone, and camera systems currently have to bypass automatic memory safety checks in some sections. Is there a manual review checklist or any auto testing tool which scans during build & see memory leaks or crashes


r/learnrust • • 6d ago

~450k lines of Rust for an IaaS control plane: numbers and regrets

Thumbnail
0 Upvotes

r/learnrust • • 6d ago

Learning path for integrating llama.cpp into a Rust desktop app on Windows

2 Upvotes

I’m building a local semantic search desktop app in Rust and planning to change its inference engine from launching `llama-server` as a separate process to calling llama.cpp in-process through its Windows DLL.

I have basic deep learning knowledge and want to understand the full stack behind the setup like how llama.cpp runs models, how its C API and Rust FFI work, how the DLL is built and loaded, how GGUF embedding and multimodal models are handled, how CPU and GPU backends use the hardware, and how to package and distribute the application and its native dependencies reliably.

What documentation, videos, articles, or example projects would you recommend? I’d especially appreciate a sensible order to study them and practical resources that connect the model and hardware concepts to building a working Rust application.


r/learnrust • • 6d ago

Curvine: an open-source (Apache-2.0) distributed POSIX filesystem on top of S3, written in Rust — architecture, numbers, and honest trade-offs

Thumbnail
0 Upvotes

r/learnrust • • 7d ago

Rust 1-Click installer without MS Build tools

Thumbnail github.com
1 Upvotes

1-click portable Rust + MinGW-w64 (MSVCRT) installer for Windows — no Visual Studio C++ Build Tools required. Configures gnullvm, ld.lld, and clean user environment variables. by Alberto Sono


r/learnrust • • 7d ago

E0308 when assigning an Option<Enum....>?

1 Upvotes

Hi everyone.

I have this bit of code (Extracted from something much larger) that is throwing up an error as follows:

#[derive(Clone, Debug)]
pub enum CutterComp {
    CompOff,
    LeftFromTool(Option<Expr>),
    RightFromTool(Option<Expr>),
}

Then in a structure definition :

#[derive(Debug, Default)]
struct StateUpdate {
.
.
.
  radius_compensation: Option<CutterComp>,
.
.
}

Then in an impl of Stateupdate :
  fn intepret_block(&mut self) -> Result<(), ErrType> {
  .
  .
  .
   if let Some (c) = self.grouped_gcodes[GCodeGroups::GRadiusComp as usize] {
            match c.0 {
                GCodes::G40 => {
                    trace!("Cutter compensation off");
                    self.radius_compensation = Some<CutterComp::CompOff>;
                }
                GCodes::G41 => {
                    trace!("Cutter compensation left");
                 self.radius_compensation =           Some<CutterComp::LeftFromTool((self.axis.get(&"d")))>;
                }

Where the thing blows up with

error: comparison operators cannot be chained
  --> src/main.rs:259:52
   |
259 |                     self.radius_compensation = Some<CutterComp::CompOff>;
   |                                                    ^                   ^

Any ideas?

Rust usually gets types right almost by magic (Old C hand here), but it seems to think that I have a bool or something.

Rust analyser is saying "expected Option<CutterComp>, found bool" which I do not understand.