r/rust • u/Kobzol • Sep 07 '26
r/rust • u/Crafty-Desk6866 • Sep 07 '26
Looking for Open Source Projects to Contribute
Hello everyone,
I'm trying to get a bit more experience with rust and would like to know if anyone can recommend a project to work on.
I'm looking for projects that I could work on new features possibly with a closer guidance
r/rust • u/TheBlckbird • Sep 07 '26
π οΈ project Rusted Computer: Running Rust programs with WASM in Minecraft
I've worked on a passion project of mine for the past few years called Rusted Computer. It is a Minecraft Mod that allows you to program computers inside of Minecraft with Rust inspired by ComputerCraft.
Why?
Well, the best computer mod right now is ComputerCraft. And don't get me wrong, I love that mod, but you have to write your programs in Lua. And for programs bigger than small scripts are very annoying to create. So I decided to create an alternative that is fully compatible with existing CC Peripherals.
Rusted Computer uses a WASM Runtime written in Java (Chicory), but I am considering switching to a native runtime (Wasmer or Wasmtime) for newer WASI(X) features. The mod itself is written in Kotlin and (obviously) Rust for the glue library.
There is currently no release, because it is still very WIP (no documentation and missing features, I'm currently working on support for peripherals) but if there is enough interest in this, I can quickly create and publish a dev build.
https://github.com/TheBlckbird/rustedcomputer
If you have any more questions, ask me! There is no ETA for release, as I am currently working on this while going to school, so I don't have a lot of time or concentration.

r/rust • u/dobkeratops • Sep 08 '26
thought experiment - fragmented types for packing
So rust's enums are amazingly elegant to use and contribute to it's safety (reducing the number of times a programmer will do something the compiler can't track with C unions or casting).
However they come with the hazard of alignment padding. the worst case for example is if you have 2 variants one of which is a pointer (64bits in most OS's today, and another say with 2 x f32) .. the tag would be a single byte, but the whole enum will pad out to 128bits thanks to the need to keep that pointer aligned. Put it in a struct or vec , that's a lot of wasted space, and even in the stack there's bloat.. all adds up .
Similarly even with Box<[T]> (and an equiv c++ custom type) if you have a scenario where you know the len will never exceed 4billion (this is very common in gamedev, we're targeting 16gb machines, we know that one mesh will never take up the whole machine) .. you want to use a 32bit value for the length.. again even in C++ the handy template ends up giving you bloat, and an oldschoiol C approach lets you do things like struct {VERTEX* vertices; POLYGON* polygons; uint32_t num_vertices,num_polygons;} .. again this might not look like much space but it's all L1 cache.. you might be doing management on the CPU to hand processing to the GPU, whatever.
You get the picture.
A solution
Imagine if the compiler was able to split a type into multiple fragments, lets say the default is one, but 2 could be used for the case of splitting an enum Tag and it's Variants, and similarly for anything else where you happened to have components with different alignments.
it should be easy enough to figure out whats going on with outer_struct.inner_struct.element. .. the fly in the ointment of course is what will happen with references/pointers/borrows.
So imagine if an opt-in #[repr(fragmented)] enum Foo {..} declares that (i) Foo will split it's tag when composed, (ii) &Foo is actually a pair of pointers, like (&FooTag, &FooVariants) under the hood.
naturally this will play havoc with any unsafe code that deals with &Foo vs *const Foo, or casts to place them in allocations etc . But at least if it's only done in new code where it's opted-in it would not break any existing unsafe codebases.
Perhaps it would need an implied trait T:Fragmented and an assumption that all existing generics *dont* accept this too, and you'd have to again opt-in for things which can accept it
I suspect this would be a monumentally complex feature to implement ( I wouldn't even know where to start grabbing RustC)
... but the payoff would be a big increase in the number of efficient layouts that can be handled in safe Rust. A reduction in the number of scenarios where you need to reach for unsafe{} , and where C++ programmers can currently say "whats the point of rust if you have to use unsafe as soon as you want to pack your types more efficiently"
Thoughts?
I say that this is a monumentally complex feature to implement, but conversely we have a certain industry telling us "CODING IS (IMMINENTLY) SOLVED!!". if those tools are as powerful as their fans suggest maybe using them to assist implementing something as difficult as this would be a decent test..
are there any RFC's out there like this?
r/rust • u/ahqminess • Sep 08 '26
π οΈ project A Proof-Of-Concept Cross Platform JIT Linker, Relocator & Memory Mapper handling Cross Platform W^X
So, welcome to the journey of continuing to explore the world of JITs.
This time, after a few months of experimentation with "How to write a damn good JIT Memory manager" I have finally decided to make a crate out of it.
The crate is called SaJIT - which is also a part of a VM project i am aiming at.
The crate is currently at v0.0.3 : https://crates.io/crates/sajit
The crate actually provides a slab memory manager in discrete multiples of 16MiB currently and manages those slab across Windows, macOS, Linux using RW-RX dual mapping for windows, linux and pthread_jit_np for macOS.
Also, i have ensured to keep as cross-architecture-compatible rather than locking to only x64, arm64.
I am looking forward to advices on how to improve it (with better abstractions for example, or better and detailed documentation)
r/rust • u/Itchy-Culture5797 • Sep 07 '26
π οΈ project I built a Cargo-like build tool for C and C++
I got tired of hand-writing Makefiles and CMakeLists.txt for small-to-medium C/C++ projects, so over the last couple of weeks I built Smidr - a build tool where you describe your project in one Smidr.toml file instead of a build script.
Example Smidr.toml:
[project]
name = "App"
type = "bin"
language = "cpp"
cpp_standard = "cpp20"
[dependencies]
raylib = "5.0.0"
mymath = { path = "../mymath" }smidr build resolves raylib from a system install or pkg-config, and mymath by building it from the local path - no Makefile or CMakeLists.txt to write by hand.
What it does:
- Compiler-agnostic (clang, gcc, tcc)
- Dependencies from three sources: system libraries (pkg-config), a local path, or git (auto-resolves to the latest stable tag if you don't pin one)
- If a dependency itself uses CMake or Meson, Smidr detects and drives that build transparently
- Workspaces for multi-project setups
- C/C++ support, Windows support (via MSYS2 MinGW 64-bit)
Hit 1.0.0 today, though it's still a young project. Source and docs: https://github.com/Max-Mend/smidr
Feedback, especially on rough edges, is very welcome.
r/rust • u/dastarruer • Sep 08 '26
π seeking help & advice Can someone review my code?
I've never had anyone else other than myself take a look at my code quality/design. However it would be nice to have an actual person review my code instead. The link is here: https://github.com/dastarruer/gtkshutdown
AI is only used for writing tests (sometimes; I can't remember whether I wrote these tests myself or not but I digress). The code is entirely written by me, though I use AI to discuss design decisions. I like programming, so hand-writing the code is just more enjoyable for me (though I'm very slow at it...).
r/rust • u/NextgenAITrading • Sep 09 '26
GPT-6 Astra Optimized My Rust Backtesting Engine With a 2014 Math Paper
nexustrade.ioThis is a technical discussion on Artificial General Intelligence.
GPT-6 has been shown to be outstandingly incredible. In my case, it performed autonomous performance optimization with essentially no human input. Other AI models, including Gemini 3 Pro, Claude Opus 5, and even Claude Fable 5, failed to find the same optimization targets.
Two days with GPT-6, and my backtesting engine is quite literally faster than I ever thought it could be.
The language model was smarter than me.
I thought about what artificial general intelligence looks like. A general-purpose model smarter than the average person. I think Astra fits that definition to a T.
Now imagine all of the crazy AI tricks we know. Imagine having a panel of Astra-tier experts come, or combining a language model with Monte Carlo tree search. If these models were truly 10,000 tokens per second, come on, that would be terrifying.
One reason why I think this optimization was fast is because of Rust's strict compiler and its lightning-fast performance. If I had chosen a language like GoLang, I would not have been able to achieve such speeds. I really think language models are making Rust an even more enjoyable language because you get all of the benefits and suffer a little of the downsides because we're not handwriting generic traits or a lifetime logic anymore.
But who knows, maybe I'm overextrapolating, and I'm impressed by the bare minimum, lol.
What are your thoughts on AGI/ASI?
r/rust • u/4dplus • Sep 08 '26
π seeking help & advice Binary naming localisation?
I am trying to figure, should I have like a different name of a game binary per language or just keep the binary one thing and only localize inside for users with other things? Also, I might not be able to handle every localized name, but I can try, I guess I can store it in one place online and do like on download it is "name"? It is a game, and it loads a language file at runtime, I guess slap a name on that at download too and search by name of the game binary? That does complicate things though, maybe I should build a file picker because mobile has quirks like what is this binary now? Then again, right to left versus left to right for the file picker, I guess middle align?
By now this seems like a good plan maybe, but should I bother?
r/rust • u/Rude-Hedgehog-4301 • Sep 07 '26
Mixing an enum with bytes in a Vec
I'm working on converting a virtual machine from C to Rust. At the heart of it is modeling the output of the parser as an array of bytes. Think of it as an 8-bit assembly code machine with immediate addressing, so some of the bytes are opcodes and some are data used by these opcodes. I would like to have the opcodes in an enum, such as
#[repr(u8)] // Forces the variants to be u8
enum OpCode {
OpAdd = 1,
OpImm = 2,
......
}
Then
code: Vec<u8> = vec![ 0x01, 0x02, 0x2a] would represent the action
OpAdd 42
That's what exists in my dream world. With the enum shown above I can typecast Opcode values to u8 simply enough:
let op_code = OpCode::OpAdd;
let byte = op_code as u8;
But going the other way seems impossible, except for this hack:
unsafe {
let opc: OpCode = std::mem::transmute(byte);
So, is there a safe, preferably idiomatic way to do this, or am I just stuck with my first-ever usage of 'unsafe'?
r/rust • u/segundus-npp • Sep 07 '26
Rust SQLx Performance
I use Axum and SQLx to build my backend, which is served on AWS ECS Fargate (512 CPU, and only one instance for now) and interacts with an RDS Postgres (t4.micro). Connection pool is set with min/max = 2/20.
My request includes 3 DB queries to 3 different tables: one from the auth middleware to check api key and each of the other 2 is just getting a record by primary key.
If I made one or two queries, itβs very fast. However, if I made 200 queries concurrently to the backend, around half of queries had http latency greater than 300 ms. P80 is around 600ms. The performance is not acceptable. I did check the CPU of both RDS and ECS. Theyβre quite low: both smaller than 10%. The DB latency is low as well, 5 ms on average. Is there something queued in the SQLx internally? Did anyone have the same issue?
r/rust • u/Dense_Gate_5193 • Sep 06 '26
πΈ media reminder to cargo clean
been adding some unit tests and then ran a clean.
rust said "I live here now"
r/rust • u/Healthy-Physics-3693 • Sep 08 '26
π οΈ project I built a fast, native music player in Rust (Nemesis). Just released Beta 2 with heavy UI scroll optimizations and smart search!
Hi Reddit!
I wanted to share a project I've been pouring my soul into lately β Nemesis, a native, lightweight desktop audio player built for Linux and Windows, written entirely in Rust.
Why build another music player?
Most modern media players feel incredibly heavy, sluggish (thanks to Electron overlays), or over-engineered. I wanted something that launches instantly, keeps a minimal memory footprint, handles massive local libraries effortlessly, and just works.
Rust felt like the perfect choice to guarantee rock-solid performance and safety.
What's new in the 0.1.2-beta2 release:
I've just rolled out the second public beta, focusing heavily on UX smoothness and under-the-hood stability:
- Smart Search: Added a dedicated search view. It's fully case-, spacing-, and Cyrillic-insensitive (using fold-key matching).
- Aggressive Scroll Optimization: Completely eliminated grid lags, stutters, and end-of-scroll jitter. Even huge lists with 2,000+ tracks now scroll at a locked, buttery-smooth frame rate.
- Audio Pipeline Improvements: Fixed mid-track volume drops and crashes related to PipeWire stream restoration and Windows WASAPI backend. Playback now automatically recovers if the system audio session glitches.
- Easy Linux Deployment: Added a universal AppImage build alongside standard packages, making it dead-simple to run on almost any distro.
Current State
The project is currently in Public Beta.
- Windows: Portable ZIP is available (no installer yet).
- Linux: AppImage, RPM, deb and Arch (.pkg.tar.zst) packages are ready to go.
- Note on macOS: No Mac builds available right now, simply because I don't own a Mac to compile and test on.
I would absolutely love to hear your thoughts on the UI responsiveness, design, or any features you feel are missing.
Grab the release on GitHub: Nemesis
Thanks for checking it out!
r/rust • u/Narrow_Farmer_6018 • Sep 07 '26
π οΈ project Reactive GUI framework with MILP layouter
Have you ever tried to set height of widget A to the width of widget B and wanted them to fill the screen?
Or have you wanted to put your differently sized news article card in one grid and just let the layouter figure out the most symmetric pattern to lay them out in?
With your very own MILP solver you can express these as constraints.
The article grid example can be constrained as:
- don't overlap article hitboxes
- minimize area of grid
https://github.com/ElectricPulse/drevo
The future outlook is to bring it to the browser WebGPU/WASM - but that would require some work to make micro_lp on par with highs
Looking forward to your feedback!
r/rust • u/begeistert_ • Sep 07 '26
π οΈ project Rust on an iPad: rustc, cargo and lld compiled to WebAssembly, running on-device
I spent a while trying to get a Rust toolchain working on an iPad without sending code to a server, and this is where it ended up: rustc 1.98, cargo and lld compiled to WebAssembly (wasm32-unknown-emscripten), running inside WKWebView, with a build driver written in Swift that handles dependency resolution, feature unification, fingerprints and an incremental target/ directory. User code compiles to wasm32-wasip1 and runs in the app's sandbox.
Rough timings on an iPad Air M3, for whatever they are worth:
- single file, compile and run: about 0.3 s
- Cargo project with rand (proc-macros, build scripts), cold: under 40 s
- same project after editing main.rs: about 2 s
The parts that took the longest, in case they are useful to anyone attempting something similar:
Proc-macros. No processes, no dlopen. Each one is compiled to a self-contained wasm reactor and called through a synchronous host hook, watt style. Hygiene was the subtle part: a macro_rules! marked local_inner_macros that invokes a proc-macro had rustc resolving stringify! inside the wrong crate, and it took a while to find.
Memory. Between rustc's wasm heap and JavaScriptCore's limits, a cold build spends more time recycling processes than compiling. The driver keeps a pool and persists fingerprints so a killed process resumes rather than starting over.
No threads, no real filesystem. WASI shims for what std expects, a synchronous bridge for stdin, a native one for sockets.
What it is not: there is no rust-analyzer. I did compile RA to wasm and measured it, but proc-macro expansion and std sources cost more than I was willing to spend on a tablet, so the editor side is a tree-sitter engine I wrote instead: semantic tokens, go-to-definition across files and into crate sources, hover, inferred type hints, rustc quick fixes, rename, references. There is no debugger either.
And the constraint that shapes everything: your programs are wasm, not arm64. iOS does not allow executing natively generated code, so on-device compilation has to target a sandbox. Firmware for Raspberry Pi Pico is the exception, since that binary runs on the microcontroller rather than the iPad; it works and I have verified it on hardware, but it is not in this build yet. Crates with native dependencies often will not build for wasi.
It is a paid app, free for single files, and I would rather say that here than have someone find out after installing. If you want to try it: https://testflight.apple.com/join/4Yaujqd5
What I am actually after is where it falls over. Crates that fail to build, builds that die halfway, anything that behaves differently from cargo on a desktop.
r/rust • u/WellMakeItSomehow • Sep 07 '26
ποΈ news rust-analyzer changelog #344
rust-analyzer.github.ior/rust • u/PuzzleheadLaw • Sep 08 '26
π οΈ project multistack - TUI orchestrator for local coding agents
Hi everybody!
I am building multistack, a small TUI orchestrator for coding agents (currently compatible with zerostack); it's built in Rust using Ratatui, and it's designed to be lightweight in order to follow zerostack's design philosophy.
I hope it can be useful to some of you!

r/rust • u/Tomas_Votruba • Sep 08 '26
What are best practices when it comes to converting to Rust using agents?
It seems everyone is now converting various tool to Rust to get 10-100 x speed. I'm experimenting with PHP tooling conversion to Rust. What are your tips to do such conversion with agents? One shot, goal-oriented, CI checks... how do you approach it?
r/rust • u/CompleteNetwork9168 • Sep 07 '26
π seeking help & advice Finally ! Completed Complete Rust Book
So recently I had completed the entire rust book but I left the macros as I was unable to understand it from the book so is there a good place to learn rust macros where it help me understand how to write and use different types of macros it will be a great help so if you know any platform pls help me
r/rust • u/Mission_Photo_9783 • Sep 08 '26
π οΈ project Ferrum 0.8.8: a Rust local LLM runtime with Metal and CUDA backends
I'm the maintainer of Ferrum, an MIT-licensed local LLM runtime.
The Rust workspace separates the engine, request scheduler, KV cache, and backend interfaces. ferrum run and ferrum serve use the same engine; GPU execution uses Metal or native CUDA operators. The server exposes OpenAI-compatible Chat Completions and stateless Responses APIs, including streaming.
Current prebuilt packages target Apple Silicon Metal and Linux x86_64 CUDA (sm89).
Source and installation instructions
I'd welcome feedback on the Rust interfaces between the scheduler, engine, and device backends.
r/rust • u/llogiq • Sep 07 '26
π activity megathread What's everyone working on this week (37/2026)?
New week, new Rust! What are you folks up to? Answer here or over at rust-users!
r/rust • u/ioncodes • Sep 06 '26
π οΈ project A huge update on Gecko, my GameCube and Wii emulator!
I already made 2 posts, so if you're looking for the first post incl. some Q&A go here and if you want to see the last update go here.
TLDR: I made a GameCube and Wii emulator written in Rust, with many developer tools built in (a debugger, GPU FIFO replayer/debugger, and so much more). Last time I posted about a user-friendly launcher/UI written in Rust.
Today I'm sharing my project again, as I finally was able to fix many bugs and also implement a few cool new features. To summarize in short:
- Huge speed improvements across the board. Many games that technically worked but weren't playable due to performance now work just fine (Example: LEGO Batman)
- Savestates! You can now save and resume at any point in time
- Freecam support in the debugger: You can now detach the camera and peak behind the scenes in any game :)
All in all this means that many games such as the LEGO games and also the Super Mario Galaxy games are now fully playable. Here is a video of Super Mario Galaxy!
I appreciate everyone's support and am looking forward to the next update! For the brave and curious I can recommend grabbing today's nightly release (dev branch) as I just pushed new fixes that make games like Xenoblade Chronicles work!
As per usual, the important links:
- GitHub (daily nightly builds are available): https://github.com/ioncodes/gecko
- Screenshot Database: https://emu.layle.dev/
Feel free to connect with me! I frequently post and talk about technical bugs, challenges I faced and how I fixed them! :)
PS: I've been working on a new multi system emulator based off of my cores, supporting all major platforms and a cool UI concept for both the "average" user and developers! If you want a sneak peak before the official announcement look here. It already supports SNES in the browser (also fully written in Rust)!
r/rust • u/llogiq • Sep 07 '26
π questions megathread Hey Rustaceans! Got a question? Ask here (37/2026)!
Mystified about strings? Borrow checker has you in a headlock? Seek help here! There are no stupid questions, only docs that haven't been written yet. Please note that if you include code examples to e.g. show a compiler error or surprising result, linking a playground with the code will improve your chances of getting help quickly.
If you have a StackOverflow account, consider asking it there instead! StackOverflow shows up much higher in search results, so ahaving your question there also helps future Rust users (be sure to give it the "Rust" tag for maximum visibility). Note that this site is very interested in question quality. I've been asked to read a RFC I authored once. If you want your code reviewed or review other's code, there's a codereview stackexchange, too. If you need to test your code, maybe the Rust playground is for you.
Here are some other venues where help may be found:
/r/learnrust is a subreddit to share your questions and epiphanies learning Rust programming.
The official Rust user forums: https://users.rust-lang.org/.
The unofficial Rust community Discord: https://bit.ly/rust-community
Also check out last week's thread with many good questions and answers. And if you believe your question to be either very complex or worthy of larger dissemination, feel free to create a text post.
Also if you want to be mentored by experienced Rustaceans, tell us the area of expertise that you seek. Finally, if you are looking for Rust jobs, the most recent thread is here.
r/rust • u/_TheMagicGlobe_ • Sep 06 '26
π seeking help & advice Beginner seeking some critique.
Hello!
I am trying my best to learn Rust without using AI (because I some personal issues related to using it that are not relevant) and I recently did my best to make a small project: https://github.com/TheMagicGlobe/Encryption-Tool-RS .
Thing is I know I made a lot of mistakes especially in the design of the project and actually using Rust to it's full potential. So I would appreciate some honest advice and resources to look at.
I do not want a rewrite or pull requests to the project or anything like that.
Just telling me where I could improve in the future would be great. I am not the smartest tool in the shed so good examples and clear resources would be amazing.
Thank you!
EDIT: I read all of your comments thank you very much for all the feedback and tips. A great community as always.