koffi 2.8.9 → 2.8.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/build/koffi/darwin_arm64/koffi.node +0 -0
- package/build/koffi/darwin_x64/koffi.node +0 -0
- package/build/koffi/freebsd_arm64/koffi.node +0 -0
- package/build/koffi/freebsd_ia32/koffi.node +0 -0
- package/build/koffi/freebsd_x64/koffi.node +0 -0
- package/build/koffi/linux_arm64/koffi.node +0 -0
- package/build/koffi/linux_armhf/koffi.node +0 -0
- package/build/koffi/linux_ia32/koffi.node +0 -0
- package/build/koffi/linux_riscv64d/koffi.node +0 -0
- package/build/koffi/linux_x64/koffi.node +0 -0
- package/build/koffi/openbsd_ia32/koffi.node +0 -0
- package/build/koffi/openbsd_x64/koffi.node +0 -0
- package/build/koffi/win32_arm64/koffi.exp +0 -0
- package/build/koffi/win32_arm64/koffi.lib +0 -0
- package/build/koffi/win32_arm64/koffi.node +0 -0
- package/build/koffi/win32_ia32/koffi.exp +0 -0
- package/build/koffi/win32_ia32/koffi.lib +0 -0
- package/build/koffi/win32_ia32/koffi.node +0 -0
- package/build/koffi/win32_x64/koffi.exp +0 -0
- package/build/koffi/win32_x64/koffi.lib +0 -0
- package/build/koffi/win32_x64/koffi.node +0 -0
- package/index.js +28 -48
- package/indirect.js +24 -44
- package/package.json +5 -3
- package/src/cnoke/assets/FindCNoke.cmake +16 -3
- package/src/cnoke/src/builder.js +109 -102
- package/src/cnoke/src/tools.js +5 -23
- package/src/koffi/CMakeLists.txt +1 -1
- package/vendor/node-api-headers/CHANGELOG.md +79 -0
- package/vendor/node-api-headers/CODE_OF_CONDUCT.md +4 -0
- package/vendor/node-api-headers/CONTRIBUTING.md +32 -0
- package/vendor/node-api-headers/CREATING_A_RELEASE.md +58 -0
- package/vendor/node-api-headers/LICENSE +21 -0
- package/vendor/node-api-headers/README.md +106 -0
- package/vendor/node-api-headers/def/js_native_api.def +120 -0
- package/vendor/node-api-headers/def/node_api.def +151 -0
- package/vendor/node-api-headers/include/js_native_api.h +569 -0
- package/vendor/node-api-headers/include/js_native_api_types.h +168 -0
- package/vendor/node-api-headers/include/node_api.h +260 -0
- package/vendor/node-api-headers/include/node_api_types.h +52 -0
- package/vendor/node-api-headers/index.js +17 -0
- package/vendor/node-api-headers/package.json +59 -0
- package/vendor/node-api-headers/scripts/clang-utils.js +50 -0
- package/vendor/node-api-headers/scripts/update-headers.js +189 -0
- package/vendor/node-api-headers/scripts/write-symbols.js +154 -0
- package/vendor/node-api-headers/scripts/write-win32-def.js +52 -0
- package/vendor/node-api-headers/symbols.js +241 -0
- package/build/koffi/linux_arm32hf/koffi.node +0 -0
- package/build/koffi/linux_riscv64hf64/koffi.node +0 -0
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# node-api-headers
|
|
2
|
+
|
|
3
|
+
- **[Introduction](#introduction)**
|
|
4
|
+
- **[Contributing](CONTRIBUTING.md)**
|
|
5
|
+
- **[Code of Conduct](CODE_OF_CONDUCT.md)**
|
|
6
|
+
- **[Install](#install)**
|
|
7
|
+
- **[API](#api)**
|
|
8
|
+
- **[Creating a release](CREATING_A_RELEASE.md)**
|
|
9
|
+
- **[Team](#team)**
|
|
10
|
+
- **[License](#license)**
|
|
11
|
+
|
|
12
|
+
## Current Node-API version: 9
|
|
13
|
+
|
|
14
|
+
(See [CHANGELOG.md](CHANGELOG.md) for complete Changelog)
|
|
15
|
+
|
|
16
|
+
<a name="introduction"></a>
|
|
17
|
+
|
|
18
|
+
## Introduction
|
|
19
|
+
|
|
20
|
+
**node-api-headers** contains the header files for the C-based Node-API
|
|
21
|
+
provided by Node.js. Node-API is an API for building native addons that
|
|
22
|
+
guarantees the ABI (Application Binary Interface) stability across versions
|
|
23
|
+
of Node.js (see: [Node-API](https://nodejs.org/dist/latest/docs/api/n-api.html)).
|
|
24
|
+
|
|
25
|
+
Node-API headers are in the `include` folder. The Node-APIs that provide
|
|
26
|
+
ECMAScript features from native code can be found in `js_native_api_types.h`
|
|
27
|
+
and `js_native_api.h`. The APIs defined in these headers are included in
|
|
28
|
+
`node_api_types.h` and `node_api.h`.
|
|
29
|
+
The headers are structured in this way in order to allow implementations of
|
|
30
|
+
Node-API outside of Node.js considering that for those implementations the
|
|
31
|
+
Node.js specific APIs may not be applicable.
|
|
32
|
+
|
|
33
|
+
**node-api-headers** is also a package published on **npm** that could be used
|
|
34
|
+
in a process to compile and build native addons for Node.js.
|
|
35
|
+
|
|
36
|
+
<a name="install"></a>
|
|
37
|
+
|
|
38
|
+
## Install
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
npm i node-api-headers
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
<a name="versions"></a>
|
|
45
|
+
|
|
46
|
+
## Versions
|
|
47
|
+
|
|
48
|
+
Node-API C headers are backward-compatible. Its version (e.g. `8`) is released
|
|
49
|
+
separately from the Node.js version stream (e.g. `19.8.1`) and changes are
|
|
50
|
+
backported to active Node.js LTS lines (e.g. `16.x` and `18.x`).
|
|
51
|
+
|
|
52
|
+
This package publishes semver-minor versions with new Node-API C headers changes.
|
|
53
|
+
JS API breaking changes are published with new semver-major versions.
|
|
54
|
+
|
|
55
|
+
<a name="api"></a>
|
|
56
|
+
|
|
57
|
+
## API
|
|
58
|
+
|
|
59
|
+
The module exports two properties `include_dir` and `symbols`.
|
|
60
|
+
### `include_dir`
|
|
61
|
+
|
|
62
|
+
This property is a string that represents the include path for the Node-API
|
|
63
|
+
headers.
|
|
64
|
+
|
|
65
|
+
### `def_paths`
|
|
66
|
+
|
|
67
|
+
This property is an object that has two keys `js_native_api_def` and
|
|
68
|
+
`node_api_def` which represents the path of the module definition file for the
|
|
69
|
+
`js_native_api` and `node_api` respectively.
|
|
70
|
+
|
|
71
|
+
### `symbols`
|
|
72
|
+
|
|
73
|
+
This property is an object that represents the symbols exported by Node-API
|
|
74
|
+
grouped by version and api types.
|
|
75
|
+
|
|
76
|
+
```js
|
|
77
|
+
V1: {
|
|
78
|
+
js_native_api_symbols: [
|
|
79
|
+
// List of symbols in js_native_api.h for the version 1.
|
|
80
|
+
],
|
|
81
|
+
node_api_symbols: [
|
|
82
|
+
// List of symbols in node_api.h for the version 1
|
|
83
|
+
]
|
|
84
|
+
},
|
|
85
|
+
// ...
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
<a name="team"></a>
|
|
89
|
+
|
|
90
|
+
## Team members
|
|
91
|
+
|
|
92
|
+
### Active
|
|
93
|
+
| Name | GitHub Link |
|
|
94
|
+
| ------------------- | ----------------------------------------------------- |
|
|
95
|
+
| Anna Henningsen | [addaleax](https://github.com/addaleax) |
|
|
96
|
+
| Chengzhong Wu | [legendecas](https://github.com/legendecas) |
|
|
97
|
+
| Gabriel Schulhof | [gabrielschulhof](https://github.com/gabrielschulhof) |
|
|
98
|
+
| Hitesh Kanwathirtha | [digitalinfinity](https://github.com/digitalinfinity) |
|
|
99
|
+
| Jim Schlight | [jschlight](https://github.com/jschlight) |
|
|
100
|
+
| Michael Dawson | [mhdawson](https://github.com/mhdawson) |
|
|
101
|
+
| Kevin Eady | [KevinEady](https://github.com/KevinEady)
|
|
102
|
+
| Nicola Del Gobbo | [NickNaso](https://github.com/NickNaso) |
|
|
103
|
+
|
|
104
|
+
<a name="license"></a>
|
|
105
|
+
|
|
106
|
+
Licensed under [MIT](./LICENSE.md)
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
NAME NODE.EXE
|
|
2
|
+
EXPORTS
|
|
3
|
+
napi_adjust_external_memory
|
|
4
|
+
napi_call_function
|
|
5
|
+
napi_close_escapable_handle_scope
|
|
6
|
+
napi_close_handle_scope
|
|
7
|
+
napi_coerce_to_bool
|
|
8
|
+
napi_coerce_to_number
|
|
9
|
+
napi_coerce_to_object
|
|
10
|
+
napi_coerce_to_string
|
|
11
|
+
napi_create_array
|
|
12
|
+
napi_create_array_with_length
|
|
13
|
+
napi_create_arraybuffer
|
|
14
|
+
napi_create_dataview
|
|
15
|
+
napi_create_double
|
|
16
|
+
napi_create_error
|
|
17
|
+
napi_create_external
|
|
18
|
+
napi_create_external_arraybuffer
|
|
19
|
+
napi_create_function
|
|
20
|
+
napi_create_int32
|
|
21
|
+
napi_create_int64
|
|
22
|
+
napi_create_object
|
|
23
|
+
napi_create_promise
|
|
24
|
+
napi_create_range_error
|
|
25
|
+
napi_create_reference
|
|
26
|
+
napi_create_string_latin1
|
|
27
|
+
napi_create_string_utf16
|
|
28
|
+
napi_create_string_utf8
|
|
29
|
+
napi_create_symbol
|
|
30
|
+
napi_create_type_error
|
|
31
|
+
napi_create_typedarray
|
|
32
|
+
napi_create_uint32
|
|
33
|
+
napi_define_class
|
|
34
|
+
napi_define_properties
|
|
35
|
+
napi_delete_element
|
|
36
|
+
napi_delete_property
|
|
37
|
+
napi_delete_reference
|
|
38
|
+
napi_escape_handle
|
|
39
|
+
napi_get_and_clear_last_exception
|
|
40
|
+
napi_get_array_length
|
|
41
|
+
napi_get_arraybuffer_info
|
|
42
|
+
napi_get_boolean
|
|
43
|
+
napi_get_cb_info
|
|
44
|
+
napi_get_dataview_info
|
|
45
|
+
napi_get_element
|
|
46
|
+
napi_get_global
|
|
47
|
+
napi_get_last_error_info
|
|
48
|
+
napi_get_named_property
|
|
49
|
+
napi_get_new_target
|
|
50
|
+
napi_get_null
|
|
51
|
+
napi_get_property
|
|
52
|
+
napi_get_property_names
|
|
53
|
+
napi_get_prototype
|
|
54
|
+
napi_get_reference_value
|
|
55
|
+
napi_get_typedarray_info
|
|
56
|
+
napi_get_undefined
|
|
57
|
+
napi_get_value_bool
|
|
58
|
+
napi_get_value_double
|
|
59
|
+
napi_get_value_external
|
|
60
|
+
napi_get_value_int32
|
|
61
|
+
napi_get_value_int64
|
|
62
|
+
napi_get_value_string_latin1
|
|
63
|
+
napi_get_value_string_utf16
|
|
64
|
+
napi_get_value_string_utf8
|
|
65
|
+
napi_get_value_uint32
|
|
66
|
+
napi_get_version
|
|
67
|
+
napi_has_element
|
|
68
|
+
napi_has_named_property
|
|
69
|
+
napi_has_own_property
|
|
70
|
+
napi_has_property
|
|
71
|
+
napi_instanceof
|
|
72
|
+
napi_is_array
|
|
73
|
+
napi_is_arraybuffer
|
|
74
|
+
napi_is_dataview
|
|
75
|
+
napi_is_error
|
|
76
|
+
napi_is_exception_pending
|
|
77
|
+
napi_is_promise
|
|
78
|
+
napi_is_typedarray
|
|
79
|
+
napi_new_instance
|
|
80
|
+
napi_open_escapable_handle_scope
|
|
81
|
+
napi_open_handle_scope
|
|
82
|
+
napi_reference_ref
|
|
83
|
+
napi_reference_unref
|
|
84
|
+
napi_reject_deferred
|
|
85
|
+
napi_remove_wrap
|
|
86
|
+
napi_resolve_deferred
|
|
87
|
+
napi_run_script
|
|
88
|
+
napi_set_element
|
|
89
|
+
napi_set_named_property
|
|
90
|
+
napi_set_property
|
|
91
|
+
napi_strict_equals
|
|
92
|
+
napi_throw
|
|
93
|
+
napi_throw_error
|
|
94
|
+
napi_throw_range_error
|
|
95
|
+
napi_throw_type_error
|
|
96
|
+
napi_typeof
|
|
97
|
+
napi_unwrap
|
|
98
|
+
napi_wrap
|
|
99
|
+
napi_add_finalizer
|
|
100
|
+
napi_create_date
|
|
101
|
+
napi_get_date_value
|
|
102
|
+
napi_is_date
|
|
103
|
+
napi_create_bigint_int64
|
|
104
|
+
napi_create_bigint_uint64
|
|
105
|
+
napi_create_bigint_words
|
|
106
|
+
napi_get_all_property_names
|
|
107
|
+
napi_get_instance_data
|
|
108
|
+
napi_get_value_bigint_int64
|
|
109
|
+
napi_get_value_bigint_uint64
|
|
110
|
+
napi_get_value_bigint_words
|
|
111
|
+
napi_set_instance_data
|
|
112
|
+
napi_detach_arraybuffer
|
|
113
|
+
napi_is_detached_arraybuffer
|
|
114
|
+
napi_check_object_type_tag
|
|
115
|
+
napi_object_freeze
|
|
116
|
+
napi_object_seal
|
|
117
|
+
napi_type_tag_object
|
|
118
|
+
node_api_create_syntax_error
|
|
119
|
+
node_api_symbol_for
|
|
120
|
+
node_api_throw_syntax_error
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
NAME NODE.EXE
|
|
2
|
+
EXPORTS
|
|
3
|
+
napi_async_destroy
|
|
4
|
+
napi_async_init
|
|
5
|
+
napi_cancel_async_work
|
|
6
|
+
napi_create_async_work
|
|
7
|
+
napi_create_buffer
|
|
8
|
+
napi_create_buffer_copy
|
|
9
|
+
napi_create_external_buffer
|
|
10
|
+
napi_delete_async_work
|
|
11
|
+
napi_fatal_error
|
|
12
|
+
napi_get_buffer_info
|
|
13
|
+
napi_get_node_version
|
|
14
|
+
napi_is_buffer
|
|
15
|
+
napi_make_callback
|
|
16
|
+
napi_module_register
|
|
17
|
+
napi_queue_async_work
|
|
18
|
+
napi_adjust_external_memory
|
|
19
|
+
napi_call_function
|
|
20
|
+
napi_close_escapable_handle_scope
|
|
21
|
+
napi_close_handle_scope
|
|
22
|
+
napi_coerce_to_bool
|
|
23
|
+
napi_coerce_to_number
|
|
24
|
+
napi_coerce_to_object
|
|
25
|
+
napi_coerce_to_string
|
|
26
|
+
napi_create_array
|
|
27
|
+
napi_create_array_with_length
|
|
28
|
+
napi_create_arraybuffer
|
|
29
|
+
napi_create_dataview
|
|
30
|
+
napi_create_double
|
|
31
|
+
napi_create_error
|
|
32
|
+
napi_create_external
|
|
33
|
+
napi_create_external_arraybuffer
|
|
34
|
+
napi_create_function
|
|
35
|
+
napi_create_int32
|
|
36
|
+
napi_create_int64
|
|
37
|
+
napi_create_object
|
|
38
|
+
napi_create_promise
|
|
39
|
+
napi_create_range_error
|
|
40
|
+
napi_create_reference
|
|
41
|
+
napi_create_string_latin1
|
|
42
|
+
napi_create_string_utf16
|
|
43
|
+
napi_create_string_utf8
|
|
44
|
+
napi_create_symbol
|
|
45
|
+
napi_create_type_error
|
|
46
|
+
napi_create_typedarray
|
|
47
|
+
napi_create_uint32
|
|
48
|
+
napi_define_class
|
|
49
|
+
napi_define_properties
|
|
50
|
+
napi_delete_element
|
|
51
|
+
napi_delete_property
|
|
52
|
+
napi_delete_reference
|
|
53
|
+
napi_escape_handle
|
|
54
|
+
napi_get_and_clear_last_exception
|
|
55
|
+
napi_get_array_length
|
|
56
|
+
napi_get_arraybuffer_info
|
|
57
|
+
napi_get_boolean
|
|
58
|
+
napi_get_cb_info
|
|
59
|
+
napi_get_dataview_info
|
|
60
|
+
napi_get_element
|
|
61
|
+
napi_get_global
|
|
62
|
+
napi_get_last_error_info
|
|
63
|
+
napi_get_named_property
|
|
64
|
+
napi_get_new_target
|
|
65
|
+
napi_get_null
|
|
66
|
+
napi_get_property
|
|
67
|
+
napi_get_property_names
|
|
68
|
+
napi_get_prototype
|
|
69
|
+
napi_get_reference_value
|
|
70
|
+
napi_get_typedarray_info
|
|
71
|
+
napi_get_undefined
|
|
72
|
+
napi_get_value_bool
|
|
73
|
+
napi_get_value_double
|
|
74
|
+
napi_get_value_external
|
|
75
|
+
napi_get_value_int32
|
|
76
|
+
napi_get_value_int64
|
|
77
|
+
napi_get_value_string_latin1
|
|
78
|
+
napi_get_value_string_utf16
|
|
79
|
+
napi_get_value_string_utf8
|
|
80
|
+
napi_get_value_uint32
|
|
81
|
+
napi_get_version
|
|
82
|
+
napi_has_element
|
|
83
|
+
napi_has_named_property
|
|
84
|
+
napi_has_own_property
|
|
85
|
+
napi_has_property
|
|
86
|
+
napi_instanceof
|
|
87
|
+
napi_is_array
|
|
88
|
+
napi_is_arraybuffer
|
|
89
|
+
napi_is_dataview
|
|
90
|
+
napi_is_error
|
|
91
|
+
napi_is_exception_pending
|
|
92
|
+
napi_is_promise
|
|
93
|
+
napi_is_typedarray
|
|
94
|
+
napi_new_instance
|
|
95
|
+
napi_open_escapable_handle_scope
|
|
96
|
+
napi_open_handle_scope
|
|
97
|
+
napi_reference_ref
|
|
98
|
+
napi_reference_unref
|
|
99
|
+
napi_reject_deferred
|
|
100
|
+
napi_remove_wrap
|
|
101
|
+
napi_resolve_deferred
|
|
102
|
+
napi_run_script
|
|
103
|
+
napi_set_element
|
|
104
|
+
napi_set_named_property
|
|
105
|
+
napi_set_property
|
|
106
|
+
napi_strict_equals
|
|
107
|
+
napi_throw
|
|
108
|
+
napi_throw_error
|
|
109
|
+
napi_throw_range_error
|
|
110
|
+
napi_throw_type_error
|
|
111
|
+
napi_typeof
|
|
112
|
+
napi_unwrap
|
|
113
|
+
napi_wrap
|
|
114
|
+
napi_get_uv_event_loop
|
|
115
|
+
napi_add_env_cleanup_hook
|
|
116
|
+
napi_close_callback_scope
|
|
117
|
+
napi_fatal_exception
|
|
118
|
+
napi_open_callback_scope
|
|
119
|
+
napi_remove_env_cleanup_hook
|
|
120
|
+
napi_acquire_threadsafe_function
|
|
121
|
+
napi_call_threadsafe_function
|
|
122
|
+
napi_create_threadsafe_function
|
|
123
|
+
napi_get_threadsafe_function_context
|
|
124
|
+
napi_ref_threadsafe_function
|
|
125
|
+
napi_release_threadsafe_function
|
|
126
|
+
napi_unref_threadsafe_function
|
|
127
|
+
napi_add_finalizer
|
|
128
|
+
napi_create_date
|
|
129
|
+
napi_get_date_value
|
|
130
|
+
napi_is_date
|
|
131
|
+
napi_create_bigint_int64
|
|
132
|
+
napi_create_bigint_uint64
|
|
133
|
+
napi_create_bigint_words
|
|
134
|
+
napi_get_all_property_names
|
|
135
|
+
napi_get_instance_data
|
|
136
|
+
napi_get_value_bigint_int64
|
|
137
|
+
napi_get_value_bigint_uint64
|
|
138
|
+
napi_get_value_bigint_words
|
|
139
|
+
napi_set_instance_data
|
|
140
|
+
napi_detach_arraybuffer
|
|
141
|
+
napi_is_detached_arraybuffer
|
|
142
|
+
napi_add_async_cleanup_hook
|
|
143
|
+
napi_remove_async_cleanup_hook
|
|
144
|
+
napi_check_object_type_tag
|
|
145
|
+
napi_object_freeze
|
|
146
|
+
napi_object_seal
|
|
147
|
+
napi_type_tag_object
|
|
148
|
+
node_api_get_module_file_name
|
|
149
|
+
node_api_create_syntax_error
|
|
150
|
+
node_api_symbol_for
|
|
151
|
+
node_api_throw_syntax_error
|