How to specify debug/release profile when building rust using Bazel

I have a rust project that's also a Bazel workspace. I was wondering when I type bazel build, it's built as dev profile or release profile? How can I explicitly specify it?

I haven't ever used Bazel, but I think you can use --compilation_mode (or -c for short) which accepts either fastbuild, dbg or opt.

You're right, bazel build -c opt target works exactly.