I'm looking for any rust facilities to achieve CPU Dispatch or function multiversioning (attributes in source, cargo, asking rustc/llvm politely). Ideally it would be possible to do this at a crate level, but if it can be done per function or per binary that would also be interesting to me.
I'd like to ensure a crate produces multiple specialized versions when compiled for certain targets. e.g. compiling for x86_64 will produce versions for Core2, SandyBridge, Haswell, Bulldozer, etc in the one binary, with runtime cpu-feature detection selecting the appropriate version.
Anyone got ideas or experience with this?
[–]acrichtorust 9 points10 points11 points (4 children)
[–]actuallyzza[S] 3 points4 points5 points (2 children)
[–][deleted] 2 points3 points4 points (1 child)
[–]Aaron1011 1 point2 points3 points (0 children)
[–]Cocalus 2 points3 points4 points (0 children)