| Crates.io | nfc |
| lib.rs | nfc |
| version | 0.1.11 |
| created_at | 2016-05-29 23:17:13.551558+00 |
| updated_at | 2016-10-15 10:52:30.800186+00 |
| description | Rust bindings for the libnfc library |
| homepage | https://github.com/dsgriffin/nfc |
| repository | https://github.com/dsgriffin/nfc |
| max_upload_size | |
| id | 5232 |
| size | 35,918 |
Rust bindings for the libnfc library.
For raw FFI bindings for libnfc, see nfc-sys.
Install libnfc (e.g. Debian/Ubuntu, brew install libnfc using Homebrew on Mac OSx, or on other systems).
[dependencies]
libc = "0.2.0"
nfc = "0.1.11"
extern crate nfc;
use nfc::context;
use nfc::misc;
fn main() {
let mut context = context::new();
if context.is_null() {
println!("Unable to initialize new NFC context!");
}
// Initialize libnfc
nfc::init(&mut context);
// Print libnfc version
println!("libnfc version: {}", misc::version());
}
I'm brand new to Rust so any help or constructive information would be really appreciated. Thanks in advance!
MIT