44 releases (24 breaking)

Uses old Rust 2015

0.25.0 Jun 21, 2023
0.24.0 Feb 20, 2023
0.23.0 Apr 29, 2021
0.22.0 Dec 19, 2019
0.0.1 Dec 29, 2014

#42 in Web programming

Download history 69106/week @ 2023-12-15 46940/week @ 2023-12-22 59208/week @ 2023-12-29 72165/week @ 2024-01-05 72758/week @ 2024-01-12 75789/week @ 2024-01-19 78545/week @ 2024-01-26 71261/week @ 2024-02-02 76887/week @ 2024-02-09 83205/week @ 2024-02-16 91805/week @ 2024-02-23 100462/week @ 2024-03-01 95882/week @ 2024-03-08 87168/week @ 2024-03-15 97401/week @ 2024-03-22 78694/week @ 2024-03-29

376,339 downloads per month
Used in 780 crates (29 directly)

MPL-2.0 license

305KB
6.5K SLoC

rust-selectors

CSS Selectors library for Rust. Includes parsing and serilization of selectors, as well as matching against a generic tree of elements. Pseudo-elements and most pseudo-classes are generic as well.

Warning: breaking changes are made to this library fairly frequently (13 times in 2016, for example). However you can use this crate without updating it that often, old versions stay available on crates.io and Cargo will only automatically update to versions that are numbered as compatible.

To see how to use this library with your own tree representation, see Kuchiki’s src/select.rs. (Note however that Kuchiki is not always up to date with the latest rust-selectors version, so that code may need to be tweaked.) If you don’t already have a tree data structure, consider using Kuchiki itself.

Dependencies

~2.5MB
~55K SLoC