koffi-cream 2.15.6 → 2.16.0

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.
Files changed (2) hide show
  1. package/README.md +8 -8
  2. package/package.json +14 -14
package/README.md CHANGED
@@ -12,25 +12,25 @@ const some_func = lib.func('int some_func(int a, int b)')
12
12
  ```
13
13
 
14
14
  > [!IMPORTANT]
15
- > **koffi-cream is neither a fork nor a patch. It *is* the original Koffi**, only packaged differently to avoid downloading a megalithic[^1] package bloated with files unnecessary to the average user[^2].
15
+ > **koffi-cream is neither a fork nor a patch. It *is* the original Koffi**, only packaged differently to avoid downloading a *previously* megalithic[^1] package bloated with files unnecessary to the average user[^2].
16
16
 
17
- [^1]: As of 2.14.0, Koffi weights 16.9 MB compressed and 86 MB uncompressed.
18
- [^2]: Koffi's package includes 18 native binaries (of which 17 are not compatible with your platform), the build tools and the full source code.
17
+ [^1]: ~~As of 2.14.0, Koffi weights 16.9 MB compressed and 86 MB uncompressed.~~ Not any more. Niels did an impressive work at shrinking the package size on 2.15.4 (down to 41.4 MB) and 2.16.0 (down to 28.7 MB). It's still big (func fact: it's about the same size as the TypeScript 6.0 compiler :-) but it's definitely a huge improvement. Point 2 below still stands, though.
18
+ [^2]: Koffi's package includes 18 native binaries (of which 17 are not compatible with your platform), the build tools and the full C++/asm source code.
19
19
 
20
20
 
21
21
  ## The why and the how
22
22
  The discussion at https://github.com/Koromix/koffi/issues/201 explains why I decided to create `koffi-cream`.
23
23
 
24
- `koffi-cream` repackages Koffi using the same strategy as many popular packages in the JavaScript community like `esbuild` or `swc`: by leveraging the `optionalDependencies`, `os`, `cpu` and `libc` properties in `package.json`.
24
+ `koffi-cream` repackages Koffi using the same strategy as many popular packages in the JavaScript community like `Rollup`, `esbuild` or `swc`: by leveraging the `optionalDependencies`, `os`, `cpu` and `libc` properties in `package.json`.
25
25
 
26
26
  This way, when you install `koffi-cream`, your package manager will only download and install the build that is right for your platform. For example, on Windows AMD/Intel 64 bit, your package manager will install:
27
- - `koffi-cream` (this package): 5.1 kB compressed / 19.8 kB uncompressed
28
- - `@septh/koffi-win32-x64`: 536.2 kB compressed / 2.4 MB uncompressed
27
+ - `koffi-cream` (this package): 5 kB compressed / 20 kB uncompressed
28
+ - `@septh/koffi-win32-x64` (the binary): ≃ 400 kB compressed / ≃ 1.6 MB uncompressed
29
29
 
30
- **That's 74.2% off compared to the original Koffi package!**
30
+ **That's 94.5% off compared to the original Koffi package!**
31
31
 
32
32
  > [!NOTE]
33
- > The `libc` property, used to distinguish Linux distros between gnu and musl, is only supported by `npm 10.4.0` and later, `pnpm 7.1.0` and later, and `yarn 3.2.0` and later.
33
+ > The `libc` property, used to distinguish Linux distros between gnu and musl, is supported by `npm 10.4.0` and later, `pnpm 7.1.0` and later, and `yarn 3.2.0` and later.
34
34
 
35
35
 
36
36
  ## Available packages
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "koffi-cream",
3
- "version": "2.15.6",
3
+ "version": "2.16.0",
4
4
  "description": "A lighter packaging for Koffi, the fast and simple C FFI (foreign function interface) for Node.js",
5
5
  "author": {
6
6
  "name": "Stephan 'Septh' Schreiber",
@@ -41,18 +41,18 @@
41
41
  "main": "index.js",
42
42
  "types": "index.d.ts",
43
43
  "optionalDependencies": {
44
- "@septh/koffi-win32-x64": "2.15.6",
45
- "@septh/koffi-win32-arm64": "2.15.6",
46
- "@septh/koffi-openbsd-x64": "2.15.6",
47
- "@septh/koffi-linux-x64-musl": "2.15.6",
48
- "@septh/koffi-linux-arm64-musl": "2.15.6",
49
- "@septh/koffi-linux-x64-glibc": "2.15.6",
50
- "@septh/koffi-linux-riscv64": "2.15.6",
51
- "@septh/koffi-linux-loong64": "2.15.6",
52
- "@septh/koffi-linux-arm64-glibc": "2.15.6",
53
- "@septh/koffi-freebsd-x64": "2.15.6",
54
- "@septh/koffi-freebsd-arm64": "2.15.6",
55
- "@septh/koffi-darwin-x64": "2.15.6",
56
- "@septh/koffi-darwin-arm64": "2.15.6"
44
+ "@septh/koffi-win32-x64": "2.16.0",
45
+ "@septh/koffi-win32-arm64": "2.16.0",
46
+ "@septh/koffi-openbsd-x64": "2.16.0",
47
+ "@septh/koffi-linux-x64-musl": "2.16.0",
48
+ "@septh/koffi-linux-arm64-musl": "2.16.0",
49
+ "@septh/koffi-linux-x64-glibc": "2.16.0",
50
+ "@septh/koffi-linux-riscv64": "2.16.0",
51
+ "@septh/koffi-linux-loong64": "2.16.0",
52
+ "@septh/koffi-linux-arm64-glibc": "2.16.0",
53
+ "@septh/koffi-freebsd-x64": "2.16.0",
54
+ "@septh/koffi-freebsd-arm64": "2.16.0",
55
+ "@septh/koffi-darwin-x64": "2.16.0",
56
+ "@septh/koffi-darwin-arm64": "2.16.0"
57
57
  }
58
58
  }