diff --git a/crates/napi/src/bindgen_runtime/module_register.rs b/crates/napi/src/bindgen_runtime/module_register.rs index a5bbba31..aa4f3e8c 100644 --- a/crates/napi/src/bindgen_runtime/module_register.rs +++ b/crates/napi/src/bindgen_runtime/module_register.rs @@ -350,7 +350,14 @@ unsafe extern "C" fn napi_register_wasm_v1( #[cfg(not(feature = "noop"))] #[no_mangle] -unsafe extern "C" fn napi_register_module_v1( +/// Register the n-api module exports. +/// +/// # Safety +/// This method is meant to be called by Node.js while importing the n-api module. +/// Only call this method if the current module is **not** imported by a node-like runtime. +/// +/// Arguments `env` and `exports` must **not** be null. +pub unsafe extern "C" fn napi_register_module_v1( env: sys::napi_env, exports: sys::napi_value, ) -> sys::napi_value {