[WIP] feat(realse): remove oversize peer dependency#166
Closed
[WIP] feat(realse): remove oversize peer dependency#166
Conversation
…ckages and removing universal Windows installer - Add @node-llama-cpp cleanup to after-pack.cjs: removes non-matching platform/arch variants while keeping GPU variants (CUDA, Vulkan, Metal) for the target platform+arch. On Linux x64, this removes ~10MB of unnecessary arm64/armv7l packages that were incorrectly bundled. - Add @lydell/node-pty to platform-specific cleanup scopes - Split Windows NSIS targets into separate x64/arm64 entries to prevent electron-builder from generating a ~780MB universal installer that bundles both architectures Co-authored-by: Haze <hazeone@users.noreply.github.com>
|
Cursor Agent can help with this pull request. Just |
node-llama-cpp is used exclusively for local embedding generation in openclaw's memory search feature. It is a peerDependency that openclaw handles gracefully when missing -- users see a helpful error message and can use remote embedding providers (OpenAI, Gemini, Voyage, Mistral) instead. The node-llama-cpp ecosystem adds massive platform-specific binaries: - Main package: ~49 MB - CUDA backend: 144 MB - CUDA-ext fallback: 432 MB - Vulkan backend: 73 MB - CPU variants: ~20 MB Total: ~700+ MB on Linux/Windows (only ~50 MB on macOS) This was the primary cause of the 2x size difference between macOS (~170 MB) and Linux/Windows (~400 MB) installers. Changes: - Add node-llama-cpp to SKIP_PACKAGES in bundle-openclaw.mjs - Add @node-llama-cpp/ to SKIP_SCOPES in bundle-openclaw.mjs - Remove node-llama-cpp from pnpm.onlyBuiltDependencies in package.json - Remove now-unnecessary node-llama-cpp/llama from LARGE_REMOVALS - Update after-pack.cjs comment to reflect the exclusion Co-authored-by: Haze <hazeone@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Optimize installer sizes by cleaning up native modules and fixing Windows universal installer generation.
The previous build configuration bundled unnecessary
node-llama-cppandnode-ptynative modules for non-target platforms/architectures, andelectron-buildercreated a large universal Windows installer by combining x64 and arm64 targets into a single NSIS definition.