From cdafef68107c62b59556c5bf692439c30908e8fe Mon Sep 17 00:00:00 2001 From: danbugs Date: Tue, 12 May 2026 18:09:12 +0000 Subject: [PATCH 1/3] fix sparsify message: report resulting disk size, not amount removed Signed-off-by: danbugs --- host/src/lib.rs | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/host/src/lib.rs b/host/src/lib.rs index 90976d2..2255b4a 100644 --- a/host/src/lib.rs +++ b/host/src/lib.rs @@ -1578,11 +1578,8 @@ fn sparsify_snapshot(path: &Path) -> Result<()> { drop(mmap); if punched > 0 { - eprintln!( - " sparsified: punched {} zero pages ({} MiB saved on disk)", - punched, - punched * 4 / 1024 - ); + let disk_mib = (len as u64 - punched * PAGE as u64) / 1024 / 1024; + eprintln!(" sparsified: {disk_mib} MiB on disk (punched {punched} zero pages)",); } Ok(()) @@ -1669,11 +1666,8 @@ fn sparsify_snapshot(path: &Path) -> Result<()> { drop(mmap); if punched > 0 { - eprintln!( - " sparsified: punched {} zero pages ({} MiB saved on disk)", - punched, - punched * 4 / 1024 - ); + let disk_mib = (len as u64 - punched * PAGE as u64) / 1024 / 1024; + eprintln!(" sparsified: {disk_mib} MiB on disk (punched {punched} zero pages)",); } Ok(()) From feb3591d8319a0d963bc0a20997e61b8b628e7c7 Mon Sep 17 00:00:00 2001 From: danbugs Date: Tue, 12 May 2026 21:53:35 +0000 Subject: [PATCH 2/3] fix clippy: remove unnecessary len as u64 cast Signed-off-by: danbugs --- host/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/host/src/lib.rs b/host/src/lib.rs index 2255b4a..ef1fcef 100644 --- a/host/src/lib.rs +++ b/host/src/lib.rs @@ -1578,7 +1578,7 @@ fn sparsify_snapshot(path: &Path) -> Result<()> { drop(mmap); if punched > 0 { - let disk_mib = (len as u64 - punched * PAGE as u64) / 1024 / 1024; + let disk_mib = (len - punched * PAGE as u64) / 1024 / 1024; eprintln!(" sparsified: {disk_mib} MiB on disk (punched {punched} zero pages)",); } @@ -1666,7 +1666,7 @@ fn sparsify_snapshot(path: &Path) -> Result<()> { drop(mmap); if punched > 0 { - let disk_mib = (len as u64 - punched * PAGE as u64) / 1024 / 1024; + let disk_mib = (len - punched * PAGE as u64) / 1024 / 1024; eprintln!(" sparsified: {disk_mib} MiB on disk (punched {punched} zero pages)",); } From 5be8d3a6bf62b3b3211ed6ce474a6e43b87062d4 Mon Sep 17 00:00:00 2001 From: danbugs Date: Tue, 12 May 2026 21:54:34 +0000 Subject: [PATCH 3/3] fix(dotnet-nativeaot): bump ILCompiler pin from 9.0.15 to 9.0.16 Signed-off-by: danbugs --- examples/dotnet-nativeaot/HelloNativeAot.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/dotnet-nativeaot/HelloNativeAot.csproj b/examples/dotnet-nativeaot/HelloNativeAot.csproj index 8351fbf..efc08c4 100644 --- a/examples/dotnet-nativeaot/HelloNativeAot.csproj +++ b/examples/dotnet-nativeaot/HelloNativeAot.csproj @@ -7,6 +7,6 @@ true - +