Add the following to your Cargo.toml:
 = "0.1.0"
TravelCard object requires communicating via NFC with your physical travel card. An example of doing so is contained in the
scannit-cli subproject in this repository.
TravelCard object will look something like this:
use create_travel_card; // function declaration here somewhere... let app_info: & = get_app_info_from_nfc_card; let control_info: & = get_control_info_from_nfc_card; let period_pass: & = get_period_pass_from_nfc_card; let stored_value: & = get_stored_value_from_nfc_card; let e_ticket: & = get_e_ticket_from_nfc_card; let all_history : & = get_history_from_nfc_card; let travel_card = create_travel_card;
This crate also exposes the commands by which you communicate with the NFC card in the
This crate also includes the
scannit-core-ffi subproject, which contains FFI-friendly projections of the data models in the main crate, as well as FFI-friendly functions that can be used to create (and free)
See the ScannitSharp library for a C# example of using the FFI crate.
Building the FFI crate
> cd > cargo
> cargo build
Cross-compilation should work without too much issue, but requires the standard tools for cross-compiling to your target triple. Android requires the NDK and a ~/.cargo/config setup for
ar and a
linker, for example.