Giter VIP home page Giter VIP logo

build_id's Introduction

build_id

Crates.io MIT / Apache 2.0 licensed Build Status

Docs

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:

  • It is guaranteed to be identical within multiple invocations of the same binary.
  • It is guaranteed to be different across binaries with different code or data segments or layout.
  • Equality is unspecified if the binaries have identical code and data segments and layout but differ immaterially (e.g. if a timestamp is included in the binary at compile time).

Examples

let local_build_id = build_id::get();
if local_build_id == remote_build_id {
	println!("We're running the same binary as remote!");
} else {
	println!("We're running a different binary to remote");
}

Note

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.

License

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.

build_id's People

Contributors

alecmocatta avatar dependabot-preview[bot] avatar dependabot-support avatar j-devel avatar mergify[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

build_id's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.