Remix.run Logo
▲ knuckleheads 2 days ago

After working on https://github.com/PowderworksCode/headstart and some good conversations with the compiler team, I've been working on finding a way to make big changes to speed up rust while also respecting their wishes around the usage of LLM's. I don't really want to support a vibe slopped fork of rustc/cargo that is full of patches that are pretty much immediately out of date, and I don't think anyone else does either, at least not in a long term dependable way. I also don't feel like recreating daemons from the ground up, I would rather build on top of what already exists and make that compile faster and have better performance.

https://breakneck.powderworks.dev/

It's not done yet nor do I have enticing numbers to show, but I think in a few weeks Breckneck Rust will be someplace nice. For big changes such as getting all crates in the same process, I've been having Claude develop and use a mass static code rewriting tool. So instead of having an agent go and found all the places where LOCAL_CRATE_ID is defined and used, a query finds it and then rewrites can target it and it's surroundings.

My hope is that mass code rewrites are more acceptable to the compiler team, in that they can author, review and debate the rewrites ahead of time without any time pressure. Listening to the team, there were things they might want to do/try (dropping memory, all crates in one process), but the changes are so comprehensive that to do them by hand is effectively a stop the world process. With mass code rewriting tools, it should be possible to rerun the rewrite on main whenever, and as well, any work that others have going on in pr's can likewise be transformed without any impact. This way takes a bit of coordination, but not years and years of it.

Similarly, it's not clear that any of the big changes are actually worth it yet. Maybe dropping memory is a meh, or compiling all the crates at once is not that big a win. I can run this on nightly and keep up to date with what's going on there while experimenting with weird stuff, without wandering out into the wilderness with a hard fork. Maybe there's a way to 100x perf on the other side, and if a pathway can be shown to get there in theory via agents, then the team can find their own path there that fits their attitudes around use or none use of agents and we all benefit. Exciting times!

▲rikarendsmp 2 days ago | parent [-]

Wow that looks really useful, is that going to get upstreamed? I still use the rust compiler all over the place so improvements like that will be very welcome.

▲knuckleheads 2 days ago | parent [-]

Doing my best to do this in such a way that it could be! Can't make any promises at this point. Headstart I don't think could be as it stands, but I have high hopes for Breakneck. As well, I think it'll be possible to offer Breakneck as a continually updated extension of nightly, so it could just be another version of nightly that one could install and use until maybe someday hopefully something like it is upstreamed.