10 releases (4 stable)

1.0.3 Sep 3, 2024
1.0.2 Jul 1, 2024
1.0.1 Jun 24, 2024
0.17.1 Jun 17, 2024
0.15.0 May 28, 2024

#171 in Web programming

Download history 1547/week @ 2024-06-14 1829/week @ 2024-06-21 1262/week @ 2024-06-28 1390/week @ 2024-07-05 1368/week @ 2024-07-12 1268/week @ 2024-07-19 1832/week @ 2024-07-26 1622/week @ 2024-08-02 1588/week @ 2024-08-09 1379/week @ 2024-08-16 1789/week @ 2024-08-23 2412/week @ 2024-08-30 2523/week @ 2024-09-06 1901/week @ 2024-09-13 3541/week @ 2024-09-20 1624/week @ 2024-09-27

10,094 downloads per month
Used in 3 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.1–3.5MB
~66K SLoC