Cross Compilation
To Windows
From Linux to Windows
If you use Arch Linux or Manjaro, it is piece of cake. Just install the required mingw...
dependencies at will. A lot of them are already packaged:
From macOS to Windows
It relies on then mingw-w64 project. It feels quite abandoned. On the official page they don't even mention Homebrew (brew install mingw-w64
), only MacPorts. What you get there doesn't even include sqlite and you have to compile it yourself. I guess that what you get is what Arch Linux calls "toolchain". For any other thing you need, it is on you to download the source and compile it. Please, correct me if you have updates on this.
Initial setup
Create config file:
Note: everybody mentions .cargo/config
, I assumed it is ~/.cargo/config
.
Build with
SQLite
Luckily, for sqlite you can ask the libsqlite3-sys
crate to use a bundled sqlite
. Add the following to your Cargo.toml
: