Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Windows Support#71

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
yodaldevoid wants to merge3 commits intorust-lang:master
base:master
Choose a base branch
Loading
fromyodaldevoid:windows

Conversation

yodaldevoid
Copy link

@yodaldevoidyodaldevoid commentedFeb 7, 2021
edited
Loading

The template uses Windows Server Core as the base image. Nano Server was quickly attempted, but the image did not build correctly, and I didn't put any real time into figuring out why. MSVC and GNU variants are created, though due to licensing issues the MSVC variant should never be pushed to the public Docker Hub. Only Windows Server Core 1809 is supported now as that is the highest version that Github Actions or Travis supports and the Microsoft Build Tools installer doesn't support API versions older than 1709. The GNU variant could be build for older Windows versions, but this currently not implemented.

A big shoutout to@nelsonjchen (sorry for pinging you so much) for his previous work on this which acted as a basis for the eventual implementation.

@yodaldevoidyodaldevoid mentioned this pull requestFeb 7, 2021
@sfackler
Copy link
Member

On the CI side, I think github actions probably makes sense, and we should probably switch the Linux builds over from Travis while we're at it.

@yodaldevoidyodaldevoidforce-pushed thewindows branch 15 times, most recently fromf21e944 to2998932CompareFebruary 14, 2021 07:36
@yodaldevoid
Copy link
Author

Shoutout to@nelsonjchen for his previous work on this. It helped a lot when minimizing the dockerfiles.

I've minimized everything as far as possible without breaking something. I've added in this PR dockerfiles for the MSVC and GNU toolchains. Also, I've moved all of the CI builds over to GitHub Actions. It is crazy how easy it is to reuse the entire testing framework is between all of the versions built.

nelsonjchen reacted with hooray emoji

@yodaldevoidyodaldevoid marked this pull request as ready for reviewFebruary 14, 2021 08:01

FROM mcr.microsoft.com/windows/servercore:1809

