Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
arch: arm64
gpu: metal
package: darwin-arm64
- os: macos-13
- os: macos-15-intel
arch: x64
gpu: cpu
package: darwin-x64
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Phase 1 Tests (Build from Source)
name: Build & Test

on:
push:
Expand All @@ -22,7 +22,7 @@ jobs:
uses: actions/checkout@v4
with:
lfs: true
# NO submodules - we're testing vendor/ sources (Phase 1 requirement)
# NO submodules - we're testing vendor/ sources

- name: Pull Git LFS files
run: git lfs pull
Expand Down Expand Up @@ -104,7 +104,7 @@ jobs:
echo "Node: ${{ matrix.node }}"
echo "Platform: $(node -p 'process.platform')"
echo "Arch: $(node -p 'process.arch')"
echo "Vendor sources used: YES (Phase 1)"
echo "Built from vendored sources: YES"
if [ -f vendor/VERSIONS.json ]; then
echo "Vendored versions:"
cat vendor/VERSIONS.json
Expand Down Expand Up @@ -189,12 +189,12 @@ jobs:
- name: Check test results
run: |
echo "================================"
echo "Phase 1 Test Results"
echo "Test Results Summary"
echo "================================"
echo "✓ Vendor sources tested on Linux, macOS, Windows"
echo "✓ Source builds tested on Linux, macOS, Windows"
echo "✓ Node.js 22, 24 (LTS) compatibility verified"
echo "✓ npm package contents verified"
echo "✓ API tests passed (11 tests)"
echo "✓ E2E tests passed (4 text generation + 8 embedding tests)"
echo ""
echo "Phase 1 (Build from Source) Status: ${{ needs.test-vendored-sources.result }}"
echo "Build & Test Status: ${{ needs.test-vendored-sources.result }}"
36 changes: 18 additions & 18 deletions docs/distribution.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ To force a specific GPU backend, install the platform package directly:

```bash
# Force CUDA on Linux
npm install @lloyal/lloyal.node-linux-x64-cuda
npm install @lloyal-labs/lloyal.node-linux-x64-cuda

# Force Vulkan on Windows
npm install @lloyal/lloyal.node-win32-x64-vulkan
npm install @lloyal-labs/lloyal.node-win32-x64-vulkan
```

Or set an environment variable before installation:
Expand Down Expand Up @@ -102,34 +102,34 @@ Requires NVIDIA GPU with compute capability 6.0+ and CUDA 12.6 runtime.

**Linux/Windows:**
```bash
npm install @lloyal/lloyal.node-linux-x64-cuda
npm install @lloyal-labs/lloyal.node-linux-x64-cuda
# or
npm install @lloyal/lloyal.node-win32-x64-cuda
npm install @lloyal-labs/lloyal.node-win32-x64-cuda
```

**Jetson (ARM64):**
```bash
npm install @lloyal/lloyal.node-linux-arm64-cuda
npm install @lloyal-labs/lloyal.node-linux-arm64-cuda
```

### Vulkan (Cross-Platform)

Works with AMD, Intel, NVIDIA, and Qualcomm GPUs. Requires Vulkan 1.3+ drivers.

```bash
npm install @lloyal/lloyal.node-linux-x64-vulkan
npm install @lloyal-labs/lloyal.node-linux-x64-vulkan
# or
npm install @lloyal/lloyal.node-win32-x64-vulkan
npm install @lloyal-labs/lloyal.node-win32-x64-vulkan
```

### CPU-Only

No GPU acceleration. Works on all platforms.

```bash
npm install @lloyal/lloyal.node-darwin-x64 # macOS Intel
npm install @lloyal/lloyal.node-linux-x64 # Linux x64
npm install @lloyal/lloyal.node-win32-x64 # Windows x64
npm install @lloyal-labs/lloyal.node-darwin-x64 # macOS Intel
npm install @lloyal-labs/lloyal.node-linux-x64 # Linux x64
npm install @lloyal-labs/lloyal.node-win32-x64 # Windows x64
```

