“cargo run” does in fact flash the dev board. Cargo allows configuring a custom runner, which is what the embassy examples do [0].
[0]: https://github.com/embassy-rs/embassy/blob/main/examples/stm...
[0]: https://github.com/embassy-rs/embassy/blob/main/examples/stm...