Skip to content

Add cygwin support #568

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

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Conversation

Berrysoft
Copy link
Contributor

This PR makes it compile on cygwin.

Copy link
Collaborator

@Thomasdezeeuw Thomasdezeeuw left a comment

Choose a reason for hiding this comment

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

Can we add something to the CI to ensure it keeps working?

@Berrysoft
Copy link
Contributor Author

Can we add something to the CI to ensure it keeps working?

It actually doesn't work all the time, because of bugs of cygwin. To be specific, the test unix hangs. Is it OK to ignore this test on cygwin and add a job to CI?

@Berrysoft
Copy link
Contributor Author

The maintainer of cygwin told me a workaround for the test unix. I have commited it.

@Berrysoft
Copy link
Contributor Author

@Thomasdezeeuw ping?

@Berrysoft
Copy link
Contributor Author

Could you review this PR again? @Thomasdezeeuw

@Berrysoft Berrysoft requested a review from Darksonn May 11, 2025 14:19
@Berrysoft
Copy link
Contributor Author

@Thomasdezeeuw @Darksonn Would you review again? This PR is the last blocker to build cargo on cygwin.

@Thomasdezeeuw
Copy link
Collaborator

@Thomasdezeeuw @Darksonn Would you review again? This PR is the last blocker to build cargo on cygwin.

I'm sorry to be blocking you, I've just been really busy lately and have very little spare time to review stuff (also see any pr on this repo). I'll try to give it a proper review again, but I can't promise anything.

fmease added a commit to fmease/rust that referenced this pull request May 18, 2025
Cygwin support in rustc

This PR builds host rustc targeting cygwin.

- [x] rust-lang/stacker#122
- [x] nagisa/rust_libloading#173
- [x] Detegr/rust-ctrlc#131
- [x] rust-random/getrandom#654
- [x] msys2/MSYS2-packages#5350
- [x] rust-lang#140886
- [x] rust-lang#140921
- [x] rust-lang#140973

Currently supported:
* rustc
* rustdoc
* rustfmt
* clippy

Blocking:
* cargo: blocked by rust-lang/socket2#568
* rust-analyzer: needs `cargo update`, fixed upstream

```
$ rustc --version --verbose
rustc 1.88.0-dev
binary: rustc
commit-hash: unknown
commit-date: unknown
host: x86_64-pc-cygwin
release: 1.88.0-dev
LLVM version: 20.1.4
```
fmease added a commit to fmease/rust that referenced this pull request May 18, 2025
Cygwin support in rustc

This PR builds host rustc targeting cygwin.

- [x] rust-lang/stacker#122
- [x] nagisa/rust_libloading#173
- [x] Detegr/rust-ctrlc#131
- [x] rust-random/getrandom#654
- [x] msys2/MSYS2-packages#5350
- [x] rust-lang#140886
- [x] rust-lang#140921
- [x] rust-lang#140973

Currently supported:
* rustc
* rustdoc
* rustfmt
* clippy

Blocking:
* cargo: blocked by rust-lang/socket2#568
* rust-analyzer: needs `cargo update`, fixed upstream

```
$ rustc --version --verbose
rustc 1.88.0-dev
binary: rustc
commit-hash: unknown
commit-date: unknown
host: x86_64-pc-cygwin
release: 1.88.0-dev
LLVM version: 20.1.4
```
bors added a commit to rust-lang-ci/rust that referenced this pull request May 18, 2025
Cygwin support in rustc

This PR builds host rustc targeting cygwin.

- [x] rust-lang/stacker#122
- [x] nagisa/rust_libloading#173
- [x] Detegr/rust-ctrlc#131
- [x] rust-random/getrandom#654
- [x] msys2/MSYS2-packages#5350
- [x] rust-lang#140886
- [x] rust-lang#140921
- [x] rust-lang#140973

Currently supported:
* rustc
* rustdoc
* rustfmt
* clippy

Blocking:
* cargo: blocked by rust-lang/socket2#568
* rust-analyzer: needs `cargo update`, fixed upstream

```
$ rustc --version --verbose
rustc 1.88.0-dev
binary: rustc
commit-hash: unknown
commit-date: unknown
host: x86_64-pc-cygwin
release: 1.88.0-dev
LLVM version: 20.1.4
```
fmease added a commit to fmease/rust that referenced this pull request May 18, 2025
Cygwin support in rustc

This PR builds host rustc targeting cygwin.

- [x] rust-lang/stacker#122
- [x] nagisa/rust_libloading#173
- [x] Detegr/rust-ctrlc#131
- [x] rust-random/getrandom#654
- [x] msys2/MSYS2-packages#5350
- [x] rust-lang#140886
- [x] rust-lang#140921
- [x] rust-lang#140973