SHELL ["powershell.exe", "-NoLogo", "-ExecutionPolicy", "Bypass", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

It looks like golang's image doesn't set-NoLogo or-ExecutionPolicy Bypass:https://github.com/docker-library/golang/blob/master/1.15/windows/windowsservercore-1809/Dockerfile#L10. Do you know why there's a difference there?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I set-NoLogo because I don't see a reason to have the PowerShell version information and copyright info printed at the start of each command as it's just noise.

As for the-ExecutionPolicy Bypass, I think that might be a leftover from another Windows docker tutorial I had followed. I don't see a reason it needs to be kept.

@@ -0,0 +1,72 @@
# escape=`

# IMAGES BUILT FROM THIS DOCKERFILE ARE NOT TO BE SHARED ON PUBLIC DOCKER HUBs.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

The intent of this PR is to produce images that are to be shared on public Docker hubs, right?

Copy link
Author

@yodaldevoidyodaldevoidFeb 15, 2021
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I'm not entirely sure at this point. I had completely missed this license issue until I was reading through@nelsonjchen's implementation. This issue was brought up by them before a few years ago and I didn't see any discussion about it.

I see value in providing a dockerfile for a base Rust on Windows image, but I don't know whether this repo is the right place for that. If we do keep this base dockerfile here, we would just need to make sure not to add it to the manifest file.

nelsonjchen reacted with eyes emoji
@yodaldevoidyodaldevoidforce-pushed thewindows branch 2 times, most recently froma590ae1 toabe18c3CompareFebruary 15, 2021 05:13
@nelsonjchen
Copy link

Could you put "Co-authored-by: Nelson Chen <crazysim@gmail.com>" at the end of the commit messages where I contributed to the Dockerfiles?

yodaldevoid reacted with thumbs up emoji

yodaldevoidand others added2 commitsFebruary 15, 2021 00:22
This dockerfile cannot be pushed to public hubs due to licensingrestrictions, but we might as well provide the dockerfile for others andtest against it. Please see the comment at the top of the MSVC templatefile for more information.Co-authored-by: Nelson Chen <crazysim@gmail.com>
Co-authored-by: Nelson Chen <crazysim@gmail.com>
@lippertmarkus
Copy link

How can we bring this forward?

@yodaldevoid
Copy link
Author

@lippertmarkus I think the one open question is if we want to have the MSVC toolchain dockerfile/template in this repo despite the fact that it can currently never be uploaded to Docker Hub.

I could split this PR up so that all changes but the MSVC toolchain can be merged now.

@lippertmarkus
Copy link

IMHO it should be enough to state at the Docker Hub page that by using the image one agrees to the terms of the MSVC toolchain. Can you just open an issue athttps://github.com/microsoft/Windows-Containers/issues asking whether it's fine to include the toolchain to provide an official Rust image for Windows? I mean this also helps them to further emerge Windows Containers

@yodaldevoid
Copy link
Author

@lippertmarkus I will ask, but going off of paragraph four ofthis official blog post (which is called out in the big wall of text in the MSVC Dockerfile), any Dockerfiles with the MSVC build tools are only meant for personal use or use within a organization. They even explicitly note that you should not upload containers containing the MSVC build tools to a public Docker hub.

@lippertmarkus
Copy link

Thanks for sharing. That's interesting as Microsoft is using the Build Tools in their official dotnet framework docker images (https://github.com/microsoft/dotnet-framework-docker/blob/3b2ac5bcda7603b94c0b6399355f3d0c0c1eb512/src/sdk/4.8/windowsservercore-1909/Dockerfile#L21-L30) and that would mean you wouldn't be allowed to use those official images without having a Visual Studio License 😄

Let's see what they're saying.

nelsonjchen and nomius10 reacted with laugh emoji

@lippertmarkus
Copy link

I createdmicrosoft/Windows-Containers#102

yodaldevoid reacted with thumbs up emoji

@yodaldevoid
Copy link
Author

yodaldevoid commentedMar 17, 2021
edited
Loading

I createdmicrosoft/Windows-Containers#102

Thank you for that. My free time suddenly disappeared last week and this fel by the wayside.

@sfackler
Copy link
Member

sfackler commentedMar 19, 2021
edited
Loading

Hey, sorry for dropping this for a while!

The main concern is around the licensing of the VS components as you've been discussing upthread. It seems a bit unfortunate to only publish a GNU-based image as MSVC has been the recommended Windows target for quite a while. If we just can't publish an MSVC image then I guess that's the best we can do, but hopefully the licensing situation is a bit less drastic than that initial post makes it sound :)

@lippertmarkus
Copy link

seems like we can't continue this work (seemicrosoft/Windows-Containers#102) 😞

@yodaldevoid
Copy link
Author

seems like we can't continue this work (seemicrosoft/Windows-Containers#102) 😞

Well, to be specific, we can't upload any Docker image created from the MSVC Dockerfile to Docker Hub. We could keep an example template in this or another repo, which I think has a lot of value. All the other changes made by this PR should be fine, however.

lippertmarkus and NuSkooler reacted with thumbs up emoji

@lippertmarkus
Copy link

lippertmarkus commentedDec 3, 2021
edited
Loading

Without any official image to build rust binaries, I'm now cross-building my Windows container images on Linux instead:#30 (comment)

@haxtibal
Copy link

haxtibal commentedJul 1, 2022
edited
Loading

To my understanding, solvingrust-lang/rust#71520 would reopen the door for this PR here.

This PR seems stalled because itdepends on vs_buildtools.exe andredistribution of the VS Build Tools is not permitted. In turn, VS Buildtools are required because Rust uses theirlink.exe as default linker. Withrust-lang/rust#71520, VS Buildtools would no longer be required. Instead, Rusts copy oflld would be used. Such an image would be good for public upload.

In most situations it's possible to uselld forx86_64-pc-windows-msvc by now. We could do some preliminary trials by setting

[target.x86_64-pc-windows-msvc]linker ="rust-lld"

orCARGO_TARGET_X86_64_PC_WINDOWS_MSVC_LINKER="rust-lld".

What do you think?

EDIT: This was probably too optimistic. As@ChrisDentonpoints out,link.exe is not the only dependency. While mostrust-lang/libc functions are provided via ucrtbase (distributed with windows), a few symbols are still required from vcruntime.

nelsonjchen reacted with eyes emoji

@ChrisDenton
Copy link
Member

See alsothis internals thread for an overview. In short, vcruntime may one day be made open source, which would help solve issues such as this, but that day isn't today.

haxtibal and yodaldevoid reacted with thumbs up emojinelsonjchen reacted with eyes emoji

@yodaldevoid
Copy link
Author

In short, vcruntime may one day be made open source, which would help solve issues such as this, but that day isn't today.

It looks like the Microsoft team that was pushing for this has abandoned the effort. See the paragraph at the bottom ofthis comment.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@sfacklersfacklersfackler left review comments

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

6 participants
@yodaldevoid@sfackler@nelsonjchen@lippertmarkus@haxtibal@ChrisDenton

[8]ページ先頭

©2009-2025 Movatter.jp