If you are using #rust what do you use as part of your dev environment? What tooling do you think is a must have? Bonus points if you are on #Linux

Not interested in "I use [insert GenAI model] with Rust" type comments.

#AskFedi #dev #rustlang

@Jdm2 nvim with rustacean (rustanalyzer lsp) and a set of plugins. jj vcs. atuin shell history. rg (ripgrep). A custom wrapper (in rust) around claude. pandoc. A customized markdown formatter. D2 for diagrams. uv for the occasional pythonic digression.

Nothing too crazy.

@barries nice. thank you very much!
@Jdm2 Either emacs + rust-analyzer or RustRover. That's pretty much it.

@Jdm2 oh, and maybe not implied already, but rustup is *usually* a must-have for me. I somewhat regularly need to do weird things and rust-toolchain.toml is magic, but only works with rustup installed :)

Also many mainstream distros have *really* out of date compilers.

@ianthetechie that last part. that's what I was fearing.

I got flashbacks from sudo apt-get install python being a 2.x install, not a 3.x one and then spent hours trying to find out why the program suddenly broke when you deployed it to another machine. lol. thanks!

@Jdm2 Yeah, that is my experience on several major Linux distros πŸ˜… Linux is my most common Rust *deployment* target, but most of my development is on macOS or FreeBSD., which have more modern tooling out of the box.

Until the most recent Debian release for example, the packaged Rust compiler was so old that you couldn't build dozens of popular tools I use.

@Jdm2 I have a nix flake I keep reusing to setup my toolchain and things like sqlx and rust-analyzer. I use emacs and the rustic package. But that's about it.

@Jdm2 my setup:
distro: #nixos
shell: #fishshell
env management: #direnv + #nix devshells
history: #atuin
project manager: #cargo
file manager: #yazi
editor: #HelixEditor
lsp: #rustanalyzer + #clippy lints
fmt: #rustfmt
spell ceck: #languagetool
vcs: #git + #gitui (TUI) + #sourcehut

https://git.sr.ht/~sntx/hive

@Jdm2 my devshell might look something like this:

https://git.sr.ht/~sntx/oxzy/tree/0f8af9b94764cb50a897eaef4cf8b23e0bf27df8/item/flake.nix

A flake to pin the whole env reproducibly and rust-overlay to have the most up-to-date rust versions.

https://git.sr.ht/~sntx/oxzy/tree/0f8af9b94764cb50a897eaef4cf8b23e0bf27df8/item/.nix/shell.nix

I pull my from my rust-toolchain.toml to select the components, targets, version, ... I want.

And this is where I define per-projects deps like gtk4-layer-shell and libadwaita.

@Jdm2 Everything is magically in my PATH and pointing to the right binaries/versions when I cd into the project dir via direnv.

https://git.sr.ht/~sntx/oxzy/tree/0f8af9b94764cb50a897eaef4cf8b23e0bf27df8/item/.envrc

@Jdm2 #Kate does a pretty good job if you are looking for some kind of GUI IDE /power editor. And you will avoid vscode(uim), for the "MS is bad" reason πŸ€ͺ
@Jdm2 I’m using Helix editor on Linux with Rust Analyzer LSP, that’s it. I miss certain features from richer IDEs but wanted something that worked over SSH, and had enough of VS Code releases turning into nothing but AI related additions.
@Jdm2 Helix in Zellij in Fedora Silverblue, sometimes combined with bacon: https://github.com/Canop/bacon
GitHub - Canop/bacon: background code checker

background code checker. Contribute to Canop/bacon development by creating an account on GitHub.

GitHub
@Jdm2 @mo8it this is almost my exact setup
@Jdm2 just vim + cargo + cargo-upgrade is enough for most big and small projects. A few additional third party cargo commands in some cases (cargo-llvm-cov, cargo-flamegraph, cargo-insta).

@Jdm2

https://helix-editor.com/ is awesome if you want a highly functional dev environment with minimal distraction

Helix

A post-modern modal text editor.