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:
ahash,chrono,either,indexmap,itertools,once_cell,string_cache - reduced binary size through data compression. 911K (this crate) vs 3.2M (original crate).
Usage
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:
You can also specify additional options, for example:
Future Work (Pull Request Welcome)
nomcan 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
parseandto_stringon semver versions - add more benchmarks
- see codspeed for current run performance
- all semver versions with their string representation can be precomputed and code generated, current code is calling