Introduction

This book is where I collect various notes about software, mostly focused around Rust.

Editor

I recently set up Neovim, as I was no longer enjoying VS Code. Since the projects that I work on require beefy machines to build/test, I have an AWS instance that I SSH to. For the past few years, I have used VS Code Remote Workspaces. However, the workspace model of separating projects was getting kind of annoying. For example, for rustc, you might want to create a git worktree to keep multiple branches checked out at the same time. This means having to create a new VS Code workspace every time you want to create a new git worktree. I'm not sure if you really have to, but since I want to override certain settings to reference the root of the project, it feels like that's the only way to do so. In comparison, with neovim, I don't really have to care about splitting my directories into projects. For neovim, I set my settings once in the Lua config, and it applies to any copy of rustc that I open up.

Neovim was easy to set up, I mostly just used an existing config that I found in a blog post. That config is tailored for Rust development specifically. I made a few tweaks to the rust-analyzer settings, so that they match the recommended workflow mentioned in the rustc-dev-guide. I also added a few plugins:

  • telescope: a fuzzy finder for file, buffers, search-in-buffer, etc (actually this one was already in the original config, so the only thing I did was set up some keybindings)
  • vinegar: improves the default settings of netrw, which is the build-in directory browser. However, I don't think I'll actually be using netrw much, because telescope does the same thing but better
  • gitsigns: adds a git gutter; also adds other stuff but I don't care about them, I only want the gutter
  • indent-blankline: adds a vertical guide line to help see which lines have the same indentation levels. This one is essential.
  • lualine: an improved statusline. I didn't change any defaults, tbh I'm really lazy with configuration. My days of ricing my arch linux setup ended years and years ago.
  • neogit: basically a port of magit but for neovim. I used magit for many years, so hopefully this one works well. I haven't really tested it out much yet.
  • vim-sneak: useful for jumping around by typing two letters, but honestly, there's a similar plugin for emacs which works much better. The emacs one assigns numbers (or letters? I don't quite remember) to each potential match, so you can jump directly, but with vim-sneak you have to cycle through forwards and backwards to get to the right spot.
  • vim-numbertoggle: switches between regular line numbers and relative line numbers depending on the context

The theme I am using is tokyonight, the night variant.

I don't think I'll really be changing more settings -- this covers like 99% of what I need, and I don't really like editing config files 🫠. If I don't ever have to touch the config again, that would be ideal lol.

Rust

Note: nothing is in a particular order.

Blogs

https://nnethercote.github.io

https://lcnr.de

https://cohost.org/oli###obk

https://smallcultfollowing.com/babysteps

https://www.ncameron.org/blog

https://www.ralfj.de/blog

https://santiagopastorino.com

https://tmandry.gitlab.io/blog

https://yosh.is/writing

https://blog.yoshuawuyts.com

https://jackh726.github.io

https://sabrinajewson.org/blog

Other

https://nnethercote.github.io/perf-book/profiling.html

https://rust-unofficial.github.io/patterns

https://forge.rust-lang.org

https://rust-lang.github.io/api-guidelines/about.html

https://github.com/rust-lang/rust-analyzer/blob/master/docs/dev/style.md

https://rust-lang.github.io/wg-async

https://rust-lang.github.io/compiler-team

https://rustc-dev-guide.rust-lang.org

https://std-dev-guide.rust-lang.org

https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle

https://doc.rust-lang.org/nightly/reference/index.html

https://doc.rust-lang.org/nightly/nomicon/index.html

https://doc.rust-lang.org/nightly/unstable-book/index.html

https://doc.rust-lang.org/nightly/embedded-book/index.html

https://nrc.github.io/error-docs