Rust tools/workflow

Curious which tools other people use for their rust workflow?

I have half switched from vim to hx - at least for rust projects.
Edit files in one terminal tab or tmux pane, have bacon in another and run tests in a 3rd. Bacon is really excellent.

Hx is great too - what I like about it is

  • vim like - but seems a little faster than vim - though vim has always been fast. Partly due to no plugins I guess.
  • easy to set up rust analyzer.

Hx is still missing some features - the two I miss the most are

  • remember last line and jump to it when reopening a file.
  • read a file (:r for vim) into the current buffer

Rust analyzer is generally useful in hx - but has a few kinks, e.g.

  • when typing an opening bracket ({}), it immediately inserts a closing bracket. Half the time I don't need the bracket - and have to go from insert to normal mode to delete it or step over it.
    And if the cursor is on the closing bracket and I insert another closing bracket it just ignores it the first time...really would prefer it didn't do anything clever with brackets.
  • while inputting text, sometimes it overlays text that
    cover the line I'm typing so I can't see what I'm typing or where the cursor is.
1 Like

Cargo, VS Code, rust-analyser, git. What else does one need?

2 Likes

Hello,

I use VSCodium with rust-analyzer.

Also, like in non-Rust projects, I create a Makefile to simplify my workflow. For example, most often, I want to be able to reformat the code and then launch a linter (clippy) and the unit tests, but with one command instead of three.

When the worflow is complex enough, I also use Ninja. Here is an example: rust_pocs/bin_from_ninja at 1.5.44 · DenisNavarro/rust_pocs · GitHub

Remark: I have not studied cargo-make yet: https://crates.io/crates/cargo-make

I use CLion because I'm used to IntelliJ for Java. But VS Code is also good.

I had been using EMACS since the late 1990s (and still do for org-mode) but switched to VSCode over the last year. Rust-analyzer and clangd are sometimes a little bit too noisy for my taste.

I'm a beginner and have tried vscode and sublime text so far. Both have worked really well for my needs. The vscode I only need for debugging.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.