Crate deno_napi

Source
Expand description

Symbols to be exported are now defined in this JSON file. The #[napi_sym] macro checks for missing entries and panics.

./tools/napi/generate_symbols_list.js is used to generate the LINK cli/exports.def on Windows, which is also checked into git.

To add a new napi function:

  1. Place #[napi_sym] on top of your implementation.
  2. Add the function’s identifier to this JSON list.
  3. Finally, run tools/napi/generate_symbols_list.js to update ext/napi/generated_symbol_exports_list_*.def.

Re-exports§

pub use deno_core::v8;

Modules§

function
js_native_api
node_api
ptr
Manually manage memory through raw pointers.
util
uv

Macros§

check_arg
check_env
napi_wrap
return_error_status_if_false
return_status_if_false
status_call

Structs§

CStr
Representation of a borrowed C string.
Env
EnvShared
Env that is shared between all contexts in same native module.
InstanceData
NapiModule
NapiState
deno_napi
An extension for use with the Deno JS runtime. To use it, provide it as an argument when instantiating your runtime:
napi_extended_error_info
napi_node_version
napi_property_descriptor
napi_type_tag

Enums§

NApiError

Constants§

MODULE_TO_REGISTER
NAPI_AUTO_LENGTH
napi_array_expected
napi_arraybuffer_expected
napi_bigint
napi_bigint64_array
napi_bigint_expected
napi_biguint64_array
napi_boolean
napi_boolean_expected
napi_callback_scope_mismatch
napi_cancelled
napi_cannot_run_js
napi_closing
napi_configurable
napi_date_expected
napi_default
napi_default_jsproperty
napi_default_method
napi_detachable_arraybuffer_expected
napi_enumerable
napi_escape_called_twice
napi_external
napi_float32_array
napi_float64_array
napi_function
napi_function_expected
napi_generic_failure
napi_handle_scope_mismatch
napi_int8_array
napi_int16_array
napi_int32_array
napi_invalid_arg
napi_key_all_properties
napi_key_configurable
napi_key_enumerable
napi_key_include_prototypes
napi_key_keep_numbers
napi_key_numbers_to_strings
napi_key_own_only
napi_key_skip_strings
napi_key_skip_symbols
napi_key_writable
napi_name_expected
napi_no_external_buffers_allowed
napi_null
napi_number
napi_number_expected
napi_object
napi_object_expected
napi_ok
napi_pending_exception
napi_queue_full
napi_static
napi_string
napi_string_expected
napi_symbol
napi_tsfn_abort
napi_tsfn_blocking
napi_tsfn_nonblocking
napi_tsfn_release
napi_uint8_array
napi_uint8_clamped_array
napi_uint16_array
napi_uint32_array
napi_undefined
napi_would_deadlock
napi_writable

Statics§

ERROR_MESSAGES

Traits§

NapiPermissions
PendingNapiAsyncWork

Functions§

print_linker_flags

Type Aliases§

c_char
Equivalent to C’s char type.
c_void
Equivalent to C’s void type when used as a pointer.
napi_async_cleanup_hook
napi_async_cleanup_hook_handle
napi_async_complete_callback
napi_async_context
napi_async_execute_callback
napi_async_work
napi_callback
napi_callback_info
napi_callback_scope
napi_cleanup_hook
napi_deferred
napi_env
napi_escapable_handle_scope
napi_finalize
napi_handle_scope
napi_key_collection_mode
napi_key_conversion
napi_key_filter
napi_property_attributes
napi_ref
napi_status
napi_threadsafe_function
napi_threadsafe_function_call_js
napi_threadsafe_function_call_mode
napi_threadsafe_function_release_mode
napi_typedarray_type
napi_value
napi_valuetype