Closed dmolik closed 1 year ago
Seems like either musl
is missing support for copy_file_range
or libc
doesn't yet provide a wrapper for it. After a quick look at both projects, seems to be the latter. Should be a quite straightforward PR for libc
, do you have plans to send it yourself?
I don't have a plan. I did poke around today, and it doesn't seem like a huge lift, but I'm not a rust developer, but from what I could tell it was something like a 12 line patch to libc
I've just created a PR adding copy_file_range
to musl: https://github.com/rust-lang/libc/pull/3133
Meanwhile, it's possible to build libkrun
by patching the dependency:
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -7,3 +7,6 @@ members = ["src/libkrun"]
[profile.release]
#panic = "abort"
lto = true
+
+[patch.crates-io]
+libc = { git = "https://github.com/slp/libc", branch = "musl-copy-file-range" }
thanks!
Closing as copy_file_range
is now available in musl.
I'm getting the following with rust 1.66.1, and musl 1.2.3-r4: