rust: Enable required features when executing `main` functions in tasks (#27312)

Closes #13344

This PR causes required features to be read from `cargo metadata` and
enabled when executing an example/bin in Rust.

Release Notes:

- Added enabling required features when executing a Rust example or bin
through a task
4a356466b1Niklas Eicker committed on 4/10/2025, 8:29:07 PM· committed by GitHubparent0921762
1 file changedLine totals unavailable