cargo-xwinbuild


Namecargo-xwinbuild JSON
Version 0.4.0 PyPI version JSON
download
home_page
SummaryCross compile Cargo project to Windows msvc target with ease
upload_time2022-03-05 15:01:44
maintainer
docs_urlNone
author
requires_python
licenseMIT
keywords windows cargo msvc
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # cargo-xwinbuild

[![CI](https://github.com/messense/cargo-xwinbuild/workflows/CI/badge.svg)](https://github.com/messense/cargo-xwinbuild/actions?query=workflow%3ACI)
[![Crates.io](https://img.shields.io/crates/v/cargo-xwinbuild.svg)](https://crates.io/crates/cargo-xwinbuild)
[![docs.rs](https://docs.rs/cargo-xwinbuild/badge.svg)](https://docs.rs/cargo-xwinbuild/)
[![PyPI](https://img.shields.io/pypi/v/cargo-xwinbuild.svg)](https://pypi.org/project/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](https://go.microsoft.com/fwlink/?LinkId=2086102)**

## Installation

```bash
cargo install cargo-xwinbuild
```

You can also install it using pip:

```bash
pip install cargo-xwinbuild
```

## Usage

1. Install [LLVM](https://llvm.org), on macOS: `brew install llvm`
2. Install Rust Windows msvc target via rustup, for example, `rustup target add x86_64-pc-windows-msvc`
3. 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](https://github.com/alexcrichton/cmake-rs) crate to build C/C++ dependencies,
cargo-xwinbuild will generate a [CMake toolchain](https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html) file
automatically to make cross compilation work out of the box.

**[ninja](https://ninja-build.org/) 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](./LICENSE) file.


            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "cargo-xwinbuild",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "windows,cargo,msvc",
    "author": "",
    "author_email": "",
    "download_url": "",
    "platform": "",
    "description": "# cargo-xwinbuild\n\n[![CI](https://github.com/messense/cargo-xwinbuild/workflows/CI/badge.svg)](https://github.com/messense/cargo-xwinbuild/actions?query=workflow%3ACI)\n[![Crates.io](https://img.shields.io/crates/v/cargo-xwinbuild.svg)](https://crates.io/crates/cargo-xwinbuild)\n[![docs.rs](https://docs.rs/cargo-xwinbuild/badge.svg)](https://docs.rs/cargo-xwinbuild/)\n[![PyPI](https://img.shields.io/pypi/v/cargo-xwinbuild.svg)](https://pypi.org/project/cargo-xwinbuild)\n\nCross compile Cargo project to Windows msvc target with ease. (LLVM installation required.)\n\n**By using this software you are consented to accept the license at [https://go.microsoft.com/fwlink/?LinkId=2086102](https://go.microsoft.com/fwlink/?LinkId=2086102)**\n\n## Installation\n\n```bash\ncargo install cargo-xwinbuild\n```\n\nYou can also install it using pip:\n\n```bash\npip install cargo-xwinbuild\n```\n\n## Usage\n\n1. Install [LLVM](https://llvm.org), on macOS: `brew install llvm`\n2. Install Rust Windows msvc target via rustup, for example, `rustup target add x86_64-pc-windows-msvc`\n3. Run `cargo xwinbuild`, for example, `cargo xwinbuild --target x86_64-pc-windows-msvc`\n\n### Run tests with wine\n\nWith wine installed, you can run tests with the `cargo xwintest` command,\nfor example, `cargo xwintest --target x86_64-pc-windows-msvc`\n\n### Customization\n\nThe Microsoft CRT and Windows SDK can be customized using the following environment variables or CLI options.\n\n| Environment Variable | CLI option         | Description                                                                                                        |\n|----------------------|--------------------|--------------------------------------------------------------------------------------------------------------------|\n| `XWIN_ARCH`          | `--xwin-arch`      | The architectures to include, defaults to `x86_64,aarch64`, possible values: x86, x86_64, aarch, aarch64           |\n| `XWIN_VARIANT`       | `--xwin-variant`   | The variants to include, defaults to `desktop`, possible values: desktop, onecore, spectre                         |\n| `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 |\n| `XWIN_CACHE_DIR`     | `--xwin-cache-dir` | xwin cache directory to put CRT and SDK files                                                                      |\n\n### CMake Support\n\nSome Rust crates use the [cmake](https://github.com/alexcrichton/cmake-rs) crate to build C/C++ dependencies,\ncargo-xwinbuild will generate a [CMake toolchain](https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html) file\nautomatically to make cross compilation work out of the box.\n\n**[ninja](https://ninja-build.org/) is required** to enable CMake support.\n\n## License\n\nThis work is released under the MIT license. A copy of the license is provided\nin the [LICENSE](./LICENSE) file.\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Cross compile Cargo project to Windows msvc target with ease",
    "version": "0.4.0",
    "split_keywords": [
        "windows",
        "cargo",
        "msvc"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "c7d4f4dc940d0d042a1d7688da99d545",
                "sha256": "b46ca34f1d08ba3ad540ebc4cdfb298b7092262c21da4e4f972ecb26b4a67dbb"
            },
            "downloads": -1,
            "filename": "cargo_xwinbuild-0.4.0-py3-none-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl",
            "has_sig": false,
            "md5_digest": "c7d4f4dc940d0d042a1d7688da99d545",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 6104498,
            "upload_time": "2022-03-05T15:01:44",
            "upload_time_iso_8601": "2022-03-05T15:01:44.118114Z",
            "url": "https://files.pythonhosted.org/packages/30/b1/4554416866b9608475972f16da438649129e4339b363bd6478246d553b9d/cargo_xwinbuild-0.4.0-py3-none-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "c95abed48bc7a627d895be5658732820",
                "sha256": "3909201554f800df256cabe79aafbae3bfd5a89a09bd4ff5b17aed579a8a4e78"
            },
            "downloads": -1,
            "filename": "cargo_xwinbuild-0.4.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "has_sig": false,
            "md5_digest": "c95abed48bc7a627d895be5658732820",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 4366943,
            "upload_time": "2022-03-05T15:01:46",
            "upload_time_iso_8601": "2022-03-05T15:01:46.290083Z",
            "url": "https://files.pythonhosted.org/packages/32/e9/008f3bf6f66185b4d5f57b06f3e7846e69e03a53c9d8066a5e4560b1e64a/cargo_xwinbuild-0.4.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "aefac1a6656f4844a24da441ab6818da",
                "sha256": "88aa428bf48e2c0fbd10192eac8dda18fe1ca107c4934205d8f3e5d7f6a01ad7"
            },
            "downloads": -1,
            "filename": "cargo_xwinbuild-0.4.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl",
            "has_sig": false,
            "md5_digest": "aefac1a6656f4844a24da441ab6818da",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 4508023,
            "upload_time": "2022-03-05T15:01:48",
            "upload_time_iso_8601": "2022-03-05T15:01:48.382942Z",
            "url": "https://files.pythonhosted.org/packages/f1/97/c50075ccaa9aea26f0abd283ab8538334c536d46839ff302b97145f3d964/cargo_xwinbuild-0.4.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "aca37a07a8afddc1ee936b266be1e233",
                "sha256": "96a0faedf1325bf1f4fcafcc5b1c20380512ddb86a15af36be61ec7332361a72"
            },
            "downloads": -1,
            "filename": "cargo_xwinbuild-0.4.0-py3-none-manylinux_2_5_i686.manylinux1_i686.whl",
            "has_sig": false,
            "md5_digest": "aca37a07a8afddc1ee936b266be1e233",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 4674331,
            "upload_time": "2022-03-05T15:01:50",
            "upload_time_iso_8601": "2022-03-05T15:01:50.489369Z",
            "url": "https://files.pythonhosted.org/packages/eb/a0/1638ca3fdbda6f57179d7fe12f929130e0e4d9cffb5a63db4670bcb4ec0c/cargo_xwinbuild-0.4.0-py3-none-manylinux_2_5_i686.manylinux1_i686.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "368cfa478f74a7581380d123e61cc5ce",
                "sha256": "683f47dbfc933ce3760c0634ae0139189f03f914af91b1958caaf03a3e9135a0"
            },
            "downloads": -1,
            "filename": "cargo_xwinbuild-0.4.0-py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.whl",
            "has_sig": false,
            "md5_digest": "368cfa478f74a7581380d123e61cc5ce",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 4615536,
            "upload_time": "2022-03-05T15:01:52",
            "upload_time_iso_8601": "2022-03-05T15:01:52.532229Z",
            "url": "https://files.pythonhosted.org/packages/5e/74/ec578579f5c24d19aac88f75b398614c2ce372002aced441c9dee1f6af07/cargo_xwinbuild-0.4.0-py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "ed52fccc25a23e5d4aa2b4246ba17447",
                "sha256": "f05567ef8de69c27f12df1ec805e28aab6c766bae313c6a597a1f6857ec02a1f"
            },
            "downloads": -1,
            "filename": "cargo_xwinbuild-0.4.0-py3-none-win32.whl",
            "has_sig": false,
            "md5_digest": "ed52fccc25a23e5d4aa2b4246ba17447",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 2514720,
            "upload_time": "2022-03-05T15:01:54",
            "upload_time_iso_8601": "2022-03-05T15:01:54.645778Z",
            "url": "https://files.pythonhosted.org/packages/6e/dc/72812367587d7247c58594ce41282990d243caaf632576d7c653a20e6ea2/cargo_xwinbuild-0.4.0-py3-none-win32.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "a8c72a3e6a81a65524ace474f87c6b47",
                "sha256": "fd6a82d0defe449adcb5f579cc2cebeb403747d105d7545aaa333c8ea6a34549"
            },
            "downloads": -1,
            "filename": "cargo_xwinbuild-0.4.0-py3-none-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "a8c72a3e6a81a65524ace474f87c6b47",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 2709692,
            "upload_time": "2022-03-05T15:01:56",
            "upload_time_iso_8601": "2022-03-05T15:01:56.790795Z",
            "url": "https://files.pythonhosted.org/packages/cb/18/4f8efbe87867c2e42a86d7fffc31ece58fbdb837f5079d02e309d4e1cf7c/cargo_xwinbuild-0.4.0-py3-none-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-03-05 15:01:44",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "cargo-xwinbuild"
}
        
Elapsed time: 0.27438s