Currently supported:
* rustc
* rustdoc
* rustfmt
* clippy

Blocking:
* cargo: blocked by rust-lang/socket2#568
* rust-analyzer: needs `cargo update`, fixed upstream

```
$ rustc --version --verbose
rustc 1.88.0-dev
binary: rustc
commit-hash: unknown
commit-date: unknown
host: x86_64-pc-cygwin
release: 1.88.0-dev
LLVM version: 20.1.4
```
bors added a commit to rust-lang-ci/rust that referenced this pull request May 18, 2025
Cygwin support in rustc

This PR builds host rustc targeting cygwin.

- [x] rust-lang/stacker#122
- [x] nagisa/rust_libloading#173
- [x] Detegr/rust-ctrlc#131
- [x] rust-random/getrandom#654
- [x] msys2/MSYS2-packages#5350
- [x] rust-lang#140886
- [x] rust-lang#140921
- [x] rust-lang#140973

Currently supported:
* rustc
* rustdoc
* rustfmt
* clippy

Blocking:
* cargo: blocked by rust-lang/socket2#568
* rust-analyzer: needs `cargo update`, fixed upstream

```
$ rustc --version --verbose
rustc 1.88.0-dev
binary: rustc
commit-hash: unknown
commit-date: unknown
host: x86_64-pc-cygwin
release: 1.88.0-dev
LLVM version: 20.1.4
```
@Berrysoft
Copy link
Contributor Author

@Thomasdezeeuw

I'm sorry to be blocking you, I've just been really busy lately and have very little spare time to review stuff...

Well, it's OK. Anyone has their busy time:)

It seems that you're the only active maintainer of this repo...? It's a little surprising because, I thought that the rust crates team should maintain such fundamental crate more actively:)

github-actions bot pushed a commit to rust-lang/rustc-dev-guide that referenced this pull request May 19, 2025
Cygwin support in rustc

This PR builds host rustc targeting cygwin.

- [x] rust-lang/stacker#122
- [x] nagisa/rust_libloading#173
- [x] Detegr/rust-ctrlc#131
- [x] rust-random/getrandom#654
- [x] msys2/MSYS2-packages#5350
- [x] rust-lang/rust#140886
- [x] rust-lang/rust#140921
- [x] rust-lang/rust#140973

Currently supported:
* rustc
* rustdoc
* rustfmt
* clippy

Blocking:
* cargo: blocked by rust-lang/socket2#568
* rust-analyzer: needs `cargo update`, fixed upstream

```
$ rustc --version --verbose
rustc 1.88.0-dev
binary: rustc
commit-hash: unknown
commit-date: unknown
host: x86_64-pc-cygwin
release: 1.88.0-dev
LLVM version: 20.1.4
```
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request May 19, 2025
Cygwin support in rustc

This PR builds host rustc targeting cygwin.

- [x] rust-lang/stacker#122
- [x] nagisa/rust_libloading#173
- [x] Detegr/rust-ctrlc#131
- [x] rust-random/getrandom#654
- [x] msys2/MSYS2-packages#5350
- [x] rust-lang/rust#140886
- [x] rust-lang/rust#140921
- [x] rust-lang/rust#140973

Currently supported:
* rustc
* rustdoc
* rustfmt
* clippy

Blocking:
* cargo: blocked by rust-lang/socket2#568
* rust-analyzer: needs `cargo update`, fixed upstream

```
$ rustc --version --verbose
rustc 1.88.0-dev
binary: rustc
commit-hash: unknown
commit-date: unknown
host: x86_64-pc-cygwin
release: 1.88.0-dev
LLVM version: 20.1.4
```
@Berrysoft Berrysoft requested a review from Darksonn May 21, 2025 12:16
Comment on lines +204 to +205
/// On Cygwin, a Unix domain socket connect blocks until the server accepts
/// it. If the behavior is not expected, try `Socket::set_no_peercred`.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's have working links. (here and accept)

Suggested change
/// On Cygwin, a Unix domain socket connect blocks until the server accepts
/// it. If the behavior is not expected, try `Socket::set_no_peercred`.
/// On Cygwin, a Unix domain socket connect blocks until the server accepts
/// it. If the behavior is not expected, try [`Socket::set_no_peercred`].

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, no. set_on_peercred is only available on cygwin, so rustdoc warns on other platforms.

Co-authored-by: Alice Ryhl <aliceryhl@google.com>
@Berrysoft Berrysoft requested a review from Darksonn May 22, 2025 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants