Skip to content
Open
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
65 changes: 55 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,89 @@
# Contributing to altor-vec

Thanks for your interest in contributing! Here's how to get started.
Thanks for your interest in contributing! This is a monorepo containing both the core Rust library and the Docusaurus plugin.

## Building from source
## Repository Structure

- **Core Library** (Rust) - WASM vector search engine
- **Docusaurus Plugin** (TypeScript) - `packages/docusaurus-plugin-altor-vec/`

---

## Core Library (Rust)

### Building from source

```bash
git clone https://github.com/altor-lab/altor-vec.git
cd altor-vec
cargo build
```

## Running tests
### Running tests

```bash
cargo test # core tests
cargo test --all-features # include serialization tests
```

## Building WASM
### Building WASM

```bash
cargo install wasm-pack # one-time setup
cd wasm && wasm-pack build --target web --release
```

## Code style

We use standard Rust tooling — please run these before submitting a PR:
### Code style

```bash
cargo fmt # format code
cargo clippy --all-targets --all-features -- -D warnings # lint
```

## Pull request process
---

## Docusaurus Plugin (TypeScript)

### Setup

```bash
cd packages/docusaurus-plugin-altor-vec
npm install
```

### Building

```bash
npm run build # compile TypeScript
npm run watch # watch mode for development
```

### Testing

```bash
npm test # run tests (when available)
npm run typecheck # TypeScript type checking
```

### Code style

```bash
npm run lint # lint code (when configured)
npm run format # format code (when configured)
```

---

## Pull Request Process

1. Open an issue describing the change you'd like to make.
2. Fork the repo and create a feature branch from `main`.
3. Make your changes, add tests, and ensure `cargo test --all-features` passes.
4. Run `cargo fmt` and `cargo clippy` with no warnings.
3. Make your changes and add tests:
- **Rust**: Ensure `cargo test --all-features` passes
- **TypeScript**: Ensure `npm run build` succeeds
4. Format and lint your code:
- **Rust**: Run `cargo fmt` and `cargo clippy` with no warnings
- **TypeScript**: Run `npm run typecheck` with no errors
5. Submit a PR — we'll review it as soon as we can.

## Questions?
Expand Down
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,36 @@ wasm/
└── src/lib.rs # WasmSearchEngine (wasm-bindgen wrapper)
```

## Packages

This repository contains:

- **[altor-vec](.)** - Core WASM vector search engine (Rust)
- **[docusaurus-plugin-altor-vec](packages/docusaurus-plugin-altor-vec)** - Docusaurus plugin for semantic search (TypeScript)

### Docusaurus Plugin

Add client-side semantic search to your Docusaurus site:

```bash
npm install docusaurus-plugin-altor-vec
```

```javascript
// docusaurus.config.js
module.exports = {
plugins: ['docusaurus-plugin-altor-vec'],
};
```

**Features:**
- 🚀 Zero configuration required
- ⚡ Runs entirely client-side
- 🎯 Semantic search with Transformers.js or OpenAI
- 📦 Automatic index building during build

[Full Documentation →](packages/docusaurus-plugin-altor-vec)

## Build from source

```bash
Expand Down
Loading
Loading