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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
//! # `static-lang-word-lists`
//!
//! A collection of word lists for various scripts, compressed at build time
//! with [Brotli](https://brotli.org/), baked into your compiled binary, and
//! decompressed lazily at run time.
//!
//! Word lists are compressed less when building the "debug" profile to speed up
//! build times.
//! Any other profile will use maximum compression.
//!
//! ## Accessing word lists
//!
//! If there's a specific word list you're after, you can refer to its `static`
//! by name.
//! The crate also provides the static [`ALL_WORD_LISTS`] for convenient
//! iteration/filtering.
//!
//! Word lists are decompressed when you call [`WordList::iter`].
//!
//! ## Feature flags
//!
//! This crate has a plethora of feature flags to help you reduce build times by
//! only compressing the word lists you plan to use.
//!
//! There are three categories of feature flag you can use to choose your word
//! list:
//! - Source name (e.g. `diffenator`), enables all the word lists from a
//! particular source
//! - Script code (e.g. `script-latn`), enables all the word lists for the [ISO 15924](https://en.wikipedia.org/wiki/ISO_15924)
//! script (lowercase)
//! - Language code (e.g. `lang-en`), enables all the word lists for the [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1)
//! language
//!
//! You can, of course, mix & match at will. Thanks to the magic of Cargo's
//! [feature unification](https://doc.rust-lang.org/cargo/reference/features.html#feature-unification),
//! any word lists needed by other dependencies will still be pulled in &
//! compiled even if you don't request them in your own crate.
//!
//! If there are no word lists for a script/language, there won't be a feature
//! flag.
//!
//! To enable all word lists, there is the catch-all feature `all`.
//! (This does not enable functionality-related flags, such as `rayon`.)
//!
//! **By default, only the diffenator word lists are enabled**.
//!
//! It is not considered a breaking change if more word lists get added to a
//! given feature.
//!
//! ## Creating your own word lists
//!
//! - In memory words: [`WordList::define`]
//! - Word list file (with sidecar metadata): [`WordList::load`]
//! - Word list file (no metadata): [`WordList::load_without_metadata`]
//!
//! ## How this crate works (⚠️disclaimer⚠️)
//!
//! A build script for this crate downloads a zipball of the GitHub repo for
//! this project at build time in order to get the word lists.
//! It is not possible for us to include these in the crate hosted on crates.io
//! as the crate would immediately exceed the size limit.
//!
//! By using a the repository as a path or git dependency you can avoid the
//! download by setting the environment variable `STATIC_LANG_WORD_LISTS_LOCAL`.
//! Otherwise, you're welcome to audit the [build script](https://github.com/googlefonts/fontheight/blob/main/static-lang-word-lists/build.rs).
pub use *;
pub use ParWordListIter;
pub use ;
use crate;
// Module declaration has to be below macro definition to be able to use it
pub use *;