12 releases (6 stable)

1.1.1 Dec 14, 2024
1.1.0 Oct 30, 2024
1.0.3 Sep 3, 2024
1.0.2 Jul 1, 2024
0.15.0 May 28, 2024

#153 in Web programming

Download history 3181/week @ 2024-09-18 2527/week @ 2024-09-25 1303/week @ 2024-10-02 1471/week @ 2024-10-09 1551/week @ 2024-10-16 1571/week @ 2024-10-23 2146/week @ 2024-10-30 1348/week @ 2024-11-06 1216/week @ 2024-11-13 1893/week @ 2024-11-20 1632/week @ 2024-11-27 1716/week @ 2024-12-04 2064/week @ 2024-12-11 1494/week @ 2024-12-18 1961/week @ 2024-12-25 1162/week @ 2025-01-01

7,022 downloads per month
Used in 2 crates (via oxc_transformer)

MIT license

2.5MB
11K 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
  • removed all unnecessary, heavy or slow dependencies: ahash, chrono, either, indexmap, itertools, once_cell, string_cache
  • improved some runtime performance, e.g. improve sort method, precompute versions

Usage

See docs.rs/oxc-browserslist.

Limitation

Only custom usage is not supported: > 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'

Future Work (Pull Request Welcome)

  • nom can be replaced by a hand written parser to improve runtime and compilation speed
  • improve test coverage
  • improve compilation speed and reduce compiled binary size
  • improve runtime performance
    • all semver versions with their string representation can be precomputed and code generated, current code is calling parse and to_string on semver versions
    • add more benchmarks
    • see codspeed for current run performance

Sponsored By

My sponsors

Dependencies

~2–3.5MB
~66K SLoC