Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ fn createV8_Build(b: *std.Build, target: std.Build.ResolvedTarget, mode: std.bui
if (!icu) {
// Don't add i18n for now. It has a large dependency on third_party/icu.
try gn_args.append("v8_enable_i18n_support=false");
} else {
try gn_args.append("icu_use_data_file=false");
}

if (mode != .Debug) {
Expand Down
2 changes: 2 additions & 0 deletions src/binding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ void v8__V8__InitializePlatform(v8::Platform* platform) {

void v8__V8__Initialize() { v8::V8::Initialize(); }

bool v8__V8__InitializeICU() { return v8::V8::InitializeICU(); }

int v8__V8__Dispose() { return v8::V8::Dispose(); }

void v8__V8__DisposePlatform() { v8::V8::DisposePlatform(); }
Expand Down
1 change: 1 addition & 0 deletions src/binding.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ const Uint8Array* v8__Uint8Array__New(
// V8
void v8__V8__InitializePlatform(Platform* platform);
void v8__V8__Initialize();
bool v8__V8__InitializeICU();
int v8__V8__Dispose();
void v8__V8__DisposePlatform();
const char* v8__V8__GetVersion();
Expand Down
6 changes: 6 additions & 0 deletions src/v8.zig
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,12 @@ pub fn initV8() void {
c.v8__V8__Initialize();
}

/// [v8]
/// Initializes the ICU bundled with v8.
pub fn initV8ICU() bool {
return c.v8__V8__InitializeICU();
}

/// [v8]
/// Releases any resources used by v8 and stops any utility thread
/// that may be running. Note that disposing v8 is permanent, it
Expand Down