Skip to content

Commit

Permalink
refactor: simplify icu data alignment (denoland#9766)
Browse files Browse the repository at this point in the history
  • Loading branch information
bnoordhuis committed Mar 12, 2021
1 parent fbec6e3 commit 10b99e8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14 deletions.
7 changes: 0 additions & 7 deletions Cargo.lock

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

1 change: 0 additions & 1 deletion core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ repository = "https://github.com/denoland/deno"
path = "lib.rs"

[dependencies]
align-data = "0.1"
anyhow = "1.0.38"
futures = "0.3.12"
indexmap = "1.6.1"
Expand Down
10 changes: 4 additions & 6 deletions core/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,12 +200,10 @@ impl JsRuntime {
static DENO_INIT: Once = Once::new();
DENO_INIT.call_once(|| {
// Include 10MB ICU data file.
assert!(v8::icu::set_common_data(align_data::include_aligned!(
align_data::Align16,
"icudtl.dat"
))
.is_ok());

#[repr(C, align(16))]
struct ICUData([u8; 10413584]);
static ICU_DATA: ICUData = ICUData(*include_bytes!("icudtl.dat"));
v8::icu::set_common_data(&ICU_DATA.0).unwrap();
unsafe { v8_init() };
});

Expand Down

0 comments on commit 10b99e8

Please sign in to comment.