Skip to content

Add JavaScript SDK (client + bindings + tests)#136

Merged
HarshaNalluru merged 2 commits intomainfrom
harshan/js-sdk
Apr 8, 2026
Merged

Add JavaScript SDK (client + bindings + tests)#136
HarshaNalluru merged 2 commits intomainfrom
harshan/js-sdk

Conversation

@HarshaNalluru
Copy link
Copy Markdown
Contributor

@HarshaNalluru HarshaNalluru commented Apr 8, 2026

This pull request introduces the initial structure and implementation for the Moss JavaScript SDK's native Rust bindings via N-API, enabling Node.js applications to use the Moss core engine. It adds project metadata, build configuration, documentation, and the main Rust and JavaScript binding code, supporting cross-platform prebuilt binaries and a full async API for index management and querying.

Key changes are grouped below:

Project Initialization & Documentation

  • Added README.md, CONTRIBUTING.md, and CHANGELOG.md files to document usage, contribution guidelines, and changelog for the Moss JavaScript SDK and its Rust bindings.
  • Created .gitignore and .cargo/config.toml for proper environment and build setup.

Rust Native Binding Implementation

  • Added Cargo.toml for the Rust crate, specifying dependencies, build options, and metadata for the N-API binding.
  • Implemented the main Rust library in src/lib.rs, exposing constants and registering modules for N-API.
  • Developed the JsIndexManager in src/indexmanager.rs, providing async methods for loading, querying, and managing indexes from Node.js.
  • Added a simple build.rs script for N-API build setup.

Node.js Integration & Packaging

  • Added package.json with build scripts, metadata, and configuration for cross-platform prebuilt binaries.
  • Implemented index.js to load the appropriate native binding per platform/architecture, with error handling and version checks.

These changes establish the foundation for the Moss JavaScript SDK's native core, enabling efficient semantic search and index management in Node.js applications.


Open with Devin

Copilot AI review requested due to automatic review settings April 8, 2026 22:20
devin-ai-integration[bot]

This comment was marked as resolved.

This comment was marked as resolved.

@HarshaNalluru HarshaNalluru merged commit 151933d into main Apr 8, 2026
18 of 19 checks passed
Atulsingh1155 pushed a commit to Atulsingh1155/moss that referenced this pull request Apr 30, 2026
This pull request introduces the initial structure and implementation
for the Moss JavaScript SDK's native Rust bindings via N-API, enabling
Node.js applications to use the Moss core engine. It adds project
metadata, build configuration, documentation, and the main Rust and
JavaScript binding code, supporting cross-platform prebuilt binaries and
a full async API for index management and querying.

Key changes are grouped below:

**Project Initialization & Documentation**
* Added `README.md`, `CONTRIBUTING.md`, and `CHANGELOG.md` files to
document usage, contribution guidelines, and changelog for the Moss
JavaScript SDK and its Rust bindings.
* Created `.gitignore` and `.cargo/config.toml` for proper environment
and build setup.

**Rust Native Binding Implementation**
* Added `Cargo.toml` for the Rust crate, specifying dependencies, build
options, and metadata for the N-API binding.
* Implemented the main Rust library in `src/lib.rs`, exposing constants
and registering modules for N-API.
* Developed the `JsIndexManager` in `src/indexmanager.rs`, providing
async methods for loading, querying, and managing indexes from Node.js.
* Added a simple `build.rs` script for N-API build setup.

**Node.js Integration & Packaging**
* Added `package.json` with build scripts, metadata, and configuration
for cross-platform prebuilt binaries.
* Implemented `index.js` to load the appropriate native binding per
platform/architecture, with error handling and version checks.

These changes establish the foundation for the Moss JavaScript SDK's
native core, enabling efficient semantic search and index management in
Node.js applications.
<!-- devin-review-badge-begin -->

---

<a href="https://app.devin.ai/review/usemoss/moss/pull/136"
target="_blank">
  <picture>
<source media="(prefers-color-scheme: dark)"
srcset="https://static.devin.ai/assets/gh-open-in-devin-review-dark.svg?v=1">
<img
src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1"
alt="Open with Devin">
  </picture>
</a>
<!-- devin-review-badge-end -->
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.

3 participants