Skip to content

Commit

Permalink
remove datagen
Browse files Browse the repository at this point in the history
  • Loading branch information
robertbastian committed Jan 5, 2023
1 parent 7e771e8 commit c8ff632
Show file tree
Hide file tree
Showing 6 changed files with 300 additions and 3,137 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions ffi/diplomat/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,6 @@ zerovec = { version = "*", path = "../../utils/zerovec", optional = true}
diplomat = { git = "https://github.com/rust-diplomat/diplomat", rev = "d3010a4b88a0f37d23e3c64cf5500cedc4e8cdf0" }
diplomat-runtime = { git = "https://github.com/rust-diplomat/diplomat", rev = "d3010a4b88a0f37d23e3c64cf5500cedc4e8cdf0" }

[build-dependencies]
icu_datagen = { version = "1.0", path = "../../provider/datagen", features = ["icu_segmenter"]}

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
# Logging is automagical in wasm, we only need this for native
simple_logger = { version = "1.12", optional = true }
Expand Down
28 changes: 6 additions & 22 deletions ffi/diplomat/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,17 @@
// called LICENSE at the top level of the ICU4X source tree
// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).

use icu_datagen::*;
use std::path::PathBuf;

fn main() {
if std::env::var("CARGO_FEATURE_BAKED_PROVIDER").is_ok()
&& std::env::var("ICU4X_FFI_BAKED_ROOT").is_err()
{
let mod_directory = PathBuf::from(std::env::var_os("OUT_DIR").unwrap()).join("empty_bake");
// Empty data generated with
// cargo run -p icu_datagen --features bin,icu_segmenter -- --format mod --use-separate-crates --keys none --out empty_bake
// We could also just generate it here, however that would pull in all of
// datagen's dependencies, which we don't really need.
println!(
"cargo:rustc-env=ICU4X_FFI_BAKED_ROOT={}",
mod_directory.display()
"cargo:rustc-env=ICU4X_FFI_BAKED_ROOT={}/empty_bake",
std::env::var("CARGO_MANIFEST_DIR").unwrap()
);

if !mod_directory.exists() {
icu_datagen::datagen(
Some(&[]),
&[],
&SourceData::default(),
vec![Out::Module {
mod_directory,
insert_feature_gates: false,
use_separate_crates: true,
overwrite: false,
pretty: false,
}],
)
.unwrap();
}
}
}
Loading

0 comments on commit c8ff632

Please sign in to comment.