Skip to content

About

Rust-ported Browserslist.

Resources

Stars

152 stars

Watchers

4 watching

Forks

Repository files navigation

browserslist-rs

The tool like Browserslist, but written in Rust.

Usage

Please refer to crate documentation.

Try as Rust crate example

You can try and inspect query result by running example with Cargo:

cargo run --example inspect -- <query>

You can also specify additional options, for example:

cargo run --example inspect -- --mobile-to-desktop 'last 2 versions, not dead'

To get more help, you can run:

cargo run --example inspect -- -h

Cargo features

  • deflate (default): compressed embedded data.
  • local (default): compute "today" (for baseline and maintained node versions) in the local time zone. Near midnight "today" may differ by one day. Opt out with default-features = false, features = ["deflate"].
  • wasm_bindgen: use JS Date for the current time on wasm32.

Limitations

The features below aren't supported currently:

  • Custom usage like > 0.5% in my stats.
  • Custom usage like cover 99.5% in my stats.

Local development setup

  1. Clone the repository and enter the project directory

    git clone https://github.com/browserslist/browserslist-rs.git
    cd browserslist-rs
  2. Install dependencies

    pnpm install
  3. Generate data

    cargo run --manifest-path generate-data/Cargo.toml
  4. Run the main project (see the Usage section above)

Credits

Thanks Andrey Sitnik for creating the JavaScript-based Browserslist which is under MIT License.

License

MIT License

Copyright (c) 2021-present Pig Fang

About

Rust-ported Browserslist.

Resources

Stars

152 stars

Watchers

4 watching

Forks

Releases

Used by

Contributors

Languages