Skip to content

Instantly share code, notes, and snippets.

@skycoop
skycoop / README.md
Created February 7, 2024 19:43
Wrapping rustc in nice

I'm working with rust on a fairly low end system and was experiencing issues where the system would lock up when running large builds with Cargo. I've solved similar issues in the past with nice but didn't really want to use an alias because it would mess with my build scripts and cargo-watch. Instead of using an alias, this workaround uses a wrapped nice as a wrapper for rustc. nice needed a wrapper because you can't configure a rustc wrapper with arguments, so I wrote envnice to pull the adjustment from an environment variable.

Seems to work pretty well as a solution until rust-lang/cargo#9250 or similar is addressed.

Keybase proof

I hereby claim:

  • I am skycoop on github.
  • I am skycoop (https://keybase.io/skycoop) on keybase.
  • I have a public key ASBSazSlHGb74L2Y2zXaM15G-rvODmv7RHpEp9cYOlRduAo

To claim this, I am signing this object: