aboutsummaryrefslogtreecommitdiff
path: root/nitrocli/Cargo.toml
diff options
context:
space:
mode:
authorDaniel Mueller <deso@posteo.net>2017-03-26 17:31:28 -0700
committerDaniel Mueller <deso@posteo.net>2017-03-26 17:31:28 -0700
commitde5ae8656387267bb4614bbab6b62784323f23c0 (patch)
tree7be8d72b26b0ae355d5e157c2f36ccb30d6fa347 /nitrocli/Cargo.toml
parentcd6e41862cea59ec306e7c9c578270575eb2a73b (diff)
downloadnitrocli-de5ae8656387267bb4614bbab6b62784323f23c0.tar.gz
nitrocli-de5ae8656387267bb4614bbab6b62784323f23c0.tar.bz2
Discover and open nictrokey using libhidapi
This change uses the 'hid' crate to discover and open the Nitrokey Storage device. 'hid' is a wrapper around libhidapi (its libusb back-end in particular). Being a command line application some sort of parameter handling needs to happen. The approach we take is very simple for now to minimize the number of dependencies: we just compare the first argument against the expected ones and raise an error if no match was found. Because we only have positional arguments right now this is all we need.
Diffstat (limited to 'nitrocli/Cargo.toml')
-rw-r--r--nitrocli/Cargo.toml22
1 files changed, 22 insertions, 0 deletions
diff --git a/nitrocli/Cargo.toml b/nitrocli/Cargo.toml
index ceaf276..1ee63fb 100644
--- a/nitrocli/Cargo.toml
+++ b/nitrocli/Cargo.toml
@@ -29,3 +29,25 @@ keywords = ["hid", "nitrokey", "nitrokey-storage", "usb", "cli"]
description = """
A command line tool for interacting with the Nitrokey Storage device.
"""
+
+[dependencies.gcc]
+path = "../gcc"
+
+[dependencies.hid]
+path = "../hid"
+
+[dependencies.hidapi-sys]
+path = "../hidapi-sys"
+
+[dependencies.libc]
+path = "../libc"
+
+[dependencies.pkg-config]
+path = "../pkg-config"
+
+[replace]
+"gcc:0.3.45" = { path = "../gcc" }
+"hid:0.3.0" = { path = "../hid" }
+"hidapi-sys:0.1.2" = { path = "../hidapi-sys" }
+"libc:0.2.21" = { path = "../libc" }
+"pkg-config:0.3.9" = { path = "../pkg-config" }