Files
qdrant/lib/edge/publish/cargo
xzfc 28d9c5be12 Single edge crate (#8173)
* Fixups of amalgamator

Fix issues that break `qdrant-edge` build process:
- `use … as segment;` - this causes `ast-grep` rules to replace wrong
  paths. So, rename to avoid collisions.
- `#[macro_use]` and `extern crate` required be in the top-level
  `lib.rs`.
- `format!("…", crate::something::…)` - `ast-grep` can't fix paths
  inside macros. Fixed by moving `crate::something::…` out of the macro.

* Add lib/edge/publish workspace and amalgamation script

* Move `lib/edge/examples` into `lib/edge/publish/` workspace

And fix them to use the generated `qdrant-edge` crate.

* Add github workflow

* Cleanup `qdrant-edge` public API

Removes empty modules. Checked by `cargo doc`.
2026-02-24 16:43:59 +00:00

22 lines
571 B
Python
Executable File

#!/usr/bin/env python3
"""
Convenience wrapper for `cargo`.
Sets `CARGO_TARGET_DIR` to reuse `target` directory of the repo root to avoid
building dependencies twice.
"""
import os
import sys
from pathlib import Path
# Assume this script is in <root>/lib/edge/publish/.
REPO_ROOT = Path(__file__).parent.parent.parent.parent
"""Repo root, assuming this script lays in <root>/lib/edge/publish/."""
os.chdir(Path(__file__).parent)
env = os.environ.copy()
env.setdefault("CARGO_TARGET_DIR", str(REPO_ROOT / "target"))
os.execvpe("cargo", ["cargo"] + sys.argv[1:], env)