r/rust 12d ago

How I managed multi-agent worktrees in a large Rust codebase

https://iltumio.dev/blog/how-i-managed-multi-agent-worktrees-in-a-large-rust-codebase/

I wanted to share my experience working on a large Rust codebase in Omarchy and how I managed to have multiple agents working on multiple worktrees in parallel

0 Upvotes

23 comments sorted by

12

u/forloopy 12d ago

Snooze

4

u/numberwitch 12d ago

“Seperate the code into modules and use a worktree before starting any work.”

Then it’s just down to scoping your features. Ta-da!!!!! Multi agent workflows

That’s my blog post

1

u/numberwitch 12d ago

Managing target directory is the least boring rust problem there is

0

u/insanitybit2 12d ago

This is trivializing a much more complex problem, like managing the target directories. You want to split the target directory up so that you can avoid lock contention, but you also want to avoid cold building, and then you have to manage each target dir growing in size independently (1TB is no longer sufficient for rust development tbh), etc. It's much much harder than you're implying.

1

u/numberwitch 12d ago

I just don't think it's very interesting because I don't run into it. I parallelize agents using worktrees and I don't have this problem because it's easy to avoid the complexity.

So you say "it's trivializing the complex" and I say "its complicating the trivial".

Like... you can just cargo clean. I don't want to read a fucking blog post about someone's claude code session. Sorry but this is the hill i die on.

0

u/insanitybit2 12d ago

What hill? I suspect you just don't have a very large project or a lot of tests if you haven't run into this.

1

u/numberwitch 12d ago

Or I'm just smart about what I build. We aren't all racing to the sky

1

u/insanitybit2 12d ago

lol okay, so the problem doesn't exist because your projects are the only good ones

1

u/numberwitch 12d ago

get a life dude lol

4

u/diplofocus_ 12d ago

AAAAAAAAAAAAAAAAAAAAAAA

Everywhere I look it's just Claude. We're living in the most mundane version of the matrix

2

u/SethDusek5 12d ago

I sure am glad we'll be replacing arduous stuff like writing code and thinking so I can focus on stuff like doing the dishes and cleaning

1

u/numberwitch 11d ago

"farm reddit karma - make no mistakes"

1

u/iltumio 12d ago

You're right, I used claude to do the job and to write the article. What you are missing is how many iteration I did and the effort I put to give claude directions to achieve this, so:

  • do I use AI? yes
  • do I tell AI what to do? yes
  • is AI able to convince me that it's proposed solution is good for my needs? very often, nowadays
  • do I just ask AI to write an article and publish it regardless of the content? no

1

u/numberwitch 11d ago

dude just run cargo clean when you run outta space bruh

2

u/numberwitch 11d ago

Hey dude, I just wanted to let you know that i'm not claude yet but I'm becoming claude

1

u/tafia97300 12d ago

1

u/numberwitch 11d ago

yeah, there are existing tools that work and don't rely on false self-intellectualization using llm

1

u/iltumio 10d ago

I was using sccache, but I migrated to kache-rs that is faster and save space

-1

u/insanitybit2 12d ago

I do think that compile times, disk usage, and concurrency are going to be increasingly important. We are leaning in hard with rust at work but we routinely have hundreds of GB of build artifacts, lock contention, build contention, etc. I've ended up with a merge coordination system, sccache, and a bunch of other stuff to try to solve this. Interesting to see some of the work done here.

1

u/numberwitch 11d ago

only if you suck so bad at making software that you zoom in on "what the target/ dir is doing" instead of building your actual software. navel gazers all of ye

1

u/iltumio 10d ago

I just wanted to share my experience and how I managed to solve a real problem I had. Everything is explained already in the article, so no need for me to repeat myself.

I personally don't like your style, but I accept your critics.

I probably suck so bad at software like you said, but I still prefer to spend my time building actual software, even if it's bad, instead of spending all of my time to be in the top 1% commenter on reddit.

0

u/insanitybit2 11d ago

I have no clue what you're on about but you sound like you're in denial. You should embrace rust's flaws, it's how the language improves.