1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 15:24:46 -05:00

refactor: simplify icu data alignment (#9766)

This commit is contained in:
Ben Noordhuis 2021-03-12 23:55:32 +01:00 committed by GitHub
parent fbec6e39c7
commit 10b99e8eb0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 14 deletions

7
Cargo.lock generated
View file

@ -42,12 +42,6 @@ dependencies = [
"memchr",
]
[[package]]
name = "align-data"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1926655ba000b19e21f0402be09a1d52d318c8a8a68622870bfb7af2a71315cd"
[[package]]
name = "alloc-no-stdlib"
version = "2.0.1"
@ -563,7 +557,6 @@ dependencies = [
name = "deno_core"
version = "0.81.0"
dependencies = [
"align-data",
"anyhow",
"futures",
"indexmap",

View file

@ -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"

View file

@ -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() };
});