---
Expand All @@ -144,8 +144,8 @@ npm install @lloyal/lloyal.node-win32-x64 # Windows x64
{
"name": "lloyal.node",
"optionalDependencies": {
"@lloyal/lloyal.node-darwin-arm64": "1.0.0",
"@lloyal/lloyal.node-linux-x64-cuda": "1.0.0",
"@lloyal-labs/lloyal.node-darwin-arm64": "1.0.0",
"@lloyal-labs/lloyal.node-linux-x64-cuda": "1.0.0",
...
}
}
Expand All @@ -160,12 +160,12 @@ Each platform package contains:
- Platform-specific shared libraries (`*.dylib`, `*.so`, `*.dll`)
- Minimal dependencies (no build tools required)

**Package naming:** `@lloyal/lloyal.node-{platform}-{arch}[-{gpu}]`
**Package naming:** `@lloyal-labs/lloyal.node-{platform}-{arch}[-{gpu}]`

Examples:
- `@lloyal/lloyal.node-darwin-arm64` (macOS Apple Silicon with Metal)
- `@lloyal/lloyal.node-linux-x64-cuda` (Linux x64 with CUDA 12.6)
- `@lloyal/lloyal.node-win32-arm64-vulkan` (Windows ARM64 with Vulkan)
- `@lloyal-labs/lloyal.node-darwin-arm64` (macOS Apple Silicon with Metal)
- `@lloyal-labs/lloyal.node-linux-x64-cuda` (Linux x64 with CUDA 12.6)
- `@lloyal-labs/lloyal.node-win32-arm64-vulkan` (Windows ARM64 with Vulkan)

---

Expand Down Expand Up @@ -277,14 +277,14 @@ git push origin v1.0.0

GitHub Actions automatically:
- Builds all 13 platform packages
- Publishes to npm registry (`@lloyal/lloyal.node-*`)
- Publishes to npm registry (`@lloyal-labs/lloyal.node-*`)
- Publishes main package (`lloyal.node`)

**4. Verify release:**

```bash
npm info lloyal.node
npm info @lloyal/lloyal.node-linux-x64-cuda
npm info @lloyal-labs/lloyal.node-linux-x64-cuda
```

### Version Management
Expand Down
52 changes: 26 additions & 26 deletions package-lock.json

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

