tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

Cargo.toml (1601B)


      1 # This is a fork of libudev-sys that dynamically loads its symbols with
      2 # dlopen when they are first used. This continues a precedent established
      3 # by Firefox's gamepad APIs to minimize the footprint of features when they
      4 # aren't being used. Specifically, this avoids the cost of dynamically linking
      5 # in libudev at process startup.
      6 #
      7 # "-sys" crates are a convention in the rust ecosystem for "a simple header
      8 # for a C library that Rust code can use to build a richer and safer API on
      9 # top of". In this case, libudev-sys is used by the [libudev crate].
     10 #
     11 # As of this writing, this hack is being used by the [authenticator-rs] crate,
     12 # which uses the libudev crate.
     13 #
     14 # The libudev crate assumes libudev is being dynamically linked in, and
     15 # checks if its symbols are null before intializing anything else, so that
     16 # you can use it to detect if libudev is installed and gracefully
     17 # disable gamepads or whatever else if it's not.
     18 #
     19 # If we're missing any symbols the libudev crate needs, then rust will give
     20 # us a compilation error. It's not a problem if we export additional symbols.
     21 #
     22 # So while this is a bit of a weird hack, it works pretty robustly, and this
     23 # crate is basically just a header for libudev so it's not a particularly
     24 # significant maintenance burden.
     25 #
     26 # authenticator-rs: https://github.com/mozilla/authenticator-rs
     27 # libudev crate: https://crates.io/crates/libudev
     28 
     29 [package]
     30 name = "libudev-sys"
     31 version = "0.1.3"
     32 authors = ["Tim Taubert <ttaubert@mozilla.com>"]
     33 description = "FFI bindings to libudev"
     34 license = "MPL-2.0"
     35 
     36 [dependencies]
     37 lazy_static = "1.0"
     38 libc = "0.2"