forked from huonw/unicode_names
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prepare unicode_names2_generator for initial release
It now needs to be published, as it is a build-dependency of unicode_names2 itself.
- Loading branch information
Showing
3 changed files
with
21 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,18 @@ | ||
use std::{env, path::PathBuf}; | ||
use unicode_names2_generator as generator; | ||
|
||
const UNICODE_DATA: &str = include_str!("data/UnicodeData.txt"); | ||
|
||
fn main() { | ||
let out_dir = PathBuf::from(env::var_os("OUT_DIR").unwrap()); | ||
{ | ||
let mut generated_path = out_dir.clone(); | ||
generated_path.push("generated.rs"); | ||
generator::generate(Some(&generated_path), None); | ||
generator::generate(UNICODE_DATA, Some(&generated_path), None); | ||
} | ||
{ | ||
let mut generated_phf_path = out_dir; | ||
generated_phf_path.push("generated_phf.rs"); | ||
generator::generate_phf(Some(&generated_phf_path), None, 3, 2); | ||
generator::generate_phf(UNICODE_DATA, Some(&generated_phf_path), None, 3, 2); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters