@openzim/libzim 3.4.0 → 3.5.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.
package/Changelog CHANGED
@@ -1,3 +1,8 @@
1
+ 3.5.0
2
+ * NEW: Build now supports ARM64 (`aarch64`) and ARM (32‑bit)
3
+ * UPDATE: CI matrix extended with ARM64 Ubuntu runners
4
+ * UPDATE: drop Node.JS 18, add Node.JS 24
5
+
1
6
  3.4.0
2
7
  * NEW: Add new libzim 9.3.0 APIs around cache management
3
8
 
package/binding.gyp CHANGED
@@ -11,13 +11,14 @@
11
11
  "link_settings": {
12
12
  "ldflags": [
13
13
  "<!(pkg-config --libs-only-other --libs-only-L libzim)",
14
+ "-Wl,-rpath,<!(pkg-config --variable=libdir libzim)>"
14
15
  ],
15
16
  "libraries": [
16
17
  "<!(pkg-config --libs-only-l libzim)",
17
18
  ],
18
19
  },
19
20
  }],
20
- ["libzim_local!='true' and OS=='linux'", {
21
+ ["libzim_local!='true' and OS=='linux' and target_arch=='x64'", {
21
22
  "include_dirs": [
22
23
  "<(libzim_include)",
23
24
  ],
@@ -27,6 +28,26 @@
27
28
  "<(libzim_dir)/lib/x86_64-linux-gnu/libzim.so.9",
28
29
  ],
29
30
  }],
31
+ ["libzim_local!='true' and OS=='linux' and target_arch=='arm64'", {
32
+ "include_dirs": [
33
+ "<(libzim_include)",
34
+ ],
35
+ "libraries": [
36
+ "-Wl,-rpath,'$$ORIGIN'",
37
+ "-L<(libzim_dir)/lib/aarch64-linux-gnu",
38
+ "<(libzim_dir)/lib/aarch64-linux-gnu/libzim.so.9",
39
+ ],
40
+ }],
41
+ ["libzim_local!='true' and OS=='linux' and target_arch=='arm'", {
42
+ "include_dirs": [
43
+ "<(libzim_include)",
44
+ ],
45
+ "libraries": [
46
+ "-Wl,-rpath,'$$ORIGIN'",
47
+ "-L<(libzim_dir)/lib/arm-linux-gnueabihf",
48
+ "<(libzim_dir)/lib/arm-linux-gnueabihf/libzim.so.9",
49
+ ],
50
+ }],
30
51
  ["libzim_local!='true' and OS=='mac'", {
31
52
  "include_dirs": ["<(libzim_include)"],
32
53
  "cflags+": ["-fvisibility=hidden"],
package/bundle-libzim.js CHANGED
@@ -16,11 +16,19 @@ if (!isMacOS && !isLinux) {
16
16
  }
17
17
 
18
18
  if (isLinux) {
19
- console.info("Copying libzim.so.9 to build folder");
20
- exec(
21
- "cp download/lib/x86_64-linux-gnu/libzim.so.9 build/Release/libzim.so.9",
22
- );
23
- exec("ln -sf build/Release/libzim.so.9 build/Release/libzim.so"); // convienience only, not required
19
+ const rawArch = os.arch();
20
+ let libDir;
21
+ if (rawArch === "arm64") {
22
+ libDir = "aarch64-linux-gnu";
23
+ } else if (rawArch === "arm") {
24
+ libDir = "arm-linux-gnueabihf";
25
+ } else {
26
+ libDir = "x86_64-linux-gnu";
27
+ }
28
+
29
+ console.info(`Copying libzim.so.9 from ${libDir} to build folder`);
30
+ exec(`cp download/lib/${libDir}/libzim.so.9 build/Release/libzim.so.9`);
31
+ exec("ln -sf build/Release/libzim.so.9 build/Release/libzim.so"); // convenience only, not required
24
32
  }
25
33
  if (isMacOS) {
26
34
  console.info("Copying libzim.9.dylib to build folder");
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@openzim/libzim",
3
3
  "main": "dist/index.js",
4
4
  "types": "dist/index.d.js",
5
- "version": "3.4.0",
5
+ "version": "3.5.0",
6
6
  "description": "Libzim bindings for NodeJS",
7
7
  "type": "module",
8
8
  "scripts": {
@@ -38,6 +38,9 @@
38
38
  "bugs": {
39
39
  "url": "https://github.com/openzim/node-libzim/issues"
40
40
  },
41
+ "engines": {
42
+ "node": ">=20 <25"
43
+ },
41
44
  "homepage": "https://github.com/openzim/node-libzim#readme",
42
45
  "gypfile": true,
43
46
  "dependencies": {
@@ -70,4 +73,4 @@
70
73
  "jest": {
71
74
  "preset": "ts-jest/presets/js-with-ts"
72
75
  }
73
- }
76
+ }