
Rust-analyzer in a nix shell + vscode, "failed to build proc-macro"
Hi, I’ve recently moved to NixOS on my main computer after trying it on my server and come across a problem with my Rust + Bevy project. I use a flake to manage system dependencies and the rust toolchain as well as rust-analyzer. Using flake-compat I have a shell.nix that I can use with the nixEnvSelector code extension which seems to work fine. rust-analyzer is erroring everywhere I use proc macros with error: “failed to build proc-macro”. There are a bunch of errors in the logs that look lik...
NixOS Discoursenothing like working on a Python codebase you didn't create to make you regret ever using NixOS
always a sad moment when you give in and install GIMP
software that should ship with Claude as a frontend:
- ffmpeg
- NixOS
- virsh
I wish NixOS (the reality) lived up to NixOS (the concept)
incredible how you can break your network with NixOS's configuration and then not be able to unbreak it because `nixos-rebuild` requires the internet and the workarounds for that only work sometimes
rustc is a program for multiplying hundreds of kilobytes of code into dozens of gigabytes of target/ folder
I've been using Mastodon for two years now, but it's still weird to me that boosting a post is an instant action: Twitter and Bluesky have conditioned me to wait for the dropdown. Just one of those weird UX discrepancies, I guess
matklad's old post on how to stay on top of compile time is still relevant:
https://matklad.github.io/2021/09/04/fast-rust-builds.html. He mentions that at the time rust-analyzer plus its transitive dependencies was 1.2 million lines of code and built in 8 minutes on GitHub Actions (notoriously slow). I just did a clean debug build of the latest rust-analyzer and it's 44s for a debug build on my laptop. A clean release build is 70s. I assume it's quite a bit more than 1.2 million lines now, too.
Fast Rust Builds
It's common knowledge that Rust code is slow to compile.
But I have a strong gut feeling that most Rust code out there compiles much slower than it could.
I've used Syncthing with success, but that's a bit more of a hassle for copies that I only need to do once in a while. (Although, in hindsight, I should have set up automated backups a while ago.)