What is the mimetype for Rust source code?

Based on Swap out MIME type for text/rust as introduced into shared-mime-info. by eikehein · Pull Request #6 · rust-lang/kate-config · GitHub and 90487 – Add text/rust for Rust source code (w/ patch) I think it should be text/rust. Am I correct?

It would be text/x-rust until registered with IANA.

Just text/rust. The x- prefix has been deprecated. If you want to get technical, there should probably be a provisional registration until such time as there is actually a Rust spec and two interoperable implementations (or possibly just a syntax spec and implementation) to make a final registration with.

1 Like