Have rules_rust specify the amount of memory required for actions
Is your feature request related to a problem? Please describe. rust/private/rustc.bzl:2060 passes resource_set = get_rustc_resource_set(toolchain). Every function in rust/private/rustc_resource_set.bzl returns only a CPU count, e.g. return {"cpu": 1}. rust/private/clippy.bzl:235-246, the ctx.actions.run(mnemonic = "Clippy", ...) call, has no resource_set, so Clippy actions get a default of 250 MB.
This means bazel doesn't properly limit resources based on system memory available because it thinks actions use the default of 250 MB. This can cause an overutilization of resources and crash the actions.
Describe the solution you'd like Specify resource utilization estimates in actions.
Describe alternatives you've considered Cap system CPU or job parallelization. This artificially restricts other action specifications that prescribe the resource requirements appropriately.
Additional context It looks like https://github.com/bazelbuild/rules_rust/pull/3474 started this but nothing picked it up.
I'd be happy to review an additional PR for this that adopted all the feedback on the first PR 😄