[COMPILER REQUEST]: `rustfmt` for Rust
Compiler name
rustfmt
Compiler version
The same that CE supports for Rust (i.e. the set of rustfmt versions installed by the set of toolchains already installed for Rust).
Compiler language
Rust
Compiler homepage
Motivation
Support for code formatting was added for Rust by #2798 for issue #2564.
However, it would also be useful to run the tool under different versions and options, i.e. as a compiler.
This would open up new use cases, such as checking out new options and their behavior on sample code, testing the output under different versions for e.g. bug reports, etc.
In the end, it is one more tool that takes code and outputs code, and it is useful to see the behavior under flags, different inputs, diff outputs, etc.
Given the Rust toolchain is already installed in the infrastructure, I guess at most it would require installing the rustfmt component if that is not done per version yet.
The options are typically set in a .rustfmt.toml file, but they can also be toggled via the CLI with --config, thus I think the interface wouldn't need changes in principle.