word_filter_codegen
Tools for generating Word Filters.
This crate is intended to be used as a build utility for the
word_filter crate. It is used to generate WordFilters
at compile-time using a WordFilterGenerator.
Example
For example, a simple WordFilter can be generated by the following.
First, add both the word_filter and word_filter_codegen crates to the Cargo.toml
[dependencies] and [build-dependencies] lists respectively. Be sure their versions match.
[]
= "0.6.0"
[]
= "0.6.0"
Next, generate the WordFilter in the build.rs file.
use ;
use ;
And finally, include the generated code in the lib.rs file.
include!;
assert!;
Minimum Supported Rust Version
This crate is guaranteed to compile on stable rustc 1.51.0 and up.
License
This project is licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.