1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//! The Unicode tables, one module per version of the Unicode character database.
//!
//! Each `vNN` module holds the tables `generate-classes.sh` generated for that UCD
//! version, and the `ucd-NN` Cargo feature selects it. Only the selected version is
//! compiled: the others cost nothing in build time or in the binary.
//!
//! Cargo features are additive, so two of them can end up enabled at once when several
//! dependents of this crate ask for different versions. The highest one then wins,
//! which at least makes the result the same whatever the order they were enabled in.
//! A build that enables none of them, which is what `default-features = false` gives,
//! gets the newest version rather than failing to compile.
//!
//! Adding a version means generating its tables with `generate-classes.sh`, declaring
//! the feature in `Cargo.toml`, and adding a block below. The guards are what make the
//! selection unique: the newest version is taken when its own feature is enabled or
//! when no older one is, and every older version when its feature is enabled and no
//! newer one is. So a new version takes over the `not(any(..))` fallback from the one
//! it displaces, which then joins the list every older guard excludes.
// The newest version, and the fallback when no feature names one.
pub
pub use v17 as active;
pub
pub use v16 as active;