| Crates.io | replicate |
| lib.rs | replicate |
| version | 1.2.0 |
| created_at | 2022-11-11 23:23:05.939871+00 |
| updated_at | 2025-07-10 18:22:22.198837+00 |
| description | Copies the currently running program into a temporary location |
| homepage | |
| repository | https://github.com/cmeister2/replicate |
| max_upload_size | |
| id | 713173 |
| size | 25,008 |
replicate is a library that:
It's intended to be used by musl-compiled programs which can run inside Docker containers; by creating a copy and then volume-mounting that program within the Docker container, or by using the program in a named build-context.
use replicate::Replicate;
fn main() -> std::result::Result<(), Box<dyn std::error::Error>> {
let copy = Replicate::new()?;
println!("My copy's path is {}", copy.display());
Ok(())
}
Additional examples are in the examples directory.