Cross compile Cargo project to Windows msvc target with ease
Project description
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
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Hashes for cargo_xwinbuild-0.4.0_beta.1-py3-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a279f26c9891cde6f4a2ff94501c5a243783c8a4ad2840af5bcec183b1560d4e |
|
MD5 | a76622be27263c7a040b72d2833c8e7c |
|
BLAKE2b-256 | 5d7a600f220bb3584405bc42d1bdd126657dd741b2c352cd578c9796e85a814b |
Hashes for cargo_xwinbuild-0.4.0_beta.1-py3-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dcb7d26bb80544939c4bd211330d70b7ce3b2461eb66f68844a0eb0f79817d2a |
|
MD5 | 5007f721d080f1e3334d83b8b98d7dee |
|
BLAKE2b-256 | 332249c87b988961a9d47babcf449904015e6497863b759f88cd80b83f9eaa7a |
Hashes for cargo_xwinbuild-0.4.0_beta.1-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99f87abb4004a532b08128826ff65fb7f0fe2692c482ab59cf02c9b344d33218 |
|
MD5 | ae71b504b2720b82f3592401ac982cf6 |
|
BLAKE2b-256 | a99af417a44d2ae6ae35225cb510b8949d4ae9fef2b581d92d23f38e74ee1a5f |
Hashes for cargo_xwinbuild-0.4.0_beta.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4319f9fd88a903a65bd17b985203f14c1d26a7eacacf4bc845770b9fd43f02aa |
|
MD5 | efbaf97481ba45dcedf91943760a549e |
|
BLAKE2b-256 | 1f7852e87a5505c590e41ac047f45c964d374f13d81e12cef10f7ccdeffc4dd7 |
Hashes for cargo_xwinbuild-0.4.0_beta.1-py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a38cafd48572a023aea485ad83a851c8c8a05a78f99db4a7600dc7f35bc5ca4 |
|
MD5 | 115bec61cf885de579b722b57256a014 |
|
BLAKE2b-256 | 4fcc6684f4a83fda3e945b3ab5415ffb26c5da0f1e7c05a74365351ffe5eb287 |
Hashes for cargo_xwinbuild-0.4.0_beta.1-py3-none-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e0a36757c0c2d31af0e95d684b44baa42cfb7f9d114385461261fdcac0bfe169 |
|
MD5 | b255790bea589fc4ab81032b274b3c81 |
|
BLAKE2b-256 | 95740ac1dcc6444cea35febd01fa2674d580573fb473afbcaefc81ca37942755 |
Hashes for cargo_xwinbuild-0.4.0_beta.1-py3-none-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab1143c9f903e8d2266658328a90e4cd715e65986cac834db2cdbadad2d3555a |
|
MD5 | 5412563c917f52429e887787a0838905 |
|
BLAKE2b-256 | 8113702537c141e15edc57d9c73485bf30ae1e22119d2de4a958cbcc636d0029 |