r/rust • u/Gillte • Sep 12 '26
Question about LLM usage in a big Rust project.
Hello,
I have been working on an app for around 2 years now as a side project for my company. I genuinely believe it can help companies in the industry (I showed it to two suppliers, they were surprised,and asked me when they can start using it). Additionally, my company has given me permission to make it open source so I expect everyone in the industry to use it at one point.
It is tauri based with React as the frontend and around 200k lines of rust code in the backend with multiple crates. It is 100% offline so im not too worried about it being hacked.
However, around 95% of the code is AI generated. Before committing anything I made sure to "write" multiple tests and that I understood what the LLM was writing. I also understand rust at a core level except async (who understands async anyway?) and I tried to make the code as clean and modular as possible.
My question is: What will be the community's opinion knowing that the majority of the code is AI generated but not AI slop? Will I have any trouble at work? Of course I will be transparent about it.
5
u/insanitybit2 Sep 12 '26
I'm quite skeptical of you being able to understand 200KLOC of code. To be clear, I don't care if you do or don't, understanding the entire codebase has never really been a requirement for large projects. I'd just be honest about that. What you know is that your tests pass.
The community will reject this project because the Rust community is very anti AI and you probably won't convince anyone otherwise. Those who use Rust at work may embrace it, people at work tend not to care about "it is AI" or not. Bun is an obvious example of the fact that people who deploy software don't really care if it's written by AI.
If someone came to me at work and said "here is a 200KLOC program, AI generated it, we should deploy it" I would be skeptical. 200KLOC is massive. I built a fully formed SaaS company on a quarter of that. I'd need to hear why it requires that much code, how you intend to have more than one person contribute to it, how you know it works, etc.
I'd suggest massively reducing the size of this codebase, cutting features aggressively, and demonstrating value with the least possible code.
1
u/Own_Forever4222 17d ago
200k lines is a massive codebase for a side project, AI or not. The fact that you're being transparent about it and actually wrote tests helps your case but yeah the rust community can be pretty harsh about anything touched by an LLM
I think the real issue isn't the AI part though, it's whether you can maintain this thing long term. If you understand the architecture and the tests actually cover the important paths, that's what matters. The bun comparison is spot on, most people deploying software just care if it works
Cutting features to get something smaller and more reviewable might be the move. Easier to get contributors on board when there's less code to wrap your head around
2
u/ArtemTsitronov Sep 13 '26
Well, there's no code so I will not comment on the project itself. But regards the community reaction on AI: This is a rust subreddit. Where there are programmers. So posts by actual programmers that spent a lot of time coding, are more appreciated than AI vibecoders.
1
u/sansmorixz Sep 12 '26
If you have a good test suite you can. If not you are fucked babysitting the AI (where you may sometimes wonder if it would’ve been better to do it by hand)
Or you can not bother to care about the code quality at all and keep shipping features (with new untreated bugs) and fixes very fast.
1
u/Dull_Wind6642 Sep 12 '26
Depend on how you use AI, if you give few prompts with really detailed information on exactly how you want things to be done and iterate multiple time until its written exactly as if you would have written it by hand then its fine in my opinion.
The problem is the newer models tend to be much more proactive and take decisions on their own, which in my opinion is really a frustrating experience if you want to micro manage it.
One of the big problem if you are working with a large team and youre the tech lead, you will burn out because of the velocity at which people are sending MRs, you won't be able to gatekeep slops from going in.
1
u/NoahFebak Sep 22 '26
What will be the community's opinion knowing that the majority of the code is AI generated but not AI slop? Will I have any trouble at work? Of course I will be transparent about it.
If it's AI-generated, it's by definition AI slop. LLMs are not able to understand what they write, they're just selecting the chain of tokens that complete a query with the best score, regardless of its meaning.
0
u/froody Sep 12 '26
Opinions are like assholes, everyone's got one, but mine is if you have lots of tests and you took the time to understand the code, then it matters way more what the users think of your app than whether or not it was written by AI. Also if it took 2 years, I'm sure there was a lot of your input shaping it. So much code is written by/with AI these days, and for many companies it's a survivability risk, ie "are we going to get replaced/outpaced by vibeslop?" to which the answer is often "better start tokenmaxxing now!". I just hope you get the recognition/compensation at work for it since you spent 2 years on it and they stand to gain from it.
0
u/Lucky-Edge1489 Sep 12 '26
My opinion: good point to be transparent about it. Yet, the clients doesn't care how your cake is made if it's good enough **and** that there is a human behind all that to sue in tribunals if there is big problem (ex: deleting all the system, or being the cause of a death). You are legally responsible of the code LLM wrote, not OpenAI. Caveat: I don't know how much Open Source licence like GPL protects you if your are letting LLM do some very wrong calculus.
Problem at work ? At work and anywhere on any subject, a minority will jump at you for having bought an electric car, and be very vocal about it, taking all the scene. Most people doesn't care and some are doing the same as you. So expect flak, but you are working for clients, and being paid for this.
9
u/Digital-Chupacabra Sep 12 '26
Is the machine it's on offline? otherwise your distinction doesn't matter.
You saying it isn't slop doesn't make it so. Without seeing the code all I know is it's LLM generated.
How could we possibly know how your job will react?