From 10b99e8eb0e04e8340187b8aafe860405114d0d7 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Fri, 12 Mar 2021 23:55:32 +0100 Subject: refactor: simplify icu data alignment (#9766) --- core/Cargo.toml | 1 - core/runtime.rs | 10 ++++------ 2 files changed, 4 insertions(+), 7 deletions(-) (limited to 'core') diff --git a/core/Cargo.toml b/core/Cargo.toml index d31727f8f..7e6802c76 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -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" diff --git a/core/runtime.rs b/core/runtime.rs index f6d0ab5a6..c7a945717 100644 --- a/core/runtime.rs +++ b/core/runtime.rs @@ -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() }; }); -- cgit v1.2.3