File tree Expand file tree Collapse file tree 1 file changed +17
-5
lines changed Expand file tree Collapse file tree 1 file changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ export class LanceDBManager {
3333 let packageName : string
3434 let nodeFileName : string
3535
36+ let isMusl = false
3637 switch ( platform ) {
3738 case "win32" :
3839 if ( arch === "x64" ) {
@@ -57,18 +58,29 @@ export class LanceDBManager {
5758 }
5859 break
5960 case "linux" :
61+ isMusl = process . versions ?. musl !== undefined
6062 if ( arch === "x64" ) {
61- packageName = "@lancedb/lancedb-linux-x64-gnu"
62- nodeFileName = "lancedb.linux-x64-gnu.node"
63+ if ( isMusl ) {
64+ packageName = "@lancedb/lancedb-linux-x64-musl"
65+ nodeFileName = "lancedb.linux-x64-musl.node"
66+ } else {
67+ packageName = "@lancedb/lancedb-linux-x64-gnu"
68+ nodeFileName = "lancedb.linux-x64-gnu.node"
69+ }
6370 } else if ( arch === "arm64" ) {
64- packageName = "@lancedb/lancedb-linux-arm64-gnu"
65- nodeFileName = "lancedb.linux-arm64-gnu.node"
71+ if ( isMusl ) {
72+ packageName = "@lancedb/lancedb-linux-arm64-musl"
73+ nodeFileName = "lancedb.linux-arm64-musl.node"
74+ } else {
75+ packageName = "@lancedb/lancedb-linux-arm64-gnu"
76+ nodeFileName = "lancedb.linux-arm64-gnu.node"
77+ }
6678 } else {
6779 throw new Error ( `Unsupported Linux architecture: ${ arch } ` )
6880 }
6981 break
7082 default :
71- throw new Error ( `Unsupported platform: ${ platform } ` )
83+ throw new Error ( `Unsupported platform: ${ platform } , arch: ${ arch } ` )
7284 }
7385
7486 return { platform, arch, packageName, nodeFileName }
You can’t perform that action at this time.
0 commit comments