Crates.io | replicate |
lib.rs | replicate |
version | 0.1.1 |
source | src |
created_at | 2022-11-11 23:23:05.939871 |
updated_at | 2022-11-12 16:57:48.557573 |
description | Copies the currently running program into a temporary location |
homepage | |
repository | https://github.com/cmeister2/replicate |
max_upload_size | |
id | 713173 |
size | 19,726 |
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.
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.