Skip to content

Conversation

FrescoFlacko
Copy link

Description of changes

Summarize the changes made by this PR.

  • Improvements & Bug fixes
    • Fixes issue where ChromaDB doesn't start for x64 Windows computers because of the missing binding.
  • New functionality
    • ...

Test plan

How are these changes tested?

  • Tests pass locally with pytest for python, yarn test for js, cargo test for rust

Migration plan

Are there any migrations, or any forwards/backwards compatibility changes needed in order to make sure this change deploys reliably?

Observability plan

What is the plan to instrument and monitor this change?

Documentation Changes

Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the docs section?

@propel-code-bot
Copy link
Contributor

propel-code-bot bot commented Oct 19, 2025

Add Windows x64 Architecture Support to JavaScript Client Bindings

This PR updates the ChromaDB JavaScript client bindings to support the x64 architecture on Windows platforms, in addition to the existing ARM64 support. The changes ensure that the correct native binding is loaded for Windows x64 systems, reducing errors when running ChromaDB on those machines. Implementation adjusts architecture detection logic and error messaging in both classic and new JavaScript clients, maintaining consistency between code paths.

Key Changes

• Added conditional loading of chromadb-js-bindings-win32-x64-msvc in both clients/js/packages/chromadb/src/bindings.ts and clients/new-js/packages/chromadb/src/bindings.ts when running on Windows x64.
• Refined architecture error messages to remove references to ARM64 exclusivity, addressing both x64 and ARM64 as supported architectures.
• Synchronized architecture detection logic across legacy and new JavaScript client binding files.

Affected Areas

clients/js/packages/chromadb/src/bindings.ts
clients/new-js/packages/chromadb/src/bindings.ts

This summary was automatically generated by @propel-code-bot

@github-actions
Copy link

Reviewer Checklist

Please leverage this checklist to ensure your code review is thorough before approving

Testing, Bugs, Errors, Logs, Documentation

  • Can you think of any use case in which the code does not behave as intended? Have they been tested?
  • Can you think of any inputs or external events that could break the code? Is user input validated and safe? Have they been tested?
  • If appropriate, are there adequate property based tests?
  • If appropriate, are there adequate unit tests?
  • Should any logging, debugging, tracing information be added or removed?
  • Are error messages user-friendly?
  • Have all documentation changes needed been made?
  • Have all non-obvious changes been commented?

System Compatibility

  • Are there any potential impacts on other parts of the system or backward compatibility?
  • Does this change intersect with any items on our roadmap, and if so, is there a plan for fitting them together?

Quality

  • Is this code of a unexpectedly high quality (Readability, Modularity, Intuitiveness)

@FrescoFlacko
Copy link
Author

Did not realize Windows x64 isn't supported.

Why is that? I managed to get it working on my Windows x64 corporate laptop and it was working just fine. Are there certain features that don't work?

@FrescoFlacko FrescoFlacko changed the title Fix issue to add support for x64 architecture on Windows [BUG] Fix issue to add support for x64 architecture on Windows Oct 19, 2025
@rescrv
Copy link
Contributor

rescrv commented Oct 19, 2025

I'll shepherd this. If we can make it build through CI we'll publish x64 builds.

@rescrv rescrv self-requested a review October 19, 2025 21:35
@FrescoFlacko
Copy link
Author

I'll shepherd this. If we can make it build through CI we'll publish x64 builds.

No problem. As an FYI, when downloading this library on x64 Windows PC, it comes with chromadb-js-bindings-win32-x64-msvc bindings installed. Since the bindings file is missing this, though, ChromaDB fails to start.

Let me know if anything else can be done with this PR to enable this feature.

@rescrv
Copy link
Contributor

rescrv commented Oct 19, 2025

Would you be willing to give the output for "fails to start"? Not a windows user, but can collect information and try to debug from there.

@rescrv
Copy link
Contributor

rescrv commented Oct 20, 2025

Looking at it, this might require releasing a package with that name, not just referencing it here. Going to ask around today.

@rescrv
Copy link
Contributor

rescrv commented Oct 20, 2025

There are likely to be packaging issues for this arch (x64 is weird IIRC). At the moment it's not something we can support directly (platform sprawl is a thing).

@FrescoFlacko
Copy link
Author

FrescoFlacko commented Oct 20, 2025

There are likely to be packaging issues for this arch (x64 is weird IIRC). At the moment it's not something we can support directly (platform sprawl is a thing).

Hi @rescrv, here is the error that we originally got:

file:///C:/Users/user/workspace/node_modules/chromadb/dist/cli.mjs:34
throw new Error(
^

Error: Unsupported Windows architecture: x64. Only ARM64 is supported.
at file:///C:/Users/user/workspace/node_modules/chromadb/dist/cli.mjs:34:11
at ModuleJob.run (node:internal/modules/esm/module_job:271:25)
at async onImport.tracePromise.proto (node:internal/modules/esm/loader:578:26)
at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:116:5)

Node.js v22.14.0

When I was trying to troubleshoot, I saw that we in fact had an x64 Windows bindings that was installed:
image

We were able to alter dist/cjs/cli.cjs in the node_modules/chromadb folder to include the change that's suggested in this pull request and was able to use ChromaDB successfully. I wanted to provide the fix here so we can have this officially changed in the source code.

Refactor error message for unsupported Windows architecture.
Copy link
Contributor

@rescrv rescrv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's try it.

@FrescoFlacko
Copy link
Author

Synced the branches, PR check failed due to test-live-cloud 401 issue. Maybe rerunning it will fix that, unsure if related to PR changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants