Is it possible to configure Cargo so that it expects the Rust source file extension to be something different than ".rs"? Because I, for example, very much prefer ".rust".
So, I want to write something like "mod MyMod;" and implement it in a file called "MyMod.rust".
Related question: Does anybody know what the rationale was behind making ".rs" the default file extension? I'm really curious.
I imagine for someone who has to decide on a "default" file extension for Rust files, the very first idea that must come to mind is ".rust". Isn't that most straight forward, clear, logical? You know at once what the file is concerned with or can easily google it.
The only (weak) point I see in not using ".rust" is to shorten it. But why would one need a file extension even shorter than four letters?? (The days of the three-letters-limit are long over; there are ".kdenlive" files and it's just fine.) Honestly, one barely has to type a whole file name anyway; there is tab-completion on the shell, clicking on file names in an IDE, tools like Cargo that add the extension automatically (see above), etc.; expressiveness is much more important I'd say.
Also, if one really wanted an abbreviation for ".rust", why not use one of the typical schemes like using only the first letters (as in prof for professor) which would have lead to ".rus" or ".ru" (I know that ".r" is already taken) or the first and the last letter (as in dr for doctor) which would have lead to ".rt"?
I'd also say it's "good style" (manners?) to use the name of ones application as file extension for
any new type of file that is used by that application (even if the "application" is a programming
language (i.e. compiler/build tool)). This way one doesn't take away a file extension for a better suited application. Imagine for example that sometime a language called Rustscript comes up
(just like with Java and Javascript) -- it would be a shame if the respective files couldn't have
the file extension ".rs"! By the way, Java source files also end in ".java" not ".jv" ...
Sorry, that this got so verbose but Rust is still a young language and I personally hope that ".rust" will become the most frequently used extension for Rust source files.