Crates.io | build_uuid |
lib.rs | build_uuid |
version | 0.3.0 |
source | src |
created_at | 2022-10-24 20:30:11.572982 |
updated_at | 2022-10-24 20:30:11.572982 |
description | Obtain a UUID uniquely representing the build of the current binary. |
homepage | https://github.com/kaspar030/build_uuid |
repository | https://github.com/kaspar030/build_uuid |
max_upload_size | |
id | 696158 |
size | 22,173 |
THIS IS A FORK OF https://github.com/alecmocatta/build_id!
Obtain a Uuid
uniquely representing the
build of the current binary.
This is intended to be used to check that different processes are indeed invocations of identically laid out binaries.
As such:
let local_build_uuid = build_uuid::get();
if local_build_uuid == remote_build_uuid {
println!("We're running the same binary as remote!");
} else {
println!("We're running a different binary to remote");
}
This looks first for linker-inserted build ID / binary UUIDs (i.e.
.note.gnu.build-id
on Linux; LC_UUID
in Mach-O; etc), falling back to
hashing the whole binary.
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.