chore(napi): make napi_register_module_v1 pub (#1747)
* feat(napi): make napi_register_module_v1 pub * docs: add safety section * chore: format doc comment
This commit is contained in:
parent
0dd6422abf
commit
9b4beb83e9
1 changed files with 8 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue