Rust has fewer gotchas to exploit compared to C. We considered reducing the scope, but ultimately decided to keep the scope pretty broad because writing underhanded code in Rust is hard
Note that using a library keeps the actual code size pretty small. You can't introduce underhandedness into the library (unless you explicitly fork it). But it gives you the opportunity to introduce underhandedness by misusing a library API, which adds a whole new class of interesting tricks which you can use.
Depending how this one goes, we may reduce the scope for the next ones.
> We considered reducing the scope, but ultimately decided to keep the scope pretty broad because writing underhanded code in Rust is hard
Are we sure of this? The contest may prove otherwise.
Half-jokes aside, it would be surprising if it wasn't significantly harder in Rust than in C, and presumably any glaring problems are easier to address based on the more active nature of Rust development as well as tight feedback between the language development/compiler and the rest of the community (along with Rust's general attitude of "just be careful" not being good enough).
> Are we sure of this? The contest may prove otherwise.
No, we're not. Like I said, this can change in future competitions. It's no big deal if the first one is too easy. If the first one is too hard we may not get submissions and won't know if it is due to lack of interests or if it is too hard.
My baseline for determining this was basically that almost all of the underhanded C submissions use tricks that just can't work in Rust.
Furthermore, remember that the code will be run through clippy too. Many of the gotchas (e.g. Option::iter()) that can be used to create potential underhandedness should get caught by clippy.
But yes, we fully hope to feed back any findings into the compiler/libraries/clippy.
I love that you're using this as feedback into improving the ecosystem. I'll say one thing about the Rust community, they really have their shit together when it comes to stability and things like this.
I don't think I've ever seen a language release new versions with such consistent cadence and predictability.
Note that using a library keeps the actual code size pretty small. You can't introduce underhandedness into the library (unless you explicitly fork it). But it gives you the opportunity to introduce underhandedness by misusing a library API, which adds a whole new class of interesting tricks which you can use.
Depending how this one goes, we may reduce the scope for the next ones.