[![crates.io](https://img.shields.io/crates/v/qdrant-edge.svg)](https://crates.io/crates/qdrant-edge)
[![PyPI](https://img.shields.io/pypi/v/qdrant-edge-py.svg)](https://pypi.org/project/qdrant-edge-py/)

This dir contains a [Justfile](Justfile) with recipes to build/check/run examples for edge packages.
Install https://github.com/casey/just to use it.

## Rust Qdrant Edge package

Rust Qdrant Edge workspace lives in the [publish](publish) directory.
It's a separate workspace, not tied to the main workspace.

The [`qdrant-edge`](https://crates.io/crates/qdrant-edge) package is autogenerated by the [amalgamate.py](publish/amalgamate.py) script and placed in the `./publish/qdrant-edge` directory (gitignored).

If you need to make changes in the `qdrant-edge` package, edit the original packages in this repo ([`/lib`](/lib) in the repo root).

```bash
just rs-examples
```

```bash
# Or, manually:
./amalgamate.py
cargo check -p examples
cargo run -p examples --bin demo
cargo run -p examples --bin …
```

(see full binary list in [publish/examples/src/bin](publish/examples/src/bin))

### How to publish Rust Package to crates.io

1. Update the `VERSION` in [publish/amalgamate.py](publish/amalgamate.py).
2. Run [Qdrant Edge Rust Release](https://github.com/qdrant/qdrant/actions/workflows/edge-rust-release.yml) workflow.


## Python Qdrant Edge package

It's in the [python](python) directory. It's part of the main workspace, unlike the Rust package.

```bash
just py-build
just py-examples
```

Or, manually:

```bash
# Setup environment
cd lib/edge/python
python -m venv .venv
source .venv/bin/activate

pip install --user maturin

# Build and install the package:
cd lib/edge/python
maturin develop --no-default-features

# Run example:
python examples/demo.py
```
