"Unrecognized option 'release'" when compiling with rustc in release mode

Viewed 6921

I have a simple .rs file and want to compile it using rustc. I always heard about how important it is to compile in release mode, because otherwise my Rust program will be slow.

However, if I use the often quoted --release flag, it doesn't work. What is everyone talking about if the flag doesn't even exist?

$ rustc --release foo.rs
error: Unrecognized option: 'release'.
1 Answers
Related