A library and tool to validate unique device identifiers. 📱 🔒 🦀
This repository contains the source code for the Rust crate, Luhny.rs. This crate serves as both a library and CLI tool allowing users to validate IMEI numbers with a length of 15 characters.
To use Luhny.rs as a library in your own Rust project, add the following line to the dependencies
section of your Rust project's Cargo.toml
file:
luhny = { git = "https://github.com/alyxshang/luhny.rs", tag = "v.0.1.0" }
To install Luhny.rs as a CLI tool on your own system, run the following command from a terminal session:
cargo install --git https://github.com/alyxshang/luhny.rs --tag v.0.1.0
To run the command above, you will have to have the Rust toolchain installed.
To view the documentation of the APIs this crate provides, run the command cargo doc --open
from the root of this repository.
Luhny.rs features the following three CLI commands: i) getting version information, ii) getting help information, and iii) validating an IMEI number.
- To print out version information about Luhny.rs, you can run either of these three commands:
luhny -v
# OR
luhny version
# OR
luhny --version
- To print out help information about Luhny.rs, you can run either of these three commands:
luhny -h
# OR
luhny help
# OR
luhny --help
- To validate an IMEI number, you can run either of these three commands (
IMEI_NUM
is representative for your IMEI number):
luhny -c IMEI_NUM
# OR
luhny chk IMEI_NUM
# OR
luhny --chk IMEI_NUM
- Initial release.
- Upload to GitHub.
- Luhny.rs 📱 🔒 🦀 by Alyx Shang 🖤.
- Licensed under the FSL v1.