Skip to content

Commit

Permalink
packages/cloud-hypervisor: fix build
Browse files Browse the repository at this point in the history
This supresses the `missing_docs` lint which breaks compilation on Rust 1.83.0+.
  • Loading branch information
msanft committed Jan 16, 2025
1 parent 5f030d8 commit 8898b26
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,5 @@ index f60d8ceb..b8fccf31 100644
self.fd
.gpa_write(&mut swei2_rw_gpa_arg)
.map_err(|e| cpu::HypervisorCpuError::GpaWrite(e.into()))?;
--
--
2.45.2

Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,5 @@ index 307326dd..69b12364 100644
+pub const GHCB_RBX_OFFSET: u64 = 0x0318;
pub const GHCB_SW_EXITINFO1_OFFSET: u64 = 0x398;
pub const GHCB_SW_EXITINFO2_OFFSET: u64 = 0x3A0;
--
--
2.45.2

11 changes: 11 additions & 0 deletions packages/by-name/microsoft/cloud-hypervisor/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,17 @@ rustPlatform.buildRustPackage rec {
};
};

# Allow compilation with Rust 1.83.0, which requires public methods in
# test modules to have documentation when the `missing_docs` lint is enabled.
# The [Microsoft fork](https://github.com/microsoft/cloud-hypervisor) will
# eventually support this, as [upstream](https://github.com/cloud-hypervisor/cloud-hypervisor)
# already does.
# See: https://github.com/cloud-hypervisor/cloud-hypervisor/issues/6903
postPatch = ''
substituteInPlace rate_limiter/src/lib.rs \
--replace-fail '#![deny(missing_docs)]' ""
'';

patches = [
./0001-snp-fix-panic-when-rejecting-extended-guest-report.patch
./0002-hypervisor-mshv-implement-extended-guest-requests-wi.patch
Expand Down

0 comments on commit 8898b26

Please sign in to comment.