Idea: Add an option to set the mode to fs::copy
Rust Internals [Unofficial]
March 14, 2026
As mentioned by zackw, io::copy definitely can do those. The implementation literally first tries a function called kernel_copy and falls back to generic copying if that doesn’t work. Specifically on Linux the docs note that
On Linux (including Android), this function uses
copy_file_range(2),sendfile(2)orsplice(2)syscalls to move data directly between file descriptors if possible.
Discussion in the ATmosphere