cargo-xwinbuild
Cross compile Cargo project to Windows msvc target with ease. (LLVM installation required.)
By using this software you are consented to accept the license at https://go.microsoft.com/fwlink/?LinkId=2086102
Installation
cargo install cargo-xwinbuild
You can also install it using pip:
pip install cargo-xwinbuild
Usage
- Install LLVM, on macOS:
brew install llvm - Install Rust Windows msvc target via rustup, for example,
rustup target add x86_64-pc-windows-msvc - Run
cargo xwinbuild, for example,cargo xwinbuild --target x86_64-pc-windows-msvc
Run tests with wine
With wine installed, you can run tests with the cargo xwintest command,
for example, cargo xwintest --target x86_64-pc-windows-msvc
Customization
The Microsoft CRT and Windows SDK can be customized using the following environment variables or CLI options.
| Environment Variable | CLI option | Description |
|---|---|---|
XWIN_ARCH |
--xwin-arch |
The architectures to include, defaults to x86_64,aarch64, possible values: x86, x86_64, aarch, aarch64 |
XWIN_VARIANT |
--xwin-variant |
The variants to include, defaults to desktop, possible values: desktop, onecore, spectre |
XWIN_VERSION |
--xwin-version |
The version to retrieve, defaults to 16, can either be a major version of 15 or 16, or a <major>.<minor> version |
XWIN_CACHE_DIR |
--xwin-cache-dir |
xwin cache directory to put CRT and SDK files |
CMake Support
Some Rust crates use the cmake crate to build C/C++ dependencies, cargo-xwinbuild will generate a CMake toolchain file automatically to make cross compilation work out of the box.
ninja is required to enable CMake support.
License
This work is released under the MIT license. A copy of the license is provided in the LICENSE file.
Metadata
Release files for cargo-xwinbuild 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| cargo_xwinbuild-0.4.0-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details |
| cargo_xwinbuild-0.4.0-py3-none-win32.whl | Python 3 | none | Windows x86-32 | Details |
| cargo_xwinbuild-0.4.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl | Python 3 | none | Linux glibc 2.17+ ARMv7l | Details |
| cargo_xwinbuild-0.4.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | Python 3 | none | Linux glibc 2.17+ ARM64 | Details |
| cargo_xwinbuild-0.4.0-py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.whl | Python 3 | none | Linux glibc 2.5+ x86-64 | Details |
| cargo_xwinbuild-0.4.0-py3-none-manylinux_2_5_i686.manylinux1_i686.whl | Python 3 | none | Linux glibc 2.5+ x86-32 | Details |
| cargo_xwinbuild-0.4.0-py3-none-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl | Python 3 | none | macOS 11.0+ ARM64, macOS 10.9+ x86-64, macOS 10.9+ universal2 (ARM64, x86-64) | Details |
Total release size: 29.5 MB
Release files / cargo_xwinbuild-0.4.0-py3-none-win_amd64.whl
| Download URL | cargo_xwinbuild-0.4.0-py3-none-win_amd64.whl |
|---|---|
| Size | 2.7 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
fd6a82d0defe449adcb5f579cc2cebeb403747d105d7545aaa333c8ea6a34549
|
|
BLAKE2b-256 checksum How to use checksums |
cb184f8efbe87867c2e42a86d7fffc31ece58fbdb837f5079d02e309d4e1cf7c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/0.12.9
|
Release files / cargo_xwinbuild-0.4.0-py3-none-win32.whl
| Download URL | cargo_xwinbuild-0.4.0-py3-none-win32.whl |
|---|---|
| Size | 2.5 MB |
| Tags | Python 3 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
f05567ef8de69c27f12df1ec805e28aab6c766bae313c6a597a1f6857ec02a1f
|
|
BLAKE2b-256 checksum How to use checksums |
6edc72812367587d7247c58594ce41282990d243caaf632576d7c653a20e6ea2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/0.12.9
|
Release files / cargo_xwinbuild-0.4.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
| Download URL | cargo_xwinbuild-0.4.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl |
|---|---|
| Size | 4.5 MB |
| Tags | Linux glibc 2.17+ ARMv7l Python 3 |
|
SHA-256 checksum How to use checksums |
88aa428bf48e2c0fbd10192eac8dda18fe1ca107c4934205d8f3e5d7f6a01ad7
|
|
BLAKE2b-256 checksum How to use checksums |
f197c50075ccaa9aea26f0abd283ab8538334c536d46839ff302b97145f3d964
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/0.12.9
|
Release files / cargo_xwinbuild-0.4.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | cargo_xwinbuild-0.4.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 4.4 MB |
| Tags | Linux glibc 2.17+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
3909201554f800df256cabe79aafbae3bfd5a89a09bd4ff5b17aed579a8a4e78
|
|
BLAKE2b-256 checksum How to use checksums |
32e9008f3bf6f66185b4d5f57b06f3e7846e69e03a53c9d8066a5e4560b1e64a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/0.12.9
|
Release files / cargo_xwinbuild-0.4.0-py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.whl
| Download URL | cargo_xwinbuild-0.4.0-py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.whl |
|---|---|
| Size | 4.6 MB |
| Tags | Linux glibc 2.5+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
683f47dbfc933ce3760c0634ae0139189f03f914af91b1958caaf03a3e9135a0
|
|
BLAKE2b-256 checksum How to use checksums |
5e74ec578579f5c24d19aac88f75b398614c2ce372002aced441c9dee1f6af07
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/0.12.9
|
Release files / cargo_xwinbuild-0.4.0-py3-none-manylinux_2_5_i686.manylinux1_i686.whl
| Download URL | cargo_xwinbuild-0.4.0-py3-none-manylinux_2_5_i686.manylinux1_i686.whl |
|---|---|
| Size | 4.7 MB |
| Tags | Linux glibc 2.5+ x86-32 Python 3 |
|
SHA-256 checksum How to use checksums |
96a0faedf1325bf1f4fcafcc5b1c20380512ddb86a15af36be61ec7332361a72
|
|
BLAKE2b-256 checksum How to use checksums |
eba01638ca3fdbda6f57179d7fe12f929130e0e4d9cffb5a63db4670bcb4ec0c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/0.12.9
|
Release files / cargo_xwinbuild-0.4.0-py3-none-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
| Download URL | cargo_xwinbuild-0.4.0-py3-none-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl |
|---|---|
| Size | 6.1 MB |
| Tags | Python 3 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
b46ca34f1d08ba3ad540ebc4cdfb298b7092262c21da4e4f972ecb26b4a67dbb
|
|
BLAKE2b-256 checksum How to use checksums |
30b14554416866b9608475972f16da438649129e4339b363bd6478246d553b9d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/0.12.9
|