Crates.io | uaparser |
lib.rs | uaparser |
version | 0.6.4 |
source | src |
created_at | 2019-02-20 04:24:52.520184 |
updated_at | 2024-06-11 02:34:56.209787 |
description | A Rust implementation of the UA Parser |
homepage | https://github.com/davidarmstronglewis/uap-rs |
repository | https://github.com/davidarmstronglewis/uap-rs |
max_upload_size | |
id | 115893 |
size | 9,251,292 |
This crate is an implementation of a User Agent Parser, similar to those found as part of the UA-Parser Community. It tries to remain as consistent with the other implementations as possible while remaining simple and legible.
Every UA Parser implementation depends on the same regexes.yaml
file, which is used to create the parser. You can find this file here or by initializing the submodule of this repo if you have it cloned.
To get to the docs, clone the repo and run cargo doc --open
to build the documentation
git submodule update --init
to get startedcargo test
cargo test -- --nocapture
for the full resultscargo bench
will run a criterion benchmark suite.
To see memory usage of the compiled regex list you can run the examples with a tool that tracks memory usage.
Example (on MacOS):
/usr/bin/time -l cargo run --examples full_parser