This is your regular reminder that doas suffers from the exact same conception flaws as sudo.
- It is a suid root binary.
- It parses, as root, a text file that contains global instructions for what user is allowed to run what command as what other user. There is quoting involved. The syntax is not absolutely trivial (though simpler than
sudo's).
Is doas better code? Probably. I trust that it's cleaner than sudo; its configuration file syntax certainly is. Has it been audited more, is it more trustworthy than sudo? Definitely, it comes from OpenBSD, and if there's one thing OpenBSD does well, it's that.
But does it solve the fundamental problem that causes the issues with sudo?
No. It does not.
If you use doas, you are not "choosing the more secure tool", at least not by its conception. You are simply trusting doas to do a better job of not being buggy while performing the exact same tasks as sudo in the exact same dangerous environment.
It is not a bad choice. You are probably right to do that. But you should know what you are doing exactly.
If you choose to use sudo-rs instead, you are still running a suid root binary that performs complex parsing, without the advantages of the simpler doas syntax or the experience of OpenBSD in hardening. You get the benefit of memory safety, but other kinds of bugs are still possible in Rust. You are basically trusting the sudo-rs authors to write a non-buggy sudo - and even with Rust's help, it is probably more difficult than writing a non-buggy doas.
It's a pick your poison situation.
If you want real security instead, you should reconsider your approach to privilege gain, study your use cases, and implement tailored specific solutions. Yes, it is a lot more work, but privilege gain is the single most dangerous thing you can do on Unix, so hardening it takes work.