Skip to content

Conversation

@soooch
Copy link
Contributor

@soooch soooch commented Mar 13, 2025

std was used for the Error trait and Duration type, both of which are available in core.

Personally I feel it would be cleaner if the std feature was removed entirely (and dependents enabled std themselves as needed for rustix and/or bitflags). It's a bit jank that we enable features we don't need. However that would be a breaking change. Also, feature deprecation is still not supported in Cargo.

@sunfishcode
Copy link
Collaborator

std was used for the Error trait and Duration type, both of which are available in core.

Personally I feel it would be cleaner if the std feature was removed entirely (and dependents enabled std themselves as needed for rustix and/or bitflags). It's a bit jank that we enable features we don't need. However that would be a breaking change. Also, feature deprecation is still not supported in Cargo.

Thanks for this PR! I agree, we should remove the std feature entirely now; would you mind doing that in this PR? Breaking changes are ok in rustix-uring at this time. We can just release a 0.4.0 with the changes.

@soooch
Copy link
Contributor Author

soooch commented Mar 13, 2025

core::time has been stable since 1.25. unfortunately, core::error has only been stable since 1.81. is 1.63 this project's MSRV?

I'd like to have Error with no_std, but it doesn't look like there are nice ways of doing conditional compilation based on rustc version. I can implement it based on this suggestion it there's interest.

@sunfishcode
Copy link
Collaborator

Also, please feel free to bump the MSRV to Rust 1.81, to support core::error::Error.

@soooch soooch force-pushed the remove-std-feature branch 2 times, most recently from e3b6138 to 6efd1cf Compare March 13, 2025 03:49
soooch added 4 commits March 12, 2025 20:51
std was used for the Error trait and Duration type, both of which
are available in core.
the functionality "std" enabled in rustix-uring is now available without
the "std" feature. this feature also enabled the "std" feature for the
crates rustix and bitflags. downstream users of rustix-uring should
explicitly enable the "std" features for those crates if needed.
breaking changes:

- MSRV 1.63 -> 1.81
- "std" feature removed
@soooch soooch force-pushed the remove-std-feature branch from 6efd1cf to 6f06234 Compare March 13, 2025 03:51
@sunfishcode sunfishcode merged commit ab1e9c0 into jordanisaacs:main Mar 13, 2025
12 checks passed
@soooch soooch changed the title Remove internal usage of std Remove std feature Mar 13, 2025
@sunfishcode
Copy link
Collaborator

This is now released in rustix-uring 0.4.0.

@soooch
Copy link
Contributor Author

soooch commented Mar 13, 2025

Thanks @sunfishcode! That was crazy fast.

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.

2 participants