| Crates.io | browserinfo |
| lib.rs | browserinfo |
| version | 0.1.5 |
| created_at | 2025-12-07 03:35:21.215643+00 |
| updated_at | 2026-01-17 05:22:08.707714+00 |
| description | browser and hardware information. |
| homepage | |
| repository | https://github.com/aki-akaguma/broinfo |
| max_upload_size | |
| id | 1971104 |
| size | 9,557,931 |
Provides the javascript string and rust struct that are required when running javascript and collecting information.
In dioxus, it is used as follows.
use dioxus_document as document;
use browserinfo::{user_agent_js, UserAgent};
let js_ua: &str = user_agent_js();
let eval = document::eval(js_ua).await?;
let json_str = eval.to_string();
let user_agent = UserAgent::from_json_str(&json_str)?;
use dioxus_document as document;
use browserinfo::{broinfo_js, BroInfo, Browser};
let js_bro: &str = broinfo_js();
let eval = document::eval(js_bro).await?;
let json_str = eval.to_string();
let broinfo = BroInfo::from_json_str(&json_str)?;
// Generate `Browser` from `UserAgent`
let browser = broinfo.to_browser();
This project is licensed under either of
at your option.