r/learnrust • • 8h ago

LiteORM: A schema-first PostgreSQL ORM for Rust (with a native Desktop Studio)

4 Upvotes

Hey r/learnrust,

In Rust, using ORMs like Diesel often means writing raw SQL migrations by hand and managing complex query macros.

I built LiteORM to explore a simpler, schema-first approach:

  1. Define your models once in a declarative liteorm.schema:

​

struct User {
  id     Int32    (autoincrement())
  email  String  
  active Boolean u/default(true)
}
  1. LiteORM does the heavy lifting:
  • liteorm db push auto-diffs against PostgreSQL and runs atomic SQL migrations.
  • liteorm generate generates type-safe Rust structs and query builders.
  • liteorm studio opens a native, cross-platform desktop UI to view/edit data.
  1. Query with compile-time safety:

​

rustlet active_users = db
    .all(User::select().where_(User::ACTIVE.equals(true)).limit(10))
    .await?;

No manual SQL migrations, zero string-concatenation risk (parameterized queries via tokio-postgres), and guards against accidental table wipes on updates/deletes.

Would love any feedback on the Rust API design and architecture!


r/learnrust • • 1h ago

Kavro project

• Upvotes

Hi, i just wanted to share my project for ImGui that also uses Rust, you can create windows with imgui just by drag & drop no code, exporting to Rust code or applying it into your project : D
https://kavro.pro


r/learnrust • • 18h ago

Built my first #![no_std] lock-free hash map in Rust to learn systems programming feedback & code review appreciated 🥀

2 Upvotes

Hey everyone I’ve been experimenting with low-level systems programming in Rust and built a tiny, #![no_std] lock-free map using atomic CAS and open addressing. First time sharing an open source systems project, I’d love to hear your thoughts or code critiques! ❤ the link https://github.com/voryiex/Titan-Cache-Engine


r/learnrust • • 21h ago

LiteORM — A schema-first PostgreSQL ORM and native Desktop Studio for Rust

3 Upvotes

Hey r/rust,

I wanted to share LiteORM, a schema-first, type-safe PostgreSQL ORM for Rust that comes with a built-in cross-platform Desktop Studio.

Coming from ecosystems like Prisma and Drizzle, I missed having a single declarative schema file that handles migrations, generates strictly typed models, and gives you an instant visual GUI to explore your data—all without leaving native Rust.
https://github.com/unixipher/lite-orm


r/learnrust • • 1d ago

Leptos islands + htmx: dropped hydration comments, dead islands, a memory leak

Thumbnail
1 Upvotes

r/learnrust • • 1d ago

Terminal App in Windows, typing results in double output

1 Upvotes

Hi all,

I try to learn rust. I create a client-server chat in pure rust. To get some benefit for the client part I use the crate crossterm in ver 0.29.

On Linux the client work fine, on Windows, there is a strange behavior. Every time I click a char on the keyboard, two of this char printed in the terminal.

It is a full Win11 Installation, no VM.

Any suggestions to this problem?


r/learnrust • • 1d ago

leptos-islands-htmx: Leptos islands that keep working when htmx swaps the page

Thumbnail
1 Upvotes

r/learnrust • • 2d ago

Suggestion to mods

85 Upvotes

Block any post with “I built” or “I made” in the title.

Idgaf about your vibe coded Rust projects. This is a sub to ask questions and seek advice about Rust from people who truly want to understand the language.


r/learnrust • • 1d ago

Advice: for a serializable sealed mailbox envelope, is manual Drop zeroization enough if Clone + retries mutate state?

Thumbnail
1 Upvotes

r/learnrust • • 3d ago

Came from USA to Brazil :)

Post image
104 Upvotes

r/learnrust • • 2d ago

Rust Borrow Checker Bug: 11 Years in the Compiler, Reproduced

Thumbnail youtu.be
0 Upvotes

r/learnrust • • 3d ago

OAuth 2.1 Server Option

2 Upvotes

Following the ArtCraft trend, I created an OAuth 2.1-only authorization server, it is written in Rust and opted for the ISC License. It follows the Internet-Draft published on September 3, 2026, and it is not backwards compatible... I just wanted to start with that.

I'm looking for opinions to decide how to continue at this point and any kind of feedback will be appreciated. =)

https://github.com/Syavne/d-OAuth-Server


r/learnrust • • 3d ago

Quiero aprender Rust, no soy nuevo en programación, pero quisiera que me dieran consejos

Thumbnail
1 Upvotes

r/learnrust • • 3d ago

Building A Clycker Game with MiniJinja and Game Loop with Rust + Axum & ...

Thumbnail youtube.com
2 Upvotes

r/learnrust • • 3d ago

I built cleaner-cli: A fast and lightweight CLI tool written in Rust to clean up developer junk (node_modules, target, .cache, etc.)

Post image
1 Upvotes

r/learnrust • • 4d ago

Plugin system for multi platform rust application

1 Upvotes

Hi, I'm building so I'm making a peer to peer reading tracker that has multiple native clients (one for my Linux laptop and one for my android phone) with a Rust core that handles most of the actual logic and the client being in C and GTK4 for my Linux client and Kotlin for my android app. The thing is I want to have cover source logic behind plugins since that's never really stable and I don't want to have to rebuild my app at every new source I want to add either. Is there a tool that helps with that?

