mirror of
https://github.com/denoland/deno.git
synced 2025-03-04 01:44:26 -05:00
refactor: simplify icu data alignment (#9766)
This commit is contained in:
parent
fbec6e39c7
commit
10b99e8eb0
3 changed files with 4 additions and 14 deletions
7
Cargo.lock
generated
7
Cargo.lock
generated
|
@ -42,12 +42,6 @@ dependencies = [
|
||||||
"memchr",
|
"memchr",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "align-data"
|
|
||||||
version = "0.1.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "1926655ba000b19e21f0402be09a1d52d318c8a8a68622870bfb7af2a71315cd"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "alloc-no-stdlib"
|
name = "alloc-no-stdlib"
|
||||||
version = "2.0.1"
|
version = "2.0.1"
|
||||||
|
@ -563,7 +557,6 @@ dependencies = [
|
||||||
name = "deno_core"
|
name = "deno_core"
|
||||||
version = "0.81.0"
|
version = "0.81.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"align-data",
|
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"futures",
|
"futures",
|
||||||
"indexmap",
|
"indexmap",
|
||||||
|
|
|
@ -13,7 +13,6 @@ repository = "https://github.com/denoland/deno"
|
||||||
path = "lib.rs"
|
path = "lib.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
align-data = "0.1"
|
|
||||||
anyhow = "1.0.38"
|
anyhow = "1.0.38"
|
||||||
futures = "0.3.12"
|
futures = "0.3.12"
|
||||||
indexmap = "1.6.1"
|
indexmap = "1.6.1"
|
||||||
|
|
|
@ -200,12 +200,10 @@ impl JsRuntime {
|
||||||
static DENO_INIT: Once = Once::new();
|
static DENO_INIT: Once = Once::new();
|
||||||
DENO_INIT.call_once(|| {
|
DENO_INIT.call_once(|| {
|
||||||
// Include 10MB ICU data file.
|
// Include 10MB ICU data file.
|
||||||
assert!(v8::icu::set_common_data(align_data::include_aligned!(
|
#[repr(C, align(16))]
|
||||||
align_data::Align16,
|
struct ICUData([u8; 10413584]);
|
||||||
"icudtl.dat"
|
static ICU_DATA: ICUData = ICUData(*include_bytes!("icudtl.dat"));
|
||||||
))
|
v8::icu::set_common_data(&ICU_DATA.0).unwrap();
|
||||||
.is_ok());
|
|
||||||
|
|
||||||
unsafe { v8_init() };
|
unsafe { v8_init() };
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue