The generated API hash seems to depend on pointer width somehow.
When building for i686-pc-windows-msvc and x86_64-pc-windows-msvc the generated API version hash is different even though the rust source and generated c# (apart form the hash) remains the same.
I believe this is a bug - ABI mismatch on this level will be detected by the operating system - you cannot load a 32-bit library into 64-bit process and vice versa. If otherwise bindings stay the same then hashes should be the same.
In particular, this requires me to modify the generated c# bindings in order to support AnyCPU builds. For that I have to choose at runtime (depending on what architecture I'm running on) which DLL to load and thus I have to adjust the bindings to support 2 different hashes.
The generated API hash seems to depend on pointer width somehow.
When building for
i686-pc-windows-msvcandx86_64-pc-windows-msvcthe generated API version hash is different even though the rust source and generated c# (apart form the hash) remains the same.I believe this is a bug - ABI mismatch on this level will be detected by the operating system - you cannot load a 32-bit library into 64-bit process and vice versa. If otherwise bindings stay the same then hashes should be the same.
In particular, this requires me to modify the generated c# bindings in order to support AnyCPU builds. For that I have to choose at runtime (depending on what architecture I'm running on) which DLL to load and thus I have to adjust the bindings to support 2 different hashes.