75 points BitPirate 2 hours ago 20 comments

mempko 2 hours ago | parent

Honest question for people. I'm a C++ dev and I'm seeing a lot of moves to rust. Everyone is using agents to move stuff to rust and I tried it myself. The amount of insane hardrive space usage (over 90GB of build artifacts that constantly need cleanup) is that normal? What am I doing wrong. Are people seeing advantages after a move to rust that wasn't there in C++ (assuming no new features). Like is your project better after moving to rust in obvious ways?

slopinthebag 2 hours ago | parent

90gb? i've ran cargo clean on a single project and reclaimed over 700gb before.

but i still love rust ofc

ASalazarMX 1 hour ago | parent

Jesus, that makes the JavaScript ecosystem look moderate by comparison!

nicoburns 8 minutes ago | parent

The difference is that this accumulates over time. You'll only get this if you haven't run "clean" for some time (likely months).

pornel 1 hour ago | parent

It's expected. Cargo has very conservative cache cleanup (once per month IIRC).

There's incremental compilation cache that generates lots of churn (although Rust's compilation unit is a crate, "queries" in the compiler are cached individually, creating many cache entries per function per type).

The other half of the disk space is debug info, because abstractions that optimize down to zero runtime code still carry all of their source-level debug info.

These can be adjusted in build profiles if you're ok with coarser debug info or less fine-grained caching.

afdbcreid 1 hour ago | parent

Cargo has no cache cleanup for `target` on stable.

andoowhy 1 hour ago | parent

ranger_danger 1 hour ago | parent

Isn't the advantage memory safety?

When I mentioned, after C++26 failed its vote, that maybe they should use this extra time to focus more on memory safety, I got downvoted instead.

Surely that attitude isn't helping their situation.

jraph 44 minutes ago | parent

You probably read too much into the downvotes, and people who downvoted you in the other thread might not even be the same people deciding on the future of C++.

I didn't downvote you (that's not something I do) but I didn't find your comment particularly relevant or on topic. This disapproval thing and working on memory safety don't seem related at all. Someone told you they had the impression that you were pushing for Rust without mentioning it. Your comment might have felt like you were backseat driving as well. More memory safety in C++ would be cool, but do you have actual ideas on how to achieve this? There are a lot of reasons people could have downvoted you.

You shouldn't worry too much about it though, just relax and forget about it. It's fine. Happens to the best of us.

ahartmetz 38 minutes ago | parent

Shared libraries (i.e. not building every damn dependency) would fix this problem real quick in many situations, but of course, Rust people don't want to commit to an ABI in order to keep their options open. I don't think it makes sense much longer - at this point "can't do shared libraries" seems more like cultural inertia.

Two or so ABI breaks with a few years between them also seem quite survivable.

suriyaG 13 minutes ago | parent

Once I spent a month debugging a UAF bug, in a messy C++ codebase.

With rust, those class of errors are very difficult to arrive at, unless you specifically make it so.

with rust, the "risk" gets moved from runtime to compiletime. I'll take a 1TB build bloat over code crashing in prod. any day.

CitrusFruits 2 hours ago | parent

Ladybird is such an exciting project, really excited to try it out for day to day browsing when they get into Alpha.

quux 2 hours ago | parent

It's very easy to build it yourself if you want to try it right now.

https://github.com/LadybirdBrowser/ladybird/blob/master/Docu...

quux 2 hours ago | parent

Ladybird has been really shaping up over the last month or so, I pull and build the latest bits every morning and use it for low stakes web browsing (HN, news sites, reddit, youtube, blogs, etc.) and it's getting very close to the point where I forget that it's a pre-alpha.

Very exciting to watch a completely new browser/browser engine come together. Reminds me of the early days of Mozilla and Gecko

Posted with Ladybird :)

sashank_1509 38 minutes ago | parent

I suspect in a year or so, an entire browser can be prompted by AI and then it won’t feel all that cool anymore. Unless AI hits a wall soon (unlikely).

moron4hire 52 minutes ago | parent

Would love to see where all the folks from 5 years ago, breathlessly declaring it's futile to start a new browser project, are now and what they are doing with their lives.

anthk 47 minutes ago | parent

>Flatpak

It was about time. BTW, when this gem uses EGui instead of QT6 (nothing against QT, but once everything uses Rust, it will be no reason to keep it) it will shine.

iamnothere 8 minutes ago | parent

Wow, they now beat Safari in tests passed. Catching up to Firefox too. Lots of momentum here.