3 releases
Uses old Rust 2015
0.2.2 | Dec 22, 2018 |
---|---|
0.2.1 | Dec 21, 2018 |
0.2.0 | Dec 14, 2018 |
#89 in #checking
Used in 3 crates
16KB
260 lines
Platform-LP-RS
A platform enum written in rust to be used with lovepack tools.
Contains functions to determine the current running platform as well as parsing and comparisons.
Usage
Include the library in your cargo.toml
.
[dependencies]
platform-lp = "0.2"
Then use it in your library / application.
let user_plat = platform_lp::Platform::get_user_platform();
// you can pass an entire executable name to check what platform it is,
// assuming it goes by some kind of standard naming convention.
// like perhaps one of mine: lpsettings-0.1.7-win-x86_64.zip
let package_platform = platform_lp::Platform::new(executable_release_name);
// then you can check if its the same platform
if user_plat == package_platform {
// then extract it, run it, etc ...
}
// or you can check compatability (i.e. for 32 bit on 64 bit systems)
if package_platform.is_compatible(user_plat) {
// then do something fun...
}
Changes
0.2.1
- Platform now implements
std::fmt::Display
Dependencies
~110–350KB