Skip to content

feat: add cygwin support - #2610

Merged
SteveLauC merged 13 commits into
nix-rust:masterfrom
Berrysoft:dev/cygwin
Mar 25, 2025
Merged

feat: add cygwin support#2610
SteveLauC merged 13 commits into
nix-rust:masterfrom
Berrysoft:dev/cygwin

Conversation

@Berrysoft

@Berrysoft Berrysoft commented Feb 25, 2025

Copy link
Copy Markdown
Contributor

What does this PR do

This PR adds cygwin target support.

Tracking:

Checklist:

  • I have read CONTRIBUTING.md
  • I have written necessary tests and rustdoc comments
  • A change log has been added if this PR modifies nix's API

@Berrysoft
Berrysoft marked this pull request as ready for review March 7, 2025 16:13
@Berrysoft
Berrysoft marked this pull request as draft March 8, 2025 14:56
@Berrysoft
Berrysoft marked this pull request as ready for review March 10, 2025 10:15
@Berrysoft

Copy link
Copy Markdown
Contributor Author

The CI is broken:(

@Berrysoft
Berrysoft marked this pull request as draft March 12, 2025 01:45
@Berrysoft
Berrysoft marked this pull request as ready for review March 12, 2025 05:57
@SteveLauC

Copy link
Copy Markdown
Member

The CI is broken:(

Weird, let me take a look

@Berrysoft

Copy link
Copy Markdown
Contributor Author

Weird, let me take a look

Hello, @SteveLauC , if you are still looking at this:) I think it's because the latest version of once_cell updates its MSRV to 1.70, larger than the MSRV of nix, 1.69.

@SteveLauC

Copy link
Copy Markdown
Member

I think it's because the latest version of once_cell updates its MSRV

So was this newer version of once_cell updated by the libc crate?

@Berrysoft

Copy link
Copy Markdown
Contributor Author

So was this newer version of once_cell updated by the libc crate?

I don't think so. libc doesn't depend on once_cell. It is tempfile.

This repo doesn't commit the Cargo.lock. In the CI, cargo tries to find the latest version that satisifies the Cargo.toml, without considering the rust-version field in Cargo.toml (this problem has been solved with resolver 3, which is the default resolver in edition 2024).

However, it seems that once_cell published a new release recently to decrease the MSRV to 1.65. So a re-run of CI should solve the problem:)

@SteveLauC

Copy link
Copy Markdown
Member

Just re-ran the CI, and they failed because SOCK_PACKET was deprecated by rust-lang/libc#4267, but since it is used explicitly for testing so I think we can #[allow(deprecated)] here

@SteveLauC

SteveLauC commented Mar 18, 2025

Copy link
Copy Markdown
Member

Weird, the FreeBSD CI was still using once_cell 1.21.0 🤔

https://github.com/nix-rust/nix/pull/2610/checks?check_run_id=38692242745

@Berrysoft

Copy link
Copy Markdown
Contributor Author

Weird, the FreeBSD CI was still using once_cell 1.21.0

Failed 5 days ago. Not today.

@SteveLauC

Copy link
Copy Markdown
Member

Failed 5 days ago. Not today.

Hmm, sorry for missing that:D

@Berrysoft

Copy link
Copy Markdown
Contributor Author

Thank you @SteveLauC , now the CI passes again.

@SteveLauC SteveLauC left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sorry for the late review, the code part looks good. For the tests, some of them are "ignored" even though the corresponding symbols are available, I would like to know why, and if possible, it would be great to comment on the reason there, which would help maintenance a lot! :)

Comment thread src/errno.rs Outdated
Comment thread test/sys/test_resource.rs
Comment thread test/test_fcntl.rs Outdated
@SteveLauC SteveLauC mentioned this pull request Mar 21, 2025
3 tasks
@SteveLauC

Copy link
Copy Markdown
Member

Let me fix the unrelated nightly clippy warning

@SteveLauC SteveLauC left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks

@SteveLauC
SteveLauC added this pull request to the merge queue Mar 25, 2025
Merged via the queue into nix-rust:master with commit 975111f Mar 25, 2025
@Berrysoft
Berrysoft deleted the dev/cygwin branch March 25, 2025 06:03
@ognevny

ognevny commented Dec 1, 2025

Copy link
Copy Markdown
Contributor

@Berrysoft why unistd::sync was not added in this PR? it seems that it's present in libc

@Berrysoft

Copy link
Copy Markdown
Contributor Author

I think I have checked most features, but sorry if I missed something...

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.

3 participants