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

Merged
merged 14 commits into from
May 24, 2025
Merged

Add cygwin support #568

merged 14 commits into from
May 24, 2025

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
@Berrysoft Berrysoft requested a review from Darksonn May 22, 2025 06:34
Simplify `cfg`s

Co-authored-by: Alice Ryhl <[email protected]>
@Berrysoft Berrysoft requested a review from Darksonn May 22, 2025 23:18
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.

@Berrysoft apologies again for this taking so long. I have one small nit, which moving the Socket::set_no_peercred function. To not block it any further I pushed it:
926917b, and once the CI is green I'll merge this.

@Berrysoft
Copy link
Contributor Author

@Thomasdezeeuw CI's failing. You see, that's why I move the function out.

@Thomasdezeeuw
Copy link
Collaborator

@Thomasdezeeuw CI's failing. You see, that's why I move the function out.

I'll fix it. The function still has to be in the sys module.

@Berrysoft
Copy link
Contributor Author

Thanks!

@Thomasdezeeuw Thomasdezeeuw merged commit 1fe6c54 into rust-lang:master May 24, 2025
43 of 44 checks passed
@Thomasdezeeuw
Copy link
Collaborator

Thanks @Berrysoft!

@Berrysoft Berrysoft deleted the dev/cygwin branch May 24, 2025 08:55
@Berrysoft
Copy link
Contributor Author

Thank you @Thomasdezeeuw . May I ask about the release plan? When is the next release?

Berrysoft added a commit to Berrysoft/socket2 that referenced this pull request May 24, 2025
Co-authored-by: Alice Ryhl <[email protected]>
Co-authored-by: Thomas de Zeeuw <[email protected]>
@Thomasdezeeuw
Copy link
Collaborator

Thank you @Thomasdezeeuw . May I ask about the release plan? When is the next release?

Not sure yet. I want drop libc from the public API, like we just did with window-sys. Hopefully I have time for that this weekend

Thomasdezeeuw added a commit that referenced this pull request May 24, 2025
Co-authored-by: Alice Ryhl <[email protected]>
Co-authored-by: Thomas de Zeeuw <[email protected]>
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