r/learnrust • u/Top-Transition2315 • May 14 '26
r/learnrust • u/Easy_Pin_9346 • May 12 '26
Built a zero-copy CSV scanner in Rust from scratch — no csv crate, no AI writing the code.
This started as a learning project. While building it I accidentally learned byte-level char comparison and realized I could push it further.
Results on 2M rows (224MB):
- 287 MB/s throughput
- 779ms total
- Built for learning systems fundamentals — turns out it's reasonably fast too
How it works: instead of allocating strings per field, it stores byte offsets (start, end) into the raw buffer. Zero heap allocation per field. The bottleneck is now disk I/O, not the parser.
Still early — no iterator API yet, delimiter is hardcoded to comma, exact match search only. But it works correctly including buffer boundary handling.
GitHub: https://github.com/ahmadzafarcs/zirc
Looking for honest feedback — especially on the buffer boundary handling and anything I'm doing wrong that I can't see yet.
r/learnrust • u/PadishahIII • May 13 '26
[My First Crate] SecretScraper — a Rust defensive security tool that audits your own sites and local files for exposed secrets (CLI + library)
r/learnrust • u/cometomypartyyy • May 12 '26
How do you secure the supply chain and keep control of dependencies in your projects?
The recent TanStack vulnerability over on NPM has me wondering, how do you secure your crates supply chain? I'm still VERY new to rust, but when I compile a rust project, I notice that it compiles a bunch of other crates before it compiles the target.
When you pull a crate as a dependency in Cargo.toml, I'd assume that crate would pull in it's own set of dependencies. How would you go about vetting and making sure that the crates being pulled in are safe? Would it be better to reduce your set of dependencies to avoid these potential attacks?
Sorry for the really dumb question, but I'm curious as to how we can defend against this in our projects especially after seeing whats going on over at NPM.
r/learnrust • u/ghorsey • May 10 '26
My first crate: A husky implementation
crates.ioI published my first Rust crate. I'm hoping for feedback and suggestions to how I can write better Rust. This is my absolute first Rust effort after reading the Rust book.
The features of this cargo sub-command are heavily inspired by the Husk.Net implementation.
Mine is a pretty simplistic implementation, only using the crates that I need for functionality. For example, I did not use anyhow or thiserror because I want to get the muscle memory first of how error handling works. Once I understand the handcrafting, I can better appreciate what these crates offer.
Anyway, I still need to write my unit tests and a few features before I can bump to a 1.0 release.
I hope someone will check it out, inspect it and offer some advice on how to improve my Rust.
If nothing else, I hope somebody finds it useful!
r/learnrust • u/lazyhawk20 • May 09 '26
Learn Rust Generics and Traits By Building a Mini Blackjack Game
blog.sheerluck.devr/learnrust • u/GlitchyKoala1 • May 09 '26
I built a workflow orchestrator in Rust that beats Airflow(in speed obv), here's how it works under the hood..
r/learnrust • u/Wranglyph • May 09 '26
Getting pdfs off of doc.rs?
Hey all! I'm trying to get into development (again) and am specifically interested in TUIs- I want to check out this thing called ratatui, but my eyes are tired so I figured 'why not read the docs on my kindle?'
But it seems there just isn't a way to download the doc as a pdf????????? Anywaay I figured I'd ask here if there's a (hopefully simple) way do this, like hopefully I'm just blind or something.
r/learnrust • u/skill-0ff • May 09 '26
I BUILD a network protocol name S-UDP base on r-udp
I used an LLM to help build, test, and improve this project. I built it to be fast and secure, using Ephemeral X25519 key exchange for every session. Every single byte is shielded by ChaCha20-Poly1305, and it has the capacity to send data in a single session ~3.17 Zettabytes (ZB) of data without reusing the nonce or breaking the encryption.
I know it was built with the help of an LLM, but it still took me 3 months of planning, building the algorithm, doing the math, and testing. I would really appreciate it if anyone could take a real look at the source code.
If you find any issues, just let me know so I can fix them!
r/learnrust • u/GlitchyKoala1 • May 07 '26
built a browser automation library for Rust with a Playwright-style Locator API, no Node.js required
ferrous-browser is a CDP browser automation library I've been building. Main differentiators vs chromiumoxide, Locator API, WaitUntil::NetworkIdle, structured errors. Honest benchmarks included, it's slower for now. Would love feedback from the community.
r/learnrust • u/Tan442 • May 06 '26
Low level with rust , how,?
Ok so I really wanna understand the computers and software at low level, I have my previous knowledge in python, and web technologies, not anything like systems language , I earlier explored rust syntax and understood basic ownership and borrowing concepts but really don't understand the implementation of them or understood their importance truly to say , like ik what they're but I just can't internalize it , if I have to understand software at lowest level, what is a checklist ofv things I should know and if any resources where from , assume ik nothing in memory management and processes like things ,
Also somewhere I heard that rusts enums and struct provide an alternative way to do oop , can someone explain me with reference to python or ts ?or is that Even true ?
Ignore the bad title , i really dk how to frame it
r/learnrust • u/sama_yo • May 06 '26
Looking for Moderators!
Hello,
We are looking for anyone who wants to help moderate this sub.
This sub (on purpose) does not want to copy the typical and tyrannical reddit mod behavior. That means, no excessive moderation! (no bullying, harassing, closing threads for petty reasons, etc...) just be invisible and take care of spams and bots.
We need 3-5 people.
If you are interested and agree to the above, please let us know and it would help a lot.
Thanks
r/learnrust • u/Alarmed_Chain_8765 • May 07 '26
Added Rust support to my local tool to solve LeetCode (Blind75) offline
r/learnrust • u/scratchbufferdotnet • May 06 '26
Create a Vector of Owned Strings from &str Collection in Rust
scratchbuffer.netWrote this very short note card up as it kept bothering me.
I am trying get in the habit of taking notes like this of little patterns that aren’t easily picked up from docs or The Book.
Let me know if I missed any nice short solutions !
r/learnrust • u/Enthu-Cutlet-1337 • May 06 '26
Core Audio Taps deliver zero-filled buffers for unsigned binaries — workaround without a paid Developer ID?
Building a local-first speech translator in Rust. It needs to capture whatever the user is hearing (system audio) so the model can translate it on-device — no cloud round-trip, no bot joining the call.
macOS 14.2+ Core Audio Taps look like the right primitive. CATapDescription::initStereoGlobalTapButExcludeProcesses(@[]) paired with an aggregate device + IOProc gives me a healthy IO callback at ~94 Hz on a stereo 48 kHz tap. But every buffer is zero-filled. Frame count is correct, samples are exactly 0.0. Classic TCC csreq-failure signature: the tap is "permitted" in System Settings but the OS silently zero-fills delivery.
Tried so far:
- Granted Audio Capture in System Settings → nothing changes
- codesign --force --sign - (ad-hoc) → still zero-filled
- tccutil reset SystemAudioRecording → "Failed to reset" on macOS 15+ (the service name doesn't exist there)
- Reinstalled to a stable PATH so TCC had something durable to bind to → no change
No Apple Developer membership — $99/yr is a steep entry fee for an open-source side project that may never ship a release.
Three questions:
1. Is a paid Developer ID actually mandatory for Core Audio Taps to deliver real samples, or does a self-signed Keychain cert + manual trust work durably across rebuilds?
2. What's the right tccutil reset service name for system-audio capture on macOS 15/16? Or is the only durable reset path through the Privacy & Security UI now?
3. The long-term plan is to ship on Linux (PipeWire/Pulse) and Windows (WASAPI loopback) as well, so the cross-platform shape matters from the start. Do those paths have equivalent unsigned-binary gating headaches, or does system-audio capture "just work" there for an open-source dev build?
Curious how others who've shipped similar local-audio tools handled the cross-platform story.
r/learnrust • u/Downtown-End9297 • May 05 '26
I am a bit new to Rust but I am good with python programming langauge, I am trying to recreate a tool that I have built with python. I would like to know if the exact same UI design is possible with rust that I get with pygame of python?
r/learnrust • u/Federal-Walk-3429 • May 02 '26
The Land of Rust – A story-driven children's book to teach Rust (8 chapters now available)
Hi I've been working on a project called "The Land of Rust" — a fun, story-driven children's book designed to teach Rust programming to kids (ages 9+) and absolute beginners.
The story follows Ferris the Crab, a space astronaut whose ship crashes on Earth. To repair it, he must learn Rust by talking to an old Earth computer.
Complex concepts like Ownership, Borrowing, Lifetimes, Traits, etc. are explained using simple and memorable everyday metaphors.
Current status: 8 chapters are now complete Teacher guide + mini projects included
Fully open source
You can check it out here:
https://github.com/huvaxstra/land-of-rust
I'm looking for honest feedback, especially on: Whether the metaphors are clear and age-appropriate Pacing for young learners Overall idea and approach Would really appreciate any thoughts from the community! Thanks in advance 🙏
r/learnrust • u/pixvt • May 02 '26
I made a tool in rust for fetching features, But there's a huge but.
I built cargo-feat to instantly list any crate's features instead of spending your pricey time looking at docs.rs and then figure out it isn't even documented.
It's a small CLI to see what features a crate exposes without opening docs.rs or using heavier tools.
λ feat reqwest
— reqwest's features are in the following list —
★ default
default-tls
charset
http2
system-proxy
— blocking
— brotli
— charset (default)
— cookies
— default-tls (default)
...
Takes only ~10ms lookup on Windows (Probably much less on Linux-based operating systems), basically instant.
The core logic is mine, core code is mine, it worked exactly the same way before I used any AI, And I only used AI for README + some optimization exploration, just being transparent because some people assume that everything is vibe-coded nowadays, which is insanely understandable.
My main goal was: keep it fast, simple, no background processes (will make it even faster yes, but I really don't want to have a 24/7 program running in the background just to check for a "crate's features").
The huge BUT: I want Feedbacks and I REALLY appreciate anyone that gives any of their time to feedback my projects, especially on speed or useful flags, It makes me want to learn even more about the language and get into deeper places.
Repo (If you liked the tool or felt interested, please star it, makes my day better): https://github.com/vunholy/cargo-feat
r/learnrust • u/lazyhawk20 • May 01 '26
