Also this discussion is related:
I wonder if that solution could be implemented to be non-autodocs specific and instead work for wasm in general (maybe via customization).