Skip to content

chore(deps): bump vm-memory and criterion versions#223

Open
theoparis wants to merge 1 commit intorust-vmm:mainfrom
theoparis:push-rppqkslvwzqo
Open

chore(deps): bump vm-memory and criterion versions#223
theoparis wants to merge 1 commit intorust-vmm:mainfrom
theoparis:push-rppqkslvwzqo

Conversation

@theoparis
Copy link

@theoparis theoparis commented Dec 20, 2025

Summary of the PR

Bumped maximum vm-memory version to 0.18.0.
Also bumped criterion to 0.8.1.

Requirements

Before submitting your PR, please make sure you addressed the following
requirements:

  • All commits in this PR have Signed-Off-By trailers (with
    git commit -s), and the commit message has max 60 characters for the
    summary and max 75 characters for each description line.
  • All added/changed functionality has a corresponding unit/integration
    test.
  • All added/changed public-facing functionality has entries in the "Upcoming
    Release" section of CHANGELOG.md (if no such section exists, please create one).
  • Any newly added unsafe code is properly documented.

//! boot protocol.

use vm_memory::{Bytes, GuestMemory};
use vm_memory::{Bytes, GuestMemory, GuestMemoryBackend};

Choose a reason for hiding this comment

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

Wasn't this trait introduced in vm-memory 0.18.0? How does this work with the lower versions of vm-memory that are still marked as compatible?

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, we'll need to bump the vm-memory version to >=0.18 if we start explicitly depending on the new traits

Cargo.toml Outdated

[dependencies]
vm-memory = ">=0.16.0, <=0.17.1"
vm-memory = { version = ">=0.16.0, <=0.18.0", default-features = false }

Choose a reason for hiding this comment

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

Suggested change
vm-memory = { version = ">=0.16.0, <=0.18.0", default-features = false }
vm-memory = { version = ">=0.16.0, <0.19", default-features = false }

Otherwise, when 0.18.1 comes out, it won't be considered compatible, even though it won't have breaking changes.

Copy link

Choose a reason for hiding this comment

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

I think neither makes sense. The code was just adjusted and it can't work with version older than 0.18 -- that's why you adjusted it! Just run cargo update --precise 0.16.0 vm-memory and build. It doesn't work.

Suggested change
vm-memory = { version = ">=0.16.0, <=0.18.0", default-features = false }
vm-memory = { version = "0.18.0", default-features = false }

More generally: Please, please, please stop doing this semver incompatible version range dance, particularly if you aren't even testing with it. Somehow this seems to be prevalent for the vm-memory dependency and it's a major source of pain to debug cases where different parts of the dependency tree pull in different versions of the crate, causing trait mismatches etc.

If, somehow, you really need this compatibility range, then please make sure to test it.

Copy link

Choose a reason for hiding this comment

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

Sorry, I skipped over the other comment that already mentions something similar. Anyway, would be good to move this forward in a timely manner, as libkrun changes are also blocked on this bump.

@theoparis theoparis force-pushed the push-rppqkslvwzqo branch 3 times, most recently from 0d6d1a8 to 9eed607 Compare March 10, 2026 23:05
Bump maximum vm-memory version to 0.18.0, and disable default features that depend on rawfd.

Signed-off-by: Theo Paris <theo@theoparis.com>
fn write_bootparams<M>(params: &BootParams, guest_memory: &M) -> Result<()>
where
M: GuestMemory,
M: GuestMemory + GuestMemoryBackend,
Copy link

Choose a reason for hiding this comment

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

Here and everywhere: I think GuestMemory has been renamed to GuestMemoryBackend and you can stick to only the latter to keep things minimal. See rust-vmm/vm-memory#362.

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