diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0d8d4bc..b81f744 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -48,13 +48,13 @@ jobs: env: # These are some environment variables that configure the build so that the binary size is reduced. # Inspiration was taken from this blog: https://arusahni.net/blog/2020/03/optimizing-rust-binary-size.html - # They're only enable it on main and releases. + # They only enable it on main and releases. # Enable Link Time Optimization (LTO) for our release builds. This increases link time but drastically reduces # binary size. CARGO_PROFILE_RELEASE_LTO: ${{ needs.metadata.outputs.optimize-build }} - # Use a single code gen unit, this effectively disables parallel linking but ensures that everything is linked + # Use a single code gen unit. This effectively disables parallel linking but ensures that everything is linked # together in a single unit which reduces the file-size at the cost of link time. # Default for a release build is 16 CARGO_PROFILE_RELEASE_CODEGEN_UNITS: ${{ needs.metadata.outputs.optimize-build && 1 || 16 }} @@ -73,11 +73,6 @@ jobs: with: activate-environment: true - - name: Use static CRT on Windows - shell: bash - run: echo "RUSTFLAGS=${RUSTFLAGS} -C target-feature=+crt-static" >> "${GITHUB_ENV}" - if: endsWith(matrix.target, 'windows-msvc') - - name: Rust cache uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 with: diff --git a/Cargo.toml b/Cargo.toml index 27d8583..fd7baf8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -60,3 +60,6 @@ tempfile = "3.10.1" [dev-dependencies] async-std = "1.12.0" rstest = "0.21.0" + +[target.'x86_64-pc-windows-msvc'] +rustflags = ["-C", "target-feature=+crt-static"] diff --git a/pixi.lock b/pixi.lock index 5bce928..1ca7379 100644 --- a/pixi.lock +++ b/pixi.lock @@ -87,6 +87,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/linux-64/nodejs-20.12.2-hb753e55_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/openssl-3.3.0-h4ab18f5_3.conda - conda: https://conda.anaconda.org/conda-forge/noarch/packaging-24.0-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/pkg-config-0.29.2-h36c2ea0_1008.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/noarch/platformdirs-4.2.2-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pluggy-1.5.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pre-commit-3.7.1-pyha770c72_0.conda @@ -208,6 +209,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/linux-aarch64/nodejs-20.12.2-hc1f8a26_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-aarch64/openssl-3.3.0-h68df207_3.conda - conda: https://conda.anaconda.org/conda-forge/noarch/packaging-24.0-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-aarch64/pkg-config-0.29.2-hb9de7d4_1008.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/noarch/platformdirs-4.2.2-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pluggy-1.5.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pre-commit-3.7.1-pyha770c72_0.conda @@ -4910,6 +4912,36 @@ packages: license_family: APACHE size: 49832 timestamp: 1710076089469 +- kind: conda + name: pkg-config + version: 0.29.2 + build: h36c2ea0_1008 + build_number: 1008 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/pkg-config-0.29.2-h36c2ea0_1008.tar.bz2 + sha256: 8b35a077ceccdf6888f1e82bd3ea281175014aefdc2d4cf63d7a4c7e169c125c + md5: fbef41ff6a4c8140c30057466a1cdd47 + depends: + - libgcc-ng >=7.5.0 + license: GPL-2.0-or-later + license_family: GPL + size: 123341 + timestamp: 1604184579935 +- kind: conda + name: pkg-config + version: 0.29.2 + build: hb9de7d4_1008 + build_number: 1008 + subdir: linux-aarch64 + url: https://conda.anaconda.org/conda-forge/linux-aarch64/pkg-config-0.29.2-hb9de7d4_1008.tar.bz2 + sha256: 0d6af1ebd78e231281f570ad7ddd1e2789e485c94fba6b5cef4e8ad23ff7f3bf + md5: 1d0a81d5da1378d9b989383556c20eac + depends: + - libgcc-ng >=7.5.0 + license: GPL-2.0-or-later + license_family: GPL + size: 298687 + timestamp: 1604185362484 - kind: conda name: platformdirs version: 4.2.2 diff --git a/pixi.toml b/pixi.toml index 30ed5b3..502c317 100644 --- a/pixi.toml +++ b/pixi.toml @@ -13,14 +13,15 @@ test = "cargo test" rust = "1.77.2" openssl = "3.*" -[target.linux.activation] -scripts = ["activate-openssl.sh"] +# [target.linux.activation] +# scripts = ["activate-openssl.sh"] # TODO: once https://github.com/prefix-dev/pixi/issues/1481 is fixed, replace with # [activation.env] # OPENSSL_DIR = "$CONDA_PREFIX" [target.linux.dependencies] compilers = ">=1.7.0" +pkg-config = "*" [feature.test.dependencies] conda = "*"