I'm trying to move from Go to Rust. In Go, when I call for example AES functions it will automatically use hardware AES instructions if available. (The library contains hardware and fallback implementations.) Or when I want to use popcnt, there's a library and it will detect and automatically use the hardware instruction.
In Rust it seems to be a bit different? I found some crates for hardware AES and for SIMD instruction sets, but it seems I have to provide fallback implementations and use
And then there's
target_feature, both as an attribute in the code and as a command line option, but it's not clear to me when I have to use which one?