36 stable releases (3 major)

Uses new Rust 2024

new 3.0.2 Apr 5, 2026
3.0.1 Mar 12, 2026
2.3.1 Feb 24, 2026
2.1.5 Dec 22, 2025
0.17.1 Jun 17, 2024

#49 in Web programming

Download history 15114/week @ 2025-12-14 9013/week @ 2025-12-21 8875/week @ 2025-12-28 15953/week @ 2026-01-04 18937/week @ 2026-01-11 18303/week @ 2026-01-18 17585/week @ 2026-01-25 24051/week @ 2026-02-01 31189/week @ 2026-02-08 24606/week @ 2026-02-15 25205/week @ 2026-02-22 35415/week @ 2026-03-01 37290/week @ 2026-03-08 31482/week @ 2026-03-15 25986/week @ 2026-03-22 21409/week @ 2026-03-29

120,400 downloads per month
Used in 156 crates (via oxc_compat)

MIT license

195KB
4.5K SLoC

Crates.io Docs.rs

MIT licensed Build Status Code Coverage CodSpeed Badge Sponsors Discord chat

oxc-browserslist

Rust port of Browserslist, forked from browserslist-rs.

The original crate did not meet the criteria of oxc, the following changes are made:

  • reduced compilation speed from one minute to a few seconds
  • improved some runtime performance, e.g. improve sort method, precompute versions
  • removed all unnecessary, heavy or slow dependencies: nom, time, ahash, chrono, either, indexmap, itertools, once_cell, string_cache, serde_json
  • reduced binary size through data compression and removal of config file support. 717K (this crate) vs 3.2M (original crate).

Usage

See docs.rs/oxc-browserslist.

Limitation

The following features are not supported, to align with Vite:

  • Config file loading (.browserslistrc, package.json browserslist field)
  • Environment variables (BROWSERSLIST, BROWSERSLIST_CONFIG, BROWSERSLIST_ENV)
  • extends query (e.g. extends browserslist-config-google)
  • Custom usage (> 0.5% in my stats or cover 99.5% in my stats)

Example

Inspect query result by running the example:

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'

Testing

Unit and Integration Tests

cargo test

Property-Based Testing

Property-based tests generate random queries and compare results with the npm browserslist CLI.

# Install npm browserslist first
pnpm install

# Run property-based tests
cargo test --test proptest

Fuzzing

Fuzzing tests use libFuzzer to find edge cases.

# Install cargo-fuzz
cargo install cargo-fuzz

# Run the fuzzer
cd fuzz
cargo +nightly fuzz run fuzz_resolve

Sponsored By

My sponsors

Dependencies

~0.8–1.7MB
~33K SLoC