26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,19 @@
"node-gyp": "^10.2.0"
},
"optionalDependencies": {
"@lloyal/lloyal.node-darwin-arm64": "0.1.0",
"@lloyal/lloyal.node-darwin-x64": "0.1.0",
"@lloyal/lloyal.node-linux-x64": "0.1.0",
"@lloyal/lloyal.node-linux-x64-cuda": "0.1.0",
"@lloyal/lloyal.node-linux-x64-vulkan": "0.1.0",
"@lloyal/lloyal.node-linux-arm64": "0.1.0",
"@lloyal/lloyal.node-linux-arm64-cuda": "0.1.0",
"@lloyal/lloyal.node-linux-arm64-vulkan": "0.1.0",
"@lloyal/lloyal.node-win32-x64": "0.1.0",
"@lloyal/lloyal.node-win32-x64-cuda": "0.1.0",
"@lloyal/lloyal.node-win32-x64-vulkan": "0.1.0",
"@lloyal/lloyal.node-win32-arm64": "0.1.0",
"@lloyal/lloyal.node-win32-arm64-vulkan": "0.1.0"
"@lloyal-labs/lloyal.node-darwin-arm64": "0.1.0",
"@lloyal-labs/lloyal.node-darwin-x64": "0.1.0",
"@lloyal-labs/lloyal.node-linux-x64": "0.1.0",
"@lloyal-labs/lloyal.node-linux-x64-cuda": "0.1.0",
"@lloyal-labs/lloyal.node-linux-x64-vulkan": "0.1.0",
"@lloyal-labs/lloyal.node-linux-arm64": "0.1.0",
"@lloyal-labs/lloyal.node-linux-arm64-cuda": "0.1.0",
"@lloyal-labs/lloyal.node-linux-arm64-vulkan": "0.1.0",
"@lloyal-labs/lloyal.node-win32-x64": "0.1.0",
"@lloyal-labs/lloyal.node-win32-x64-cuda": "0.1.0",
"@lloyal-labs/lloyal.node-win32-x64-vulkan": "0.1.0",
"@lloyal-labs/lloyal.node-win32-arm64": "0.1.0",
"@lloyal-labs/lloyal.node-win32-arm64-vulkan": "0.1.0"
},
"engines": {
"node": ">=22.0.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/template/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@lloyal/lloyal.node-PLATFORM",
"name": "@lloyal-labs/lloyal.node-PLATFORM",
"version": "0.0.0",
"description": "Lloyal native binary for PLATFORM",
"main": "index.js",
Expand All @@ -18,5 +18,5 @@
"url": "git+https://github.com/lloyal-ai/lloyal.node.git"
},
"author": "lloyal.ai",
"license": "MIT"
"license": "Apache-2.0"
}
10 changes: 5 additions & 5 deletions scripts/create-platform-package.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const OS_MAP = {

const osName = OS_MAP[osRunner] || process.platform;

console.log(`\n=== Creating platform package: @lloyal/lloyal.node-${packageName} ===\n`);
console.log(`\n=== Creating platform package: @lloyal-labs/lloyal.node-${packageName} ===\n`);

// Create directories
fs.mkdirSync(BIN_DIR, { recursive: true });
Expand Down Expand Up @@ -101,7 +101,7 @@ if (fs.existsSync(templatePath)) {
} else {
// Fallback template if file doesn't exist yet
pkgJson = {
name: '@lloyal/lloyal.node-PLATFORM',
name: '@lloyal-labs/lloyal.node-PLATFORM',
version: '0.0.0',
description: 'Lloyal native binary for PLATFORM',
main: 'index.js',
Expand All @@ -110,12 +110,12 @@ if (fs.existsSync(templatePath)) {
type: 'git',
url: 'git+https://github.com/lloyal-ai/lloyal.node.git'
},
license: 'MIT'
license: 'Apache-2.0'
};
}

// Update with actual values
pkgJson.name = `@lloyal/lloyal.node-${packageName}`;
pkgJson.name = `@lloyal-labs/lloyal.node-${packageName}`;
pkgJson.version = mainPackageJson.version;
pkgJson.description = `Lloyal native binary for ${packageName}`;
pkgJson.os = [osName];
Expand All @@ -142,7 +142,7 @@ console.log(` ✓ Created index.js`);

// Summary
console.log(`\n✅ Platform package created successfully!`);
console.log(`\nPackage: @lloyal/lloyal.node-${packageName}@${pkgJson.version}`);
console.log(`\nPackage: @lloyal-labs/lloyal.node-${packageName}@${pkgJson.version}`);
console.log(`Location: ${PKG_DIR}`);
console.log(`\nContents:`);
fs.readdirSync(BIN_DIR).forEach(f => {
Expand Down
6 changes: 3 additions & 3 deletions scripts/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ function main() {
// 1. Check for user-specified GPU variant via environment variable
if (process.env.LLOYAL_GPU) {
const gpu = process.env.LLOYAL_GPU.toLowerCase();
const packageName = `@lloyal/lloyal.node-${PLATFORM}-${ARCH}-${gpu}`;
const packageName = `@lloyal-labs/lloyal.node-${PLATFORM}-${ARCH}-${gpu}`;

log(`LLOYAL_GPU=${gpu}, looking for ${packageName}...`);
const binDir = findPrebuilt(packageName);
Expand All @@ -131,7 +131,7 @@ function main() {
// 2. Check for GPU variants in priority order
const gpuVariants = ['cuda', 'vulkan'];
for (const gpu of gpuVariants) {
const packageName = `@lloyal/lloyal.node-${PLATFORM}-${ARCH}-${gpu}`;
const packageName = `@lloyal-labs/lloyal.node-${PLATFORM}-${ARCH}-${gpu}`;
const binDir = findPrebuilt(packageName);

if (binDir) {
Expand All @@ -142,7 +142,7 @@ function main() {
}

// 3. Check for default platform package (CPU or Metal on macOS)
const defaultPackage = `@lloyal/lloyal.node-${PLATFORM}-${ARCH}`;
const defaultPackage = `@lloyal-labs/lloyal.node-${PLATFORM}-${ARCH}`;
const binDir = findPrebuilt(defaultPackage);

if (binDir) {
Expand Down
Loading