Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to newer VC version - at least VS 2015 #2112

Open
rkeithhill opened this issue Mar 6, 2022 · 4 comments
Open

Update to newer VC version - at least VS 2015 #2112

rkeithhill opened this issue Mar 6, 2022 · 4 comments
Labels
help wanted Extra attention is needed packaging/tooling windows Issue is related to the Windows build of bat

Comments

@rkeithhill
Copy link

With this change, the bat choco install would find vcredist 2015-2019 already installed on most Windows 10 systems.

@rkeithhill rkeithhill added the feature-request New feature or request label Mar 6, 2022
@sharkdp
Copy link
Owner

sharkdp commented Mar 6, 2022

Maybe this could be resolved by switching from windows-2019 to windows-2022?

- { target: aarch64-unknown-linux-gnu , os: ubuntu-20.04, use-cross: true }
- { target: arm-unknown-linux-gnueabihf , os: ubuntu-20.04, use-cross: true }
- { target: arm-unknown-linux-musleabihf, os: ubuntu-20.04, use-cross: true }
- { target: i686-pc-windows-msvc , os: windows-2019 }
- { target: i686-unknown-linux-gnu , os: ubuntu-20.04, use-cross: true }
- { target: i686-unknown-linux-musl , os: ubuntu-20.04, use-cross: true }
- { target: x86_64-apple-darwin , os: macos-10.15 }
- { target: x86_64-pc-windows-gnu , os: windows-2019 }
- { target: x86_64-pc-windows-msvc , os: windows-2019 }
- { target: x86_64-unknown-linux-gnu , os: ubuntu-20.04 }
- { target: x86_64-unknown-linux-musl , os: ubuntu-20.04, use-cross: true }

https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources

@sharkdp sharkdp added packaging/tooling windows Issue is related to the Windows build of bat help wanted Extra attention is needed and removed feature-request New feature or request labels Mar 6, 2022
@rkeithhill
Copy link
Author

rkeithhill commented Mar 6, 2022

I'm sorry. I didn't realize this was a Rust-based utility. I see on the Rust repo this issue has come up - see:

rust-lang/rust#26258
rust-lang/rfcs#1061
volks73/cargo-wix#115

From this documentation PR it seems you could statically link the CRT on Windows and then there would be no need of the vcredist. I tried this on a simple Rust "hello world" program and it appears to work:

image

The exe size in bytes increased from 148480 (dynamically linked) to 250368 (statically linked) for a debug build. This might be worth exploring.

Also see these docs on Rust and statically linking CRT.

@sharkdp
Copy link
Owner

sharkdp commented Mar 7, 2022

Thanks. The other option is to use the GNU toolchain. We also deploy executables which are built using that (bat-v0.20.0-x86_64-pc-windows-gnu.zip). There have been past discussions on this topic on this issue tracker. Might be valuable to summarize those here. I don't remember why we don't switch off the MSVC builds completely.

@Hrxn
Copy link

Hrxn commented Mar 28, 2022

Thanks. The other option is to use the GNU toolchain. [..] There have been past discussions on this topic on this issue tracker. Might be valuable to summarize those here. I don't remember why we don't switch off the MSVC builds completely.

Switching off MSVC builds? Does this imply that the GNU builds are somehow more robust, or more performant, or something like that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed packaging/tooling windows Issue is related to the Windows build of bat
Projects
None yet
Development

No branches or pull requests

3 participants