Skip to content

build(deps): upgrade dependencies #3

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 3 commits into from
Jun 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 30 additions & 23 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[dependencies]
allocator-api2 = { version = "0.2", default-features = false, features = ["alloc"], optional = true }
bitfield-struct = "0.9"
allocator-api2 = { version = "0.3", default-features = false, features = ["alloc"], optional = true }
bitfield-struct = "0.11"
bitflags = "2"
endian-num = { version = "0.2", features = ["bitflags", "linux-types"] }
num_enum = { version = "0.7", default-features = false }
Expand All @@ -28,6 +28,6 @@ zerocopy-derive = { version = "0.8", optional = true }
[features]
alloc = ["dep:allocator-api2"]
mmio = []
nightly = ["allocator-api2/nightly"]
nightly = []
Copy link
Member

@phip1611 phip1611 Jun 24, 2025

Choose a reason for hiding this comment

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

nit: Typically, this is called "unstable" rather than "nightly" I think, but we can keep it as is

Copy link
Member Author

Choose a reason for hiding this comment

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

I have seen both, but always thought "nightly" was to be the way to go.

Both seem to be used a lot ("nightly", "unstable").
I think "nightly" was used first, but that does not mean it's necessarily better, of course.

Tokio uses cfg(tokio_unstable) for signalling that a Tokio API may change without a major version bump (the features do not require a nightly toolchain though).
So it makes sense to me to use "nightly" for signalling that parts of our API are only usable on nightly and may break of course, but that's not because of us but because of the nightly toolchain.

I think I'll keep this as is, but looking into this was interesting! :D

pci = ["dep:pci_types"]
zerocopy = ["dep:zerocopy", "dep:zerocopy-derive", "endian-num/zerocopy"]
12 changes: 10 additions & 2 deletions src/virtq/alloc.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
use ::alloc::alloc::handle_alloc_error;
use allocator_api2::alloc::{AllocError, Allocator, Global};
use allocator_api2::boxed::Box;
#[cfg(feature = "nightly")]
use ::alloc::{
alloc::{AllocError, Allocator, Global},
boxed::Box,
};
#[cfg(not(feature = "nightly"))]
use allocator_api2::{
alloc::{AllocError, Allocator, Global},
boxed::Box,
};

use super::*;

Expand Down