Skip to content
Merged
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
6 changes: 6 additions & 0 deletions src/napi.zig
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ const err = @import("./napi/wrapper/error.zig");
const thread_safe_function = @import("./napi/wrapper/thread_safe_function.zig");
const class = @import("./napi/wrapper/class.zig");

const DefaultGlobalAllocator = @import("./napi/util/allocator.zig");

pub const napi_sys = @import("napi-sys");

pub const Env = env.Env;
Expand All @@ -34,5 +36,9 @@ pub const ThreadSafeFunction = thread_safe_function.ThreadSafeFunction;
pub const Class = class.Class;
pub const ClassWithoutInit = class.ClassWithoutInit;

/// Default global allocator is the page allocator
/// You can change it by calling `GlobalAllocator.setGlobalAllocator`
pub const GlobalAllocator = DefaultGlobalAllocator;

pub const NODE_API_MODULE = module.NODE_API_MODULE;
pub const NODE_API_MODULE_WITH_INIT = module.NODE_API_MODULE_WITH_INIT;