(Sorry if this is a dumb question or if my explanation isn't very clear.)


r/learnrust • • 4d ago

How to Blink your Microcontroller with Rust ft. ESP32-C6

Thumbnail youtu.be
8 Upvotes

r/learnrust • • 4d ago

Rust lifetimes: why they exist and how to actually use them

Thumbnail
1 Upvotes

r/learnrust • • 4d ago

I just had a really interesting discussion about Rust and I'd like your feedback?

Thumbnail youtu.be
0 Upvotes

r/learnrust • • 4d ago

Chapter 4 took me three tries, so I made something to re-explain it

0 Upvotes
Iam learning Rust and chapter 4 took me three tries. The book explains borrowing once and I needed it said again a different way.

So I built a reader. You tap a paragraph and it explains that paragraph, at the level you pick, using only what is printed on that page. If the reason it gives is not quotable from the page it gets removed.

Other AI reading tools I tried would make things up and sound sure about it. Learning from a book that is worse than no answer :))

Screenshot is chapter 4, the double free part. The Rust book is already on the shelf when you sign up, MIT licensed, free, Iam not selling anything.

For people who got through chapter 4 already: does that explanation match how you would have wanted it said? And if you try it, tell me a passage where it is wrong. That is what I need most.

https://app.storysage.business-skyreach.com

r/learnrust • • 6d ago

Rust for algorithmic composition

9 Upvotes

Hello everyone!

I'm a composer looking to learn programming for algorithmic composition.  I know a little Python, but I have no formal programming background.

I've been considering Rust because it seems like future-proof.  But is it a good choice for algorithmic composition...?  I'm thinking of things like generating MIDI and MusicXML files, implementing stochastic processes (Markov chains, etc), and developing tools for various compositional techniques involving rhythm, scales, modes, and other musical constraints.

I'm considering my options with the following goals in mind:

  • I want to generate MIDI files that I can import into my DAW. I don't need sound synthesis.
  • I don't need direct DAW integration, as long as the program can export MIDI files, or MusicXML.
  • I'm willing to invest time in learning to code.
  • I know there is OpenMusic, MaxMSP and similar, but I'd like to build my own standalone tool that I can continually expand and improve.

Would Rust be a good choice, or would I be better off starting with Python or another language?

I'd appreciate any advice, particularly from people who have experience with algorithmic composition and music programming.


r/learnrust • • 5d ago

I open-sourced the Rust agent behind my Linux server monitoring tool (feedback welcome)

0 Upvotes

Hi everyone,

I've been building Doffly, a small monitoring tool for people with a few Linux VPS who don't want to run Prometheus + Grafana just to know if their box is alive.

The dashboard and backend are a hosted (proprietary) service, but I've just open-sourced the agent that runs on your servers under Apache-2.0, so you can see exactly what it collects and sends.

Repo: https://github.com/anelkabag/doffly-agent Site: https://doffly.pro

(Disclosure: I'm the author.)

What the agent does

  • Single Rust binary, musl builds for x86_64 and aarch64
  • Reads /proc and /sys, and calls df, ps, systemctl, docker and ss when available (missing commands just give empty values)
  • Collects CPU (usage, load, temperature), RAM/swap, root filesystem space and inodes, disk I/O, network counters and errors, TCP/UDP counts, uptime
  • Bounded lists per sample: 20 processes, 50 running systemd services, 50 Docker containers, 100 listening sockets
  • Outbound HTTPS only, no inbound ports to open
  • Local JSON health/metrics API on 127.0.0.1:9090, with optional token auth
  • Runs as an unprivileged systemd service (template included)

Security choices

  • Remote Cloud URLs must be HTTPS (loopback HTTP is allowed for dev)
  • Each server gets its own machine-scoped token
  • The local API binds to loopback by default; binding remotely requires an explicit DOFFLY_AGENT_INSECURE_REMOTE=true
  • The README lists exactly what is transmitted (process names/users, container images/ports, listening sockets...) so you can decide if it's acceptable on your hosts

Honest caveats

  • This is the agent only. It talks to Doffly Cloud's ingestion API; it's not a general-purpose exporter (no Prometheus endpoint, no arbitrary backends).
  • Linux only. CI runs on Ubuntu; Debian and others should work but aren't independently verified.
  • It's early (v0.3.0), and this standalone repo is brand new.

Try it without the cloud

DOFFLY_API_URL=http://127.0.0.1:8080 \
DOFFLY_AGENT_ID=local-agent \
cargo run -p doffly-agent -- --details

It prints a host report in the terminal and serves the local API even if nothing is listening on the Cloud URL.

What I'd love feedback on

  • Code review of the collector (robustness when files/commands are missing or weird)
  • The security defaults: anything you'd tighten?
  • Missing metrics you'd expect (per-disk stats? GPU?)
  • Would a Prometheus-compatible local endpoint be useful to you?

Issues and PRs are welcome. Thanks for reading!


r/learnrust • • 5d ago

xlr8 - local GitHub-style web viewer in Rust with sub-millisecond diffs (Axum, gix)

Post image
1 Upvotes

r/learnrust • • 5d ago

Anyone out there used rust instead of golang for cross platform desktop and mobile?

Thumbnail
0 Upvotes

r/learnrust • • 6d ago

RustCurious 11: Reborrowing and Rust's Invisible Lifetimes

Thumbnail youtube.com
13 Upvotes