koffi 3.0.0-alpha.1 → 3.0.0-alpha.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 +46 -0
- package/LICENSE.txt +1 -1
- 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_ia32/koffi.node +0 -0
- package/build/koffi/linux_x64/koffi.node +0 -0
- package/build/koffi/musl_arm64/koffi.node +0 -0
- package/build/koffi/musl_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_ia32/koffi.node +0 -0
- package/build/koffi/win32_x64/koffi.node +0 -0
- package/cnoke.cjs +816 -0
- package/doc/callbacks.md +9 -9
- package/doc/contribute.md +5 -3
- package/doc/functions.md +6 -6
- package/doc/input.md +70 -6
- package/doc/misc.md +14 -15
- package/doc/output.md +10 -10
- package/doc/packaging.md +7 -7
- package/doc/pointers.md +14 -16
- package/doc/start.md +4 -4
- package/doc/unions.md +2 -2
- package/doc/variables.md +4 -4
- package/index.cjs +1 -0
- package/index.d.ts +102 -97
- package/index.js +1 -628
- package/indirect.cjs +1 -0
- package/indirect.js +1 -531
- package/lib/native/base/base.cc +86 -92
- package/lib/native/base/base.hh +150 -128
- package/lib/native/base/unicode.inc +1 -1
- package/package.json +19 -8
- package/src/koffi/CMakeLists.txt +48 -9
- package/src/koffi/index.cjs +333 -0
- package/src/koffi/index.js +271 -0
- package/src/koffi/indirect.cjs +332 -0
- package/src/koffi/indirect.js +182 -0
- package/src/koffi/src/abi/arm32.cc +3 -3
- package/src/koffi/src/abi/arm32_asm.S +1 -1
- package/src/koffi/src/abi/arm64.cc +95 -83
- package/src/koffi/src/abi/arm64_asm.S +1 -1
- package/src/koffi/src/abi/arm64_asm.asm +1 -1
- package/src/koffi/src/abi/loong64.cc +1 -1
- package/src/koffi/src/abi/loong64_asm.S +1 -1
- package/src/koffi/src/abi/riscv64.cc +3 -3
- package/src/koffi/src/abi/riscv64_asm.S +1 -1
- package/src/koffi/src/abi/x64sysv.cc +78 -68
- package/src/koffi/src/abi/x64sysv_asm.S +1 -1
- package/src/koffi/src/abi/x64win.cc +63 -53
- package/src/koffi/src/abi/x64win_asm.S +1 -1
- package/src/koffi/src/abi/x64win_asm.asm +1 -1
- package/src/koffi/src/abi/x86.cc +57 -60
- package/src/koffi/src/abi/x86_asm.S +1 -1
- package/src/koffi/src/abi/x86_asm.asm +1 -1
- package/src/koffi/src/call.cc +154 -106
- package/src/koffi/src/call.hh +23 -32
- package/src/koffi/src/errno.inc +1 -1
- package/src/koffi/src/ffi.cc +331 -331
- package/src/koffi/src/ffi.hh +56 -33
- package/src/koffi/src/parser.cc +1 -1
- package/src/koffi/src/parser.hh +1 -1
- package/src/koffi/src/primitives.inc +2 -2
- package/src/koffi/{tools/write_trampolines.js → src/trampolines.cjs} +4 -4
- package/src/koffi/src/util.cc +487 -359
- package/src/koffi/src/util.hh +115 -24
- package/src/koffi/src/uv.cc +36 -21
- package/src/koffi/src/uv.def +1 -3
- package/src/koffi/src/uv.hh +74 -3
- package/src/koffi/src/win32.cc +1 -1
- package/src/koffi/src/win32.hh +30 -13
- package/vendor/node-addon-api/napi-inl.h +28 -32
- package/doc/benchmarks.xlsx +0 -0
- package/lib/native/base/crc.inc +0 -2214
- package/lib/native/base/crc_gen.py +0 -72
- package/lib/native/base/mimetypes.inc +0 -1248
- package/lib/native/base/mimetypes_gen.py +0 -58
- package/lib/native/base/tower.cc +0 -821
- package/lib/native/base/tower.hh +0 -81
- package/lib/native/base/unicode_gen.py +0 -152
- package/src/cnoke/LICENSE.txt +0 -22
- package/src/cnoke/README.md +0 -99
- package/src/cnoke/assets/FindCNoke.cmake +0 -127
- package/src/cnoke/assets/toolchains.json +0 -126
- package/src/cnoke/assets/win_delay_hook.c +0 -36
- package/src/cnoke/cnoke.js +0 -180
- package/src/cnoke/package.json +0 -24
- package/src/cnoke/src/builder.js +0 -514
- package/src/cnoke/src/index.js +0 -10
- package/src/cnoke/src/tools.js +0 -407
- package/vendor/node-api-headers/include/uv/aix.h +0 -32
- package/vendor/node-api-headers/include/uv/bsd.h +0 -34
- package/vendor/node-api-headers/include/uv/darwin.h +0 -61
- package/vendor/node-api-headers/include/uv/errno.h +0 -483
- package/vendor/node-api-headers/include/uv/linux.h +0 -34
- package/vendor/node-api-headers/include/uv/os390.h +0 -33
- package/vendor/node-api-headers/include/uv/posix.h +0 -31
- package/vendor/node-api-headers/include/uv/sunos.h +0 -44
- package/vendor/node-api-headers/include/uv/threadpool.h +0 -37
- package/vendor/node-api-headers/include/uv/tree.h +0 -521
- package/vendor/node-api-headers/include/uv/unix.h +0 -512
- package/vendor/node-api-headers/include/uv/version.h +0 -43
- package/vendor/node-api-headers/include/uv/win.h +0 -698
- package/vendor/node-api-headers/include/uv.h +0 -1990
package/CHANGELOG.md
CHANGED
|
@@ -3,10 +3,56 @@
|
|
|
3
3
|
> [!NOTE]
|
|
4
4
|
> Consult the [migration guide](migration) to migrate between major Koffi versions.
|
|
5
5
|
|
|
6
|
+
## Koffi 3
|
|
7
|
+
|
|
8
|
+
### Koffi 3.0
|
|
9
|
+
|
|
10
|
+
#### Koffi 3.0.0 (WIP)
|
|
11
|
+
|
|
12
|
+
*Not yet released*
|
|
13
|
+
|
|
14
|
+
**Main changes:**
|
|
15
|
+
|
|
16
|
+
- Replace use of externals with type objects:
|
|
17
|
+
* Use `koffi.type()` to resolve type specifiers (strings or objects) to type objects
|
|
18
|
+
* Access type information directly on type objects without `koffi.introspect()`
|
|
19
|
+
- Replace use of externals with BigInt pointers
|
|
20
|
+
- Support ESM and CJS module types
|
|
21
|
+
- Rewrite call preparation and execution for vastly improved performance
|
|
22
|
+
|
|
23
|
+
**Other changes:**
|
|
24
|
+
|
|
25
|
+
- Add `koffi.enumeration()` to create [enum types](input#enum-types)
|
|
26
|
+
- Use proper types for various objects and handles:
|
|
27
|
+
* Use *LibraryHandle* objects for loaded libraries
|
|
28
|
+
* Use *CallbackHandle* objects for registered callbacks
|
|
29
|
+
* Use *PollHandle* for socket poll handles
|
|
30
|
+
- Add `Symbol.dispose` on library objects and registered callbacks
|
|
31
|
+
- Prefer types to interfaces in TypeScript declaration file
|
|
32
|
+
- Fix various bugs and small leaks (such as library handles)
|
|
33
|
+
|
|
34
|
+
**Newly deprecated functions:**
|
|
35
|
+
|
|
36
|
+
- Deprecate `koffi.resolve()` function, replace with `koffi.type()`
|
|
37
|
+
- Deprecate `koffi.introspect()` function, replace with `koffi.type()`
|
|
38
|
+
|
|
39
|
+
**Removed deprecated functions:**
|
|
40
|
+
|
|
41
|
+
- Remove `koffi.callback()` long replaced with `koffi.proto()`
|
|
42
|
+
- Remove `koffi.handle()` long replaced with `koffi.opaque()`
|
|
43
|
+
|
|
44
|
+
Consult the [migration guide](migration) for more information.
|
|
45
|
+
|
|
6
46
|
## Koffi 2
|
|
7
47
|
|
|
8
48
|
### Koffi 2.16
|
|
9
49
|
|
|
50
|
+
#### Koffi 2.16.2
|
|
51
|
+
|
|
52
|
+
*Released on 2026-05-06*
|
|
53
|
+
|
|
54
|
+
- Fix string truncation bugs when passing some kinds of long V8 strings (see [Koromix/koffi#266](https://github.com/Koromix/koffi/issues/266))
|
|
55
|
+
|
|
10
56
|
#### Koffi 2.16.1
|
|
11
57
|
|
|
12
58
|
*Released on 2026-04-17*
|
package/LICENSE.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (C)
|
|
3
|
+
Copyright (C) 2026 Niels Martignène <niels.martignene@protonmail.com>
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
6
6
|
this software and associated documentation files (the “Software”), to deal in
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|