diff --git a/Cargo.lock b/Cargo.lock index 52ff918f..aff1fe5c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -727,6 +727,15 @@ dependencies = [ "bitflags", ] +[[package]] +name = "reflink" +version = "0.1.3" +source = "git+https://github.com/nicokoch/reflink?rev=e8d93b465f5d9ad340cd052b64bbc77b8ee107e2#e8d93b465f5d9ad340cd052b64bbc77b8ee107e2" +dependencies = [ + "libc", + "winapi", +] + [[package]] name = "ryu" version = "1.0.9" @@ -1156,6 +1165,7 @@ version = "0.1.0" dependencies = [ "anyhow", "goblin", + "reflink", "serde", "toml", ] diff --git a/xtask/Cargo.toml b/xtask/Cargo.toml index aa943fc5..aa43b1b8 100644 --- a/xtask/Cargo.toml +++ b/xtask/Cargo.toml @@ -8,5 +8,7 @@ license = "ISC" [dependencies] anyhow = "1.0" goblin = "0.5" +# Version 0.1.3 from crates.io assumes a 64-bit toolchain +reflink = { git = "https://github.com/nicokoch/reflink", rev = "e8d93b465f5d9ad340cd052b64bbc77b8ee107e2" } serde = { version = "1.0", features = ["derive"] } toml = "0.5" diff --git a/xtask/src/main.rs b/xtask/src/main.rs index dd7ab777..62e2b2af 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -141,7 +141,8 @@ fn bundle(package: &str, args: &[String]) -> Result<()> { fs::create_dir_all(vst3_lib_path.parent().unwrap()) .context("Could not create bundle directory")?; - fs::copy(&lib_path, &vst3_lib_path).context("Could not copy library to bundle")?; + reflink::reflink_or_copy(&lib_path, &vst3_lib_path) + .context("Could not copy library to bundle")?; maybe_create_macos_vst3_bundle(package, cross_compile_target.as_deref())?;