nbigaouette / onnxruntime-rs

Rust wrapper for Microsoft's ONNX Runtime (version 1.8)
Apache License 2.0
283 stars 100 forks source link

Fix win32 build #70

Closed krazijames closed 3 years ago

krazijames commented 3 years ago

Recently, I had to use onnxruntime crate on Windows 32bit but it doesn't seem to work because there are some mismatched types & function calling conventions between onnxruntime-sys and onnxruntime. So I fixed the binding generation config to use usize instead of u64, and added macros for choosing appropriate function calling conventions according to the target architecture, and also re-enabled CI for i686.

MainRo commented 3 years ago

I was just considering doing the same fix to support arm 32bits target. Hope this PR will be accepted!

krazijames commented 3 years ago

Sorry for late, you merged this! It seems to be already working for downloading a pre-built i686 windows version without any changes. Thank you!

nbigaouette commented 3 years ago

Yeah I had a couple of cycles today so went on and merge this. Thanks for the clarifications, and the contribution!

Version 0.0.12 is released with this.