Stabilize and document static dispatch interface
For some libraries I'm writing, I'd like to provide multiple versions of my functions with support for static dispatch, but I don't want to take a dependency on syn, and therefore also no dependency on multiversion. However, I'd like to allow my users, some of whom are willing to depend on multiversion, to benefit from static dispatch when calling into my library.
Would it be possible to stabilize the static dispatch interface, and document it, so that I can manually provide functions that are available to multiversion's static dispatch?
I'm actually working on some fairly large changes, one of which will entirely remove the static dispatch API. Without getting into too much detail, the static dispatch implementation relies on some hacks that are not flexible and have some bad edge cases.
I'm not sure how useful it will be in your particular use case, but the new version will provide some sort of const feature object, that will allow you to do something like
if FEATURES.supports("avx") {
call_avx_fn()
} else {
call_default_fn()
}
While more verbose than the existing static dispatch, I believe this should allow conditionally selecting code (not just functions!) at compile time.