@lloyal-labs/lloyal.node 1.0.3-alpha → 1.0.5-alpha
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/package.json +14 -14
- package/scripts/create-platform-package.js +25 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lloyal-labs/lloyal.node",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5-alpha",
|
|
4
4
|
"description": "Node.js client for liblloyal+llama.cpp",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -52,19 +52,19 @@
|
|
|
52
52
|
"typedoc": "^0.27.5"
|
|
53
53
|
},
|
|
54
54
|
"optionalDependencies": {
|
|
55
|
-
"@lloyal-labs/lloyal.node-darwin-arm64": "1.0.
|
|
56
|
-
"@lloyal-labs/lloyal.node-darwin-x64": "1.0.
|
|
57
|
-
"@lloyal-labs/lloyal.node-linux-arm64": "1.0.
|
|
58
|
-
"@lloyal-labs/lloyal.node-linux-arm64-cuda": "1.0.
|
|
59
|
-
"@lloyal-labs/lloyal.node-linux-arm64-vulkan": "1.0.
|
|
60
|
-
"@lloyal-labs/lloyal.node-linux-x64": "1.0.
|
|
61
|
-
"@lloyal-labs/lloyal.node-linux-x64-cuda": "1.0.
|
|
62
|
-
"@lloyal-labs/lloyal.node-linux-x64-vulkan": "1.0.
|
|
63
|
-
"@lloyal-labs/lloyal.node-win32-arm64": "1.0.
|
|
64
|
-
"@lloyal-labs/lloyal.node-win32-arm64-vulkan": "1.0.
|
|
65
|
-
"@lloyal-labs/lloyal.node-win32-x64": "1.0.
|
|
66
|
-
"@lloyal-labs/lloyal.node-win32-x64-cuda": "1.0.
|
|
67
|
-
"@lloyal-labs/lloyal.node-win32-x64-vulkan": "1.0.
|
|
55
|
+
"@lloyal-labs/lloyal.node-darwin-arm64": "1.0.5-alpha",
|
|
56
|
+
"@lloyal-labs/lloyal.node-darwin-x64": "1.0.5-alpha",
|
|
57
|
+
"@lloyal-labs/lloyal.node-linux-arm64": "1.0.5-alpha",
|
|
58
|
+
"@lloyal-labs/lloyal.node-linux-arm64-cuda": "1.0.5-alpha",
|
|
59
|
+
"@lloyal-labs/lloyal.node-linux-arm64-vulkan": "1.0.5-alpha",
|
|
60
|
+
"@lloyal-labs/lloyal.node-linux-x64": "1.0.5-alpha",
|
|
61
|
+
"@lloyal-labs/lloyal.node-linux-x64-cuda": "1.0.5-alpha",
|
|
62
|
+
"@lloyal-labs/lloyal.node-linux-x64-vulkan": "1.0.5-alpha",
|
|
63
|
+
"@lloyal-labs/lloyal.node-win32-arm64": "1.0.5-alpha",
|
|
64
|
+
"@lloyal-labs/lloyal.node-win32-arm64-vulkan": "1.0.5-alpha",
|
|
65
|
+
"@lloyal-labs/lloyal.node-win32-x64": "1.0.5-alpha",
|
|
66
|
+
"@lloyal-labs/lloyal.node-win32-x64-cuda": "1.0.5-alpha",
|
|
67
|
+
"@lloyal-labs/lloyal.node-win32-x64-vulkan": "1.0.5-alpha"
|
|
68
68
|
},
|
|
69
69
|
"engines": {
|
|
70
70
|
"node": ">=22.0.0"
|
|
@@ -57,22 +57,37 @@ if (!fs.existsSync(nodeBinary)) {
|
|
|
57
57
|
fs.copyFileSync(nodeBinary, path.join(BIN_DIR, 'lloyal.node'));
|
|
58
58
|
console.log(` ✓ Copied lloyal.node`);
|
|
59
59
|
|
|
60
|
+
// Shared libraries (platform-specific)
|
|
60
61
|
// Shared libraries (platform-specific)
|
|
61
62
|
if (osName === 'darwin') {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
// Copy all .dylib files (libllama, libggml, libggml-metal, etc.)
|
|
64
|
+
const dylibs = fs.readdirSync(BUILD_DIR).filter(f => f.endsWith('.dylib'));
|
|
65
|
+
if (dylibs.length > 0) {
|
|
66
|
+
dylibs.forEach(dylib => {
|
|
67
|
+
fs.copyFileSync(path.join(BUILD_DIR, dylib), path.join(BIN_DIR, dylib));
|
|
68
|
+
console.log(` ✓ Copied ${dylib}`);
|
|
69
|
+
});
|
|
66
70
|
} else {
|
|
67
|
-
console.warn(` ⚠️
|
|
71
|
+
console.warn(` ⚠️ No .dylib files found in build/Release`);
|
|
68
72
|
}
|
|
73
|
+
|
|
74
|
+
// Copy Metal shaders if present
|
|
75
|
+
const metalFiles = fs.readdirSync(BUILD_DIR).filter(f => f.endsWith('.metallib') || f.endsWith('.metal'));
|
|
76
|
+
metalFiles.forEach(f => {
|
|
77
|
+
fs.copyFileSync(path.join(BUILD_DIR, f), path.join(BIN_DIR, f));
|
|
78
|
+
console.log(` ✓ Copied ${f}`);
|
|
79
|
+
});
|
|
80
|
+
|
|
69
81
|
} else if (osName === 'linux') {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
82
|
+
// Copy all .so files
|
|
83
|
+
const sos = fs.readdirSync(BUILD_DIR).filter(f => f.endsWith('.so'));
|
|
84
|
+
if (sos.length > 0) {
|
|
85
|
+
sos.forEach(so => {
|
|
86
|
+
fs.copyFileSync(path.join(BUILD_DIR, so), path.join(BIN_DIR, so));
|
|
87
|
+
console.log(` ✓ Copied ${so}`);
|
|
88
|
+
});
|
|
74
89
|
} else {
|
|
75
|
-
|
|
90
|
+
console.warn(` ⚠️ No .so files found in build/Release`);
|
|
76
91
|
}
|
|
77
92
|
} else if (osName === 'win32') {
|
|
78
93
|
// Copy all DLLs
|