fix(v8): avoid embedding duplicate ICU data

This commit is contained in:
ldm0
2026-09-03 04:22:30 +08:00
parent 52b2b62887
commit 40868d3767
3 changed files with 2 additions and 13 deletions
Generated
-7
View File
@@ -979,12 +979,6 @@ version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "da220af51a1a335e9a930beaaef53d261e41ea9eecfb3d973a3ddae1a7284b9c"
[[package]]
name = "deno_core_icudata"
version = "0.78.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b963d2d79672b4c379e4511acccd27bb35b4c1b32a93f596d52ff14a064293bc"
[[package]]
name = "deno_error"
version = "0.7.1"
@@ -3104,7 +3098,6 @@ dependencies = [
name = "moli-v8-init"
version = "0.1.0"
dependencies = [
"deno_core_icudata",
"v8",
]
-1
View File
@@ -5,7 +5,6 @@ version = "0.1.0"
edition = "2024"
[dependencies]
deno_core_icudata = "0.78.0"
v8 = "152.2.0"
[lints]
+2 -5
View File
@@ -1,8 +1,7 @@
//! Process-wide V8 initialization shared by Moli V8 users.
//!
//! V8 platform and ICU initialization are process-global. Keep the `Once`
//! boundary here so production and tests do not each grow their own init
//! guards.
//! V8 platform initialization is process-global. Keep the `Once` boundary
//! here so production and tests do not each grow their own init guards.
use std::sync::Once;
@@ -25,8 +24,6 @@ pub fn ensure_v8_initialized_with_flags(
if let Some(flags) = flags {
v8::V8::set_flags_from_string(flags);
}
v8::icu::set_common_data_78(deno_core_icudata::ICU_DATA)
.expect("V8 ICU data should initialize");
let platform = create_platform();
v8::V8::initialize_platform(platform);
v8::V8::initialize();