Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronvg committed Mar 6, 2024
1 parent 164784a commit b79cc8d
Show file tree
Hide file tree
Showing 54 changed files with 132 additions and 46 deletions.
85 changes: 85 additions & 0 deletions engine/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion engine/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ members = [
"baml-cli",
"baml-fmt",
"baml-schema-wasm",
"baml-client-lib"
"baml-client-lib",
"baml-core-ffi",
]

[workspace.dependencies]
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
84 changes: 42 additions & 42 deletions engine/baml-core-napi/index.js → engine/baml-core-ffi/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,24 +32,24 @@ switch (platform) {
case 'android':
switch (arch) {
case 'arm64':
localFileExisted = existsSync(join(__dirname, 'baml-core-napi.android-arm64.node'))
localFileExisted = existsSync(join(__dirname, 'baml-core.android-arm64.node'))
try {
if (localFileExisted) {
nativeBinding = require('./baml-core-napi.android-arm64.node')
nativeBinding = require('./baml-core.android-arm64.node')
} else {
nativeBinding = require('@boundaryml/baml-core-napi-android-arm64')
nativeBinding = require('@boundaryml/baml-core-android-arm64')
}
} catch (e) {
loadError = e
}
break
case 'arm':
localFileExisted = existsSync(join(__dirname, 'baml-core-napi.android-arm-eabi.node'))
localFileExisted = existsSync(join(__dirname, 'baml-core.android-arm-eabi.node'))
try {
if (localFileExisted) {
nativeBinding = require('./baml-core-napi.android-arm-eabi.node')
nativeBinding = require('./baml-core.android-arm-eabi.node')
} else {
nativeBinding = require('@boundaryml/baml-core-napi-android-arm-eabi')
nativeBinding = require('@boundaryml/baml-core-android-arm-eabi')
}
} catch (e) {
loadError = e
Expand All @@ -62,36 +62,36 @@ switch (platform) {
case 'win32':
switch (arch) {
case 'x64':
localFileExisted = existsSync(join(__dirname, 'baml-core-napi.win32-x64-msvc.node'))
localFileExisted = existsSync(join(__dirname, 'baml-core.win32-x64-msvc.node'))
try {
if (localFileExisted) {
nativeBinding = require('./baml-core-napi.win32-x64-msvc.node')
nativeBinding = require('./baml-core.win32-x64-msvc.node')
} else {
nativeBinding = require('@boundaryml/baml-core-napi-win32-x64-msvc')
nativeBinding = require('@boundaryml/baml-core-win32-x64-msvc')
}
} catch (e) {
loadError = e
}
break
case 'ia32':
localFileExisted = existsSync(join(__dirname, 'baml-core-napi.win32-ia32-msvc.node'))
localFileExisted = existsSync(join(__dirname, 'baml-core.win32-ia32-msvc.node'))
try {
if (localFileExisted) {
nativeBinding = require('./baml-core-napi.win32-ia32-msvc.node')
nativeBinding = require('./baml-core.win32-ia32-msvc.node')
} else {
nativeBinding = require('@boundaryml/baml-core-napi-win32-ia32-msvc')
nativeBinding = require('@boundaryml/baml-core-win32-ia32-msvc')
}
} catch (e) {
loadError = e
}
break
case 'arm64':
localFileExisted = existsSync(join(__dirname, 'baml-core-napi.win32-arm64-msvc.node'))
localFileExisted = existsSync(join(__dirname, 'baml-core.win32-arm64-msvc.node'))
try {
if (localFileExisted) {
nativeBinding = require('./baml-core-napi.win32-arm64-msvc.node')
nativeBinding = require('./baml-core.win32-arm64-msvc.node')
} else {
nativeBinding = require('@boundaryml/baml-core-napi-win32-arm64-msvc')
nativeBinding = require('@boundaryml/baml-core-win32-arm64-msvc')
}
} catch (e) {
loadError = e
Expand All @@ -102,35 +102,35 @@ switch (platform) {
}
break
case 'darwin':
localFileExisted = existsSync(join(__dirname, 'baml-core-napi.darwin-universal.node'))
localFileExisted = existsSync(join(__dirname, 'baml-core.darwin-universal.node'))
try {
if (localFileExisted) {
nativeBinding = require('./baml-core-napi.darwin-universal.node')
nativeBinding = require('./baml-core.darwin-universal.node')
} else {
nativeBinding = require('@boundaryml/baml-core-napi-darwin-universal')
nativeBinding = require('@boundaryml/baml-core-darwin-universal')
}
break
} catch {}
switch (arch) {
case 'x64':
localFileExisted = existsSync(join(__dirname, 'baml-core-napi.darwin-x64.node'))
localFileExisted = existsSync(join(__dirname, 'baml-core.darwin-x64.node'))
try {
if (localFileExisted) {
nativeBinding = require('./baml-core-napi.darwin-x64.node')
nativeBinding = require('./baml-core.darwin-x64.node')
} else {
nativeBinding = require('@boundaryml/baml-core-napi-darwin-x64')
nativeBinding = require('@boundaryml/baml-core-darwin-x64')
}
} catch (e) {
loadError = e
}
break
case 'arm64':
localFileExisted = existsSync(join(__dirname, 'baml-core-napi.darwin-arm64.node'))
localFileExisted = existsSync(join(__dirname, 'baml-core.darwin-arm64.node'))
try {
if (localFileExisted) {
nativeBinding = require('./baml-core-napi.darwin-arm64.node')
nativeBinding = require('./baml-core.darwin-arm64.node')
} else {
nativeBinding = require('@boundaryml/baml-core-napi-darwin-arm64')
nativeBinding = require('@boundaryml/baml-core-darwin-arm64')
}
} catch (e) {
loadError = e
Expand All @@ -144,12 +144,12 @@ switch (platform) {
if (arch !== 'x64') {
throw new Error(`Unsupported architecture on FreeBSD: ${arch}`)
}
localFileExisted = existsSync(join(__dirname, 'baml-core-napi.freebsd-x64.node'))
localFileExisted = existsSync(join(__dirname, 'baml-core.freebsd-x64.node'))
try {
if (localFileExisted) {
nativeBinding = require('./baml-core-napi.freebsd-x64.node')
nativeBinding = require('./baml-core.freebsd-x64.node')
} else {
nativeBinding = require('@boundaryml/baml-core-napi-freebsd-x64')
nativeBinding = require('@boundaryml/baml-core-freebsd-x64')
}
} catch (e) {
loadError = e
Expand All @@ -159,23 +159,23 @@ switch (platform) {
switch (arch) {
case 'x64':
if (isMusl()) {
localFileExisted = existsSync(join(__dirname, 'baml-core-napi.linux-x64-musl.node'))
localFileExisted = existsSync(join(__dirname, 'baml-core.linux-x64-musl.node'))
try {
if (localFileExisted) {
nativeBinding = require('./baml-core-napi.linux-x64-musl.node')
nativeBinding = require('./baml-core.linux-x64-musl.node')
} else {
nativeBinding = require('@boundaryml/baml-core-napi-linux-x64-musl')
nativeBinding = require('@boundaryml/baml-core-linux-x64-musl')
}
} catch (e) {
loadError = e
}
} else {
localFileExisted = existsSync(join(__dirname, 'baml-core-napi.linux-x64-gnu.node'))
localFileExisted = existsSync(join(__dirname, 'baml-core.linux-x64-gnu.node'))
try {
if (localFileExisted) {
nativeBinding = require('./baml-core-napi.linux-x64-gnu.node')
nativeBinding = require('./baml-core.linux-x64-gnu.node')
} else {
nativeBinding = require('@boundaryml/baml-core-napi-linux-x64-gnu')
nativeBinding = require('@boundaryml/baml-core-linux-x64-gnu')
}
} catch (e) {
loadError = e
Expand All @@ -184,36 +184,36 @@ switch (platform) {
break
case 'arm64':
if (isMusl()) {
localFileExisted = existsSync(join(__dirname, 'baml-core-napi.linux-arm64-musl.node'))
localFileExisted = existsSync(join(__dirname, 'baml-core.linux-arm64-musl.node'))
try {
if (localFileExisted) {
nativeBinding = require('./baml-core-napi.linux-arm64-musl.node')
nativeBinding = require('./baml-core.linux-arm64-musl.node')
} else {
nativeBinding = require('@boundaryml/baml-core-napi-linux-arm64-musl')
nativeBinding = require('@boundaryml/baml-core-linux-arm64-musl')
}
} catch (e) {
loadError = e
}
} else {
localFileExisted = existsSync(join(__dirname, 'baml-core-napi.linux-arm64-gnu.node'))
localFileExisted = existsSync(join(__dirname, 'baml-core.linux-arm64-gnu.node'))
try {
if (localFileExisted) {
nativeBinding = require('./baml-core-napi.linux-arm64-gnu.node')
nativeBinding = require('./baml-core.linux-arm64-gnu.node')
} else {
nativeBinding = require('@boundaryml/baml-core-napi-linux-arm64-gnu')
nativeBinding = require('@boundaryml/baml-core-linux-arm64-gnu')
}
} catch (e) {
loadError = e
}
}
break
case 'arm':
localFileExisted = existsSync(join(__dirname, 'baml-core-napi.linux-arm-gnueabihf.node'))
localFileExisted = existsSync(join(__dirname, 'baml-core.linux-arm-gnueabihf.node'))
try {
if (localFileExisted) {
nativeBinding = require('./baml-core-napi.linux-arm-gnueabihf.node')
nativeBinding = require('./baml-core.linux-arm-gnueabihf.node')
} else {
nativeBinding = require('@boundaryml/baml-core-napi-linux-arm-gnueabihf')
nativeBinding = require('@boundaryml/baml-core-linux-arm-gnueabihf')
}
} catch (e) {
loadError = e
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,4 @@
"arrowParens": "always"
},
"packageManager": "[email protected]"
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ __metadata:
languageName: node
linkType: hard

"@boundaryml/baml-core-napi@workspace:.":
"@boundaryml/baml-core@workspace:.":
version: 0.0.0-use.local
resolution: "@boundaryml/baml-core-napi@workspace:."
resolution: "@boundaryml/baml-core@workspace:."
dependencies:
"@napi-rs/cli": "npm:^2.16.4"
"@swc-node/register": "npm:^1.6.8"
Expand Down

0 comments on commit b79cc8d

Please sign in to comment.