diff --git a/.forgejo/workflows/check.yml b/.forgejo/workflows/check.yml deleted file mode 100644 index c9431c8..0000000 --- a/.forgejo/workflows/check.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: check - -# Fast-fail lint/test on short-lived work branches, before it ever reaches -# main and triggers a dev-track release build. -on: - push: - branches: ['feature/**', 'fix/**'] - -jobs: - check: - runs-on: [self-hosted, hestia] - steps: - - name: checkout - run: | - set -euo pipefail - rm -rf src && mkdir src - git clone --branch "${GITHUB_REF_NAME}" --depth 1 \ - "https://git.breadway.dev/${GITHUB_REPOSITORY}.git" src - - - name: clippy - run: cd src && bash ci/build.sh cargo clippy --workspace --all-targets --locked --features full -- -D warnings - - - name: test - run: cd src && bash ci/build.sh cargo test --workspace --locked --features full diff --git a/.forgejo/workflows/dev-release.yml b/.forgejo/workflows/dev-release.yml deleted file mode 100644 index 85fcaa6..0000000 --- a/.forgejo/workflows/dev-release.yml +++ /dev/null @@ -1,82 +0,0 @@ -name: dev release - -# Publishes a dev-track build on every push to `main` (the trunk -# branch — there is no separate `dev` branch). See bread-ecosystem's -# docs/release-channels.md for the release-track policy this is part of. -on: - push: - branches: ['main'] - -jobs: - build: - runs-on: [self-hosted, hestia] - steps: - - name: checkout - run: | - set -euo pipefail - rm -rf src && mkdir src - git clone --branch main --depth 1 \ - "https://git.breadway.dev/${GITHUB_REPOSITORY}.git" src - - - name: build - run: cd src && bash ci/build.sh cargo build --release --locked --workspace --features full - - - name: test - run: cd src && bash ci/build.sh cargo test --release --locked --workspace --features full - - - name: compute dev version - run: | - set -euo pipefail - cd src - # Base the dev version off the latest published stable tag, - # not Cargo.toml — Cargo.toml can go stale relative to the last - # real release (seen in practice: breadbox/breadpad/breadcrumbs/ - # breadpaper), which would make a dev build sort as OLDER than - # what's already installed and bakery would correctly refuse it. - LATEST_TAG="$(git ls-remote --tags --refs \ - "https://git.breadway.dev/${GITHUB_REPOSITORY}.git" 'v*' \ - | awk -F/ '{print $NF}' | sed 's/^v//' | (grep -v -- '-' || true) | sort -V | tail -1)" - if [ -n "${LATEST_TAG}" ]; then - CUR="${LATEST_TAG}" - else - CUR="$(grep -m1 '^version' breadsearch/Cargo.toml | sed -E 's/.*"(.*)".*/\1/')" - fi - IFS='.' read -r MA MI PA <<< "${CUR}" - SHA="$(git rev-parse --short HEAD)" - TS="$(date -u +%Y%m%d%H%M%S)" - echo "VERSION=${MA}.${MI}.$((PA + 1))-dev.${TS}+${SHA}" >> "$GITHUB_ENV" - - - name: prepare artifacts - run: | - set -euo pipefail - PKG_DIR="/srv/breadway-dl/dev/breadsearch/${VERSION}" - mkdir -p "${PKG_DIR}" - for bin in breadsearch breadmill; do - cp "src/target/release/${bin}" "${PKG_DIR}/${bin}-x86_64" - strip "${PKG_DIR}/${bin}-x86_64" - sha256sum "${PKG_DIR}/${bin}-x86_64" | awk '{print $1}' \ - > "${PKG_DIR}/${bin}-x86_64.sha256" - done - cp src/packaging/breadmill.service "${PKG_DIR}/" - cp src/config.example.toml "${PKG_DIR}/" - cp src/bakery.toml "${PKG_DIR}/bakery.toml" - ln -sfn "${VERSION}" "/srv/breadway-dl/dev/breadsearch/latest" - - # No GitHub Release upload — dev, like the other non-stable track, - # is only distributed via dl.breadway.dev/dev/. - - name: regenerate dev index.json - env: - MINISIGN_SEC_KEY: ${{ secrets.BAKERY_MINISIGN_SEC_KEY_PATH }} - run: | - set -euo pipefail - if [ -z "${MINISIGN_SEC_KEY:-}" ]; then - echo "::error::BAKERY_MINISIGN_SEC_KEY_PATH secret not set — refusing to regenerate dev index.json unsigned (would leave a stale signature mismatched against fresh content and break bakery for everyone on the dev track)" - exit 1 - fi - rm -rf /tmp/bread-ecosystem-ci-* 2>/dev/null || true - # mktemp: a fixed clone path races when multiple repos' dev/beta - # workflows run close together on the same self-hosted runner. - ECOSYSTEM_CI_DIR="$(mktemp -d /tmp/bread-ecosystem-ci-XXXXXX)" - git clone --branch main https://git.breadway.dev/Breadway/bread-ecosystem.git "${ECOSYSTEM_CI_DIR}" - TRACK=dev bash "${ECOSYSTEM_CI_DIR}/scripts/gen-index.sh" - rm -rf "${ECOSYSTEM_CI_DIR}" diff --git a/.forgejo/workflows/rc-release.yml b/.forgejo/workflows/rc-release.yml deleted file mode 100644 index 3bb6832..0000000 --- a/.forgejo/workflows/rc-release.yml +++ /dev/null @@ -1,63 +0,0 @@ -name: beta (rc) release - -# Publishes a beta-track build for any `vX.Y.Z-rc.N` prerelease tag -# pushed to `main` — there is no separate `beta` branch; "freezing" is -# just pausing pushes to main while an RC gets tested. See -# bread-ecosystem's docs/release-channels.md for the release-track policy. -on: - push: - tags: ['v*'] - -jobs: - build: - if: ${{ contains(github.ref_name, '-rc.') }} - runs-on: [self-hosted, hestia] - steps: - - name: checkout - run: | - set -euo pipefail - rm -rf src && mkdir src - git clone --branch "${GITHUB_REF_NAME}" --depth 1 \ - "https://git.breadway.dev/${GITHUB_REPOSITORY}.git" src - - - name: build - run: cd src && bash ci/build.sh cargo build --release --locked --workspace --features full - - - name: test - run: cd src && bash ci/build.sh cargo test --release --locked --workspace --features full - - - name: prepare artifacts - run: | - set -euo pipefail - VERSION="${GITHUB_REF_NAME#v}" - PKG_DIR="/srv/breadway-dl/beta/breadsearch/${VERSION}" - mkdir -p "${PKG_DIR}" - for bin in breadsearch breadmill; do - cp "src/target/release/${bin}" "${PKG_DIR}/${bin}-x86_64" - strip "${PKG_DIR}/${bin}-x86_64" - sha256sum "${PKG_DIR}/${bin}-x86_64" | awk '{print $1}' \ - > "${PKG_DIR}/${bin}-x86_64.sha256" - done - cp src/packaging/breadmill.service "${PKG_DIR}/" - cp src/config.example.toml "${PKG_DIR}/" - cp src/bakery.toml "${PKG_DIR}/bakery.toml" - ln -sfn "${VERSION}" "/srv/breadway-dl/beta/breadsearch/latest" - - # No GitHub Release upload — beta, like dev, is only distributed via - # dl.breadway.dev/beta/. - - name: regenerate beta index.json - env: - MINISIGN_SEC_KEY: ${{ secrets.BAKERY_MINISIGN_SEC_KEY_PATH }} - run: | - set -euo pipefail - if [ -z "${MINISIGN_SEC_KEY:-}" ]; then - echo "::error::BAKERY_MINISIGN_SEC_KEY_PATH secret not set — refusing to regenerate beta index.json unsigned (would leave a stale signature mismatched against fresh content and break bakery for everyone on the beta track)" - exit 1 - fi - rm -rf /tmp/bread-ecosystem-ci-* 2>/dev/null || true - # mktemp: a fixed clone path races when multiple repos' dev/beta - # workflows run close together on the same self-hosted runner. - ECOSYSTEM_CI_DIR="$(mktemp -d /tmp/bread-ecosystem-ci-XXXXXX)" - git clone https://git.breadway.dev/Breadway/bread-ecosystem.git "${ECOSYSTEM_CI_DIR}" - TRACK=beta bash "${ECOSYSTEM_CI_DIR}/scripts/gen-index.sh" - rm -rf "${ECOSYSTEM_CI_DIR}" diff --git a/.forgejo/workflows/release.yml b/.forgejo/workflows/release.yml deleted file mode 100644 index 829ff6f..0000000 --- a/.forgejo/workflows/release.yml +++ /dev/null @@ -1,83 +0,0 @@ -name: release - -on: - push: - tags: ["v*"] - -jobs: - build: - if: ${{ !contains(github.ref_name, '-rc.') }} - runs-on: [self-hosted, hestia] - steps: - - name: checkout - run: | - set -euo pipefail - rm -rf src && mkdir src - git clone --branch "${GITHUB_REF_NAME}" --depth 1 \ - "https://git.breadway.dev/${GITHUB_REPOSITORY}.git" src - - - name: build - # --features full (breadmill's npu+rocm+cuda combined) ships one binary - # that can use any backend at runtime via --npu/--rocm/--cuda or - # `backend` in config.toml. All three are ort load-dynamic (dlopen) - # EPs, so this doesn't require the NPU/ROCm/CUDA toolkits to be - # present on the build host — see breadmill/Cargo.toml. - run: | - set -euo pipefail - if [ ! -f src/ci/build.sh ]; then - echo "::error::ci/build.sh is missing — bakery release builds must go through the shared CI wrapper" - exit 1 - fi - cd src && bash ci/build.sh cargo build --release --locked --workspace --features full || { - echo "::error::cargo build --release --locked failed. If Cargo.lock drifted, update and commit it; do not drop --locked." - exit 1 - } - - - name: test - run: cd src && bash ci/build.sh cargo test --release --locked --workspace --features full - - - name: prepare artifacts - run: | - set -euo pipefail - VERSION="${GITHUB_REF_NAME#v}" - PKG_DIR="/srv/breadway-dl/breadsearch/${VERSION}" - mkdir -p "${PKG_DIR}" - for bin in breadsearch breadmill; do - cp "src/target/release/${bin}" "${PKG_DIR}/${bin}-x86_64" - strip "${PKG_DIR}/${bin}-x86_64" - sha256sum "${PKG_DIR}/${bin}-x86_64" | awk '{print $1}' \ - > "${PKG_DIR}/${bin}-x86_64.sha256" - done - cp src/packaging/breadmill.service "${PKG_DIR}/" - cp src/config.example.toml "${PKG_DIR}/" - cp src/bakery.toml "${PKG_DIR}/bakery.toml" - ln -sfn "${VERSION}" "/srv/breadway-dl/breadsearch/latest" - - - name: regenerate index.json - env: - MINISIGN_SEC_KEY: ${{ secrets.BAKERY_MINISIGN_SEC_KEY_PATH }} - run: | - set -euo pipefail - if [ -z "${MINISIGN_SEC_KEY:-}" ]; then - echo "::error::BAKERY_MINISIGN_SEC_KEY_PATH secret not set — refusing to regenerate index.json unsigned (would leave a stale signature mismatched against fresh content and break bakery for everyone)" - exit 1 - fi - rm -rf /tmp/bread-ecosystem-ci - git clone https://git.breadway.dev/Breadway/bread-ecosystem.git /tmp/bread-ecosystem-ci - bash /tmp/bread-ecosystem-ci/scripts/gen-index.sh - - - name: upload to GitHub Release - env: - GH_TOKEN: ${{ secrets.GH_RELEASE_TOKEN }} - run: | - set -euo pipefail - VERSION="${GITHUB_REF_NAME#v}" - PKG_DIR="/srv/breadway-dl/breadsearch/${VERSION}" - gh release create "${GITHUB_REF_NAME}" --repo Breadway/breadsearch \ - --title "breadsearch v${VERSION}" --generate-notes 2>/dev/null || true - gh release upload "${GITHUB_REF_NAME}" --repo Breadway/breadsearch \ - "${PKG_DIR}/breadsearch-x86_64" \ - "${PKG_DIR}/breadmill-x86_64" \ - "${PKG_DIR}/breadsearch-x86_64.sha256" \ - "${PKG_DIR}/breadmill-x86_64.sha256" \ - --clobber diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..f481773 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,66 @@ +name: release + +on: + push: + tags: ["v*"] + +permissions: + contents: write + +env: + DL_DIR: /srv/breadway-dl + ECOSYSTEM_DIR: /tmp/bread-ecosystem-ci + +jobs: + build: + runs-on: [self-hosted, hestia] + steps: + - uses: actions/checkout@v4 + + - name: install build deps + run: sudo apt-get install -y libgtk-4-dev librsvg2-dev libdbus-1-dev pkg-config 2>/dev/null || true + + - name: build + run: cargo build --release --locked + + - name: test + run: cargo test --release --locked --workspace + + - name: prepare artifacts + run: | + VERSION="${GITHUB_REF_NAME#v}" + PKG_DIR="${DL_DIR}/breadsearch/${VERSION}" + mkdir -p "${PKG_DIR}" + for bin in breadsearch breadmill; do + cp "target/release/${bin}" "${PKG_DIR}/${bin}-x86_64" + strip "${PKG_DIR}/${bin}-x86_64" + sha256sum "${PKG_DIR}/${bin}-x86_64" | awk '{print $1}' \ + > "${PKG_DIR}/${bin}-x86_64.sha256" + done + cp packaging/breadmill.service "${PKG_DIR}/" + cp config.example.toml "${PKG_DIR}/" + cp bakery.toml "${PKG_DIR}/bakery.toml" + ln -sfn "${VERSION}" "${DL_DIR}/breadsearch/latest" + + - name: ensure bread-ecosystem + run: | + rm -rf "${ECOSYSTEM_DIR}" + git clone https://github.com/Breadway/bread-ecosystem.git "${ECOSYSTEM_DIR}" + + - name: regenerate index.json + run: bash "${ECOSYSTEM_DIR}/scripts/gen-index.sh" + + - name: upload to GitHub Release + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + VERSION="${GITHUB_REF_NAME#v}" + PKG_DIR="${DL_DIR}/breadsearch/${VERSION}" + gh release create "${GITHUB_REF_NAME}" \ + --title "breadsearch v${VERSION}" --generate-notes 2>/dev/null || true + gh release upload "${GITHUB_REF_NAME}" \ + "${PKG_DIR}/breadsearch-x86_64" \ + "${PKG_DIR}/breadmill-x86_64" \ + "${PKG_DIR}/breadsearch-x86_64.sha256" \ + "${PKG_DIR}/breadmill-x86_64.sha256" \ + --clobber diff --git a/AGENTS.md b/AGENTS.md deleted file mode 100644 index 3c0ac3f..0000000 --- a/AGENTS.md +++ /dev/null @@ -1,50 +0,0 @@ -# AGENTS.md — Repo hygiene - -Scope: this file covers *repo hygiene* — branching, remotes, CI — plus a -short map of the binaries. It is not user-facing project documentation. - -This repo follows the branch/release workflow documented in `CONTRIBUTING.md` -— read and follow it for any git, branch, or release work here (the -single-trunk model, `feature/x`/`fix/x` branch naming, how RC tags work, -etc). Don't improvise a different workflow. The short version: there is one -long-lived branch, `main` — no `dev` or `beta` branch exists. `main` -auto-publishes a dev-track build on every push. "Beta" and "stable" are both -just tags, not branches: push a `vX.Y.Z-rc.N` tag to publish a beta-track -build, push a plain `vX.Y.Z` tag to cut the signed stable release. -"Freezing" for stabilization means pausing pushes to `main`, not moving a -branch. This replaced an earlier three-branch (`dev`/`beta`/`main`) model -after `main` was found to have silently rotted out of sync with `dev`/`beta` -across most repos in this ecosystem. - -When starting work on a new feature, create branch `feature/`. -When working on a bug or issue, create branch `fix/`. - -## Remotes -- `origin` — Forgejo (`git.breadway.dev` via Hestia, SSH) — authoritative. -- `github` — GitHub mirror. Push both when publishing. - -## CI -- `dev-release.yml` triggers on `push: branches: ['main']`. -- `rc-release.yml` triggers on `vX.Y.Z-rc.N` tag pushes (beta track). -- `release.yml` triggers on any other `v*` tag push (stable). - None of these run on plain commits or PRs beyond what's listed. - -## Architecture - -Two binaries + a shared lib: - -| Crate | Role | -|---|---| -| `breadsearch-shared` | XDG paths, config, IPC types, Unix-socket client | -| `breadmill` | Daemon: walk → extract → chunk → embed → index; serves queries | -| `breadsearch` | GTK4 layer-shell overlay: ranked document hits from breadmill | - -breadsearch is document/meaning search. breadbox is the app launcher. They -are not the same overlay. - -`--screenshot` (`breadsearch/src/screenshot.rs`) captures the search panel -through `bread-screenshots`; do not rewrite it just to retarget the crate pin. - -## Don't -- Don't embed credentials in remote URLs — SSH or a credential helper only. -- Don't rewrite `screenshot.rs` as part of pin/docs work. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 529208f..0000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,84 +0,0 @@ -# Contributing - -`breadsearch` — Semantic system-wide search for BOS. - -Part of the bread ecosystem; this repo follows the same branch/release -workflow as every other ecosystem product. - -## Branches - -There is one long-lived branch: **`main`**. All day-to-day work lands here. -Every push to `main` automatically builds and publishes a **dev-track** -build (see Tracks below) — a real install you can test before cutting -anything more formal. - -New work — features and bug fixes alike — goes on a short-lived branch: - -``` -feature/ -fix/ -``` - -Branch off `main`, open a PR/push back into `main` when ready. Short-lived -branches get deleted on merge — they never accumulate the kind of drift a -second long-lived branch does. - -## The release cycle - -There's no separate `beta` or release branch — "stable" and "beta" are both -just **tags** on `main`, not branches that need to be kept in sync: - -1. Work accumulates on `main` via `feature/x` / `fix/x` branches. Each push - auto-publishes a dev build — install it with `bakery track set dev` and - `bakery update --all`, then fix anything broken with another push. -2. When you want to stabilize before a real release, tag a release - candidate: `git tag vX.Y.Z-rc.1 && git push origin vX.Y.Z-rc.1` (push to - both remotes). That tag alone triggers a beta-track build — - "freezing" is just pausing pushes to `main` while you test it, not a - branch operation. Cut `-rc.2`, `-rc.3`, etc. for further fixes. -3. Once an RC has gone without issues, tag the real release: - `git tag vX.Y.Z && git push origin vX.Y.Z` — that's what triggers the - signed stable release build. - -## Tracks, from a user's perspective - -``` -bakery track show # what you're currently on (defaults to stable) -bakery track set dev # or beta, or stable -bakery update --all # pull the latest build on your current track -``` - -| Track | What it is | Published from | -|--------|-----------|-----------------| -| `stable` | The last tagged release | a `vX.Y.Z` tag | -| `beta` | Latest release candidate | a `vX.Y.Z-rc.N` tag | -| `dev` | Bleeding edge | `main`, on every push | - -Dev versions are auto-computed (`X.Y.Z-dev.+`) from the -latest published stable tag, so they always sort as newer than what you -have installed — no manual version bumping needed. Beta versions are just -the RC tag itself (already valid semver, already sorts below the real -release it's a candidate for). - -## Local development - -```sh -cargo build --release --workspace --features full -cargo test --release --workspace --features full -``` - -## CI - -- `dev-release.yml` — triggered on push to `main`. -- `rc-release.yml` — triggered on any `vX.Y.Z-rc.N` tag push. -- `release.yml` — triggered on any other `v*` tag push, cuts the actual - stable release. - -All CI runs on a self-hosted runner; nothing runs automatically on plain -commits or PRs beyond the track builds above. See -[bread-ecosystem's docs/release-channels.md](https://git.breadway.dev/Breadway/bread-ecosystem/src/branch/main/docs/release-channels.md) -for the full policy, including how a new product gets wired onto these tracks. - -## Questions - -Open an issue on this repo's Forgejo tracker. diff --git a/Cargo.lock b/Cargo.lock index 77a2b16..fc122a0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -44,69 +44,19 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.1.5" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c982642fa9e8606056828ee9a8505737230110bb1099153c79efe865c59d12ba" +checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" dependencies = [ "memchr", ] -[[package]] -name = "anstream" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d" -dependencies = [ - "anstyle", - "anstyle-parse", - "anstyle-query", - "anstyle-wincon", - "colorchoice", - "is_terminal_polyfill", - "utf8parse", -] - [[package]] name = "anstyle" version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000" -[[package]] -name = "anstyle-parse" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52ce7f38b242319f7cabaa6813055467063ecdc9d355bbb4ce0c68908cd8130e" -dependencies = [ - "utf8parse", -] - -[[package]] -name = "anstyle-query" -version = "1.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" -dependencies = [ - "windows-sys 0.61.2", -] - -[[package]] -name = "anstyle-wincon" -version = "3.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" -dependencies = [ - "anstyle", - "once_cell_polyfill", - "windows-sys 0.61.2", -] - -[[package]] -name = "anyhow" -version = "1.0.104" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470" - [[package]] name = "arbitrary" version = "1.4.2" @@ -134,12 +84,6 @@ version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" -[[package]] -name = "base64" -version = "0.23.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac07cdecf99051d9a5238b80f35af32cdeba5b336e55d957b318b50137e18da5" - [[package]] name = "base64ct" version = "1.8.3" @@ -154,9 +98,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.13.1" +version = "2.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b588b76d00fde79687d7646a9b5bdf3cc0f655e0bbd080335a95d7e96f3587da" +checksum = "b4388bee8683e3d04af747c73422af53102d2bd24d9eadb6cbc100baef4b43f8" [[package]] name = "block-buffer" @@ -167,6 +111,15 @@ dependencies = [ "generic-array", ] +[[package]] +name = "block-buffer" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2f6c7dbe95a6ed67ad9f18e57daf93a2f034c524b99fd2b76d18fdfeb6660aa" +dependencies = [ + "hybrid-array", +] + [[package]] name = "block-padding" version = "0.3.3" @@ -176,46 +129,10 @@ dependencies = [ "generic-array", ] -[[package]] -name = "bread-onnx" -version = "0.7.2" -source = "git+https://git.breadway.dev/Breadway/bread-ecosystem?tag=v0.7.2#30517f161724132cdeb658c04cf5e490be07ee73" -dependencies = [ - "anyhow", - "bread-utils", - "hex", - "ort", - "sha2", - "tokenizers", - "tracing", - "ureq 2.12.1", -] - -[[package]] -name = "bread-screenshots" -version = "0.7.2" -source = "git+https://git.breadway.dev/Breadway/bread-ecosystem?tag=v0.7.2#30517f161724132cdeb658c04cf5e490be07ee73" -dependencies = [ - "anyhow", - "bread-utils", - "tracing", -] - -[[package]] -name = "bread-shared" -version = "0.7.0" -source = "git+https://git.breadway.dev/Breadway/bread?tag=v0.7.0#22e34e2cf2202305d7960759dfccb54dc79f948b" -dependencies = [ - "dirs", - "serde", - "serde_json", - "toml 0.8.23", -] - [[package]] name = "bread-theme" -version = "0.7.4" -source = "git+https://git.breadway.dev/Breadway/bread-ecosystem?tag=v0.7.4#fcba3760387e2523edb71350f8efea3bc851b21e" +version = "0.2.3" +source = "git+https://github.com/Breadway/bread-ecosystem?tag=v0.2.8#5e58558dd36031433d4a8d8e70c71206c3f1f8f4" dependencies = [ "dirs", "gtk4", @@ -223,24 +140,10 @@ dependencies = [ "serde_json", ] -[[package]] -name = "bread-utils" -version = "0.7.2" -source = "git+https://git.breadway.dev/Breadway/bread-ecosystem?tag=v0.7.2#30517f161724132cdeb658c04cf5e490be07ee73" -dependencies = [ - "bread-shared", - "dirs", - "gtk4", - "gtk4-layer-shell", - "serde", - "serde_json", -] - [[package]] name = "breadmill" -version = "0.3.3" +version = "0.1.0" dependencies = [ - "bread-onnx", "breadsearch-shared", "hex", "ignore", @@ -251,9 +154,8 @@ dependencies = [ "rusqlite", "serde", "serde_json", - "sha2", + "sha2 0.11.0", "tokenizers", - "tracing-subscriber", "ureq 2.12.1", "usearch", "zip", @@ -261,14 +163,10 @@ dependencies = [ [[package]] name = "breadsearch" -version = "0.3.3" +version = "0.1.0" dependencies = [ - "anyhow", - "bread-screenshots", "bread-theme", - "bread-utils", "breadsearch-shared", - "clap", "gtk4", "gtk4-layer-shell", "serde_json", @@ -276,7 +174,7 @@ dependencies = [ [[package]] name = "breadsearch-shared" -version = "0.3.3" +version = "0.1.0" dependencies = [ "serde", "serde_json", @@ -285,12 +183,12 @@ dependencies = [ [[package]] name = "bstr" -version = "1.13.1" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bb31b46c14244e20ee9984b11bf5c992b91fb6939fea616e3512c8baecdbe5f" +checksum = "63044e1ae8e69f3b5a92c736ca6269b8d12fa7efe39bf34ddb06d102cf0e2cab" dependencies = [ "memchr", - "serde_core", + "serde", ] [[package]] @@ -299,6 +197,12 @@ version = "3.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649" +[[package]] +name = "bytecount" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "175812e0be2bccb6abe50bb8d566126198344f707e304f45c648fd8f2cc0365e" + [[package]] name = "byteorder" version = "1.5.0" @@ -307,9 +211,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.12.1" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04" +checksum = "8ae3f5d315924270530207e2a68396c3cc547f6dca3fbdca317cfb1a51edb593" [[package]] name = "bzip2" @@ -336,7 +240,7 @@ version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5cc8d9aa793480744cd9a0524fef1a2e197d9eaa0f739cde19d16aba530dcb95" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.0", "cairo-sys-rs", "glib", "libc", @@ -350,7 +254,7 @@ checksum = "f8b4985713047f5faee02b8db6a6ef32bbb50269ff53c1aee716d1d195b76d54" dependencies = [ "glib-sys", "libc", - "system-deps 7.0.8", + "system-deps", ] [[package]] @@ -373,9 +277,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.4.3" +version = "1.2.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "509591b7bcd67f4ef775afad7662703b4935daaa6ec0e5605cfb1090b32a2b6d" +checksum = "e228eec9be7c17ccb640b59b36a5cd805ea2a564a4c5e162c2f659fea30d3b96" dependencies = [ "find-msvc-tools", "jobserver", @@ -385,9 +289,9 @@ dependencies = [ [[package]] name = "cff-parser" -version = "0.2.0" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5810ca1a2b5870df2aab1c03e11c40c361ba51d6e3e361e56310f1cb3b4e087" +checksum = "31f5b6e9141c036f3ff4ce7b2f7e432b0f00dee416ddcd4f17741d189ddc2e9d" [[package]] name = "cfg-expr" @@ -405,61 +309,36 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" -[[package]] -name = "chacha20" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d524456ba66e72eb8b115ff89e01e497f8e6d11d78b70b1aa13c0fbd97540a81" -dependencies = [ - "cfg-if", - "cpufeatures 0.3.0", - "rand_core 0.10.1", -] - [[package]] name = "cipher" version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" dependencies = [ - "crypto-common", + "crypto-common 0.1.7", "inout", ] [[package]] name = "clap" -version = "4.6.6" +version = "4.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "473c7e07f409a8d772161724aa8db6a765a2532a70f9667eeb7b49d3d02fbdca" +checksum = "1ddb117e43bbf7dacf0a4190fef4d345b9bad68dfc649cb349e7d17d28428e51" dependencies = [ "clap_builder", - "clap_derive", ] [[package]] name = "clap_builder" -version = "4.6.6" +version = "4.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b48fea5a88e9ae728a2dcbedbfc0e730f7d60da42e1cb049a83c9fb8b789889" +checksum = "714a53001bf66416adb0e2ef5ac857140e7dc3a0c48fb28b2f10762fc4b5069f" dependencies = [ - "anstream", "anstyle", "clap_lex", "strsim", ] -[[package]] -name = "clap_derive" -version = "4.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d012d2b9d65aca7f18f4d9878a045bc17899bba951561ba5ec3c2ba1eed9a061" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "syn 3.0.3", -] - [[package]] name = "clap_lex" version = "1.1.0" @@ -477,12 +356,6 @@ dependencies = [ "unicode-width", ] -[[package]] -name = "colorchoice" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570" - [[package]] name = "compact_str" version = "0.9.1" @@ -500,9 +373,9 @@ dependencies = [ [[package]] name = "console" -version = "0.16.4" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fe5f465a4f6fee88fad41b85d990f84c835335e85b5d9e6e63e0d06d28cba7c" +checksum = "d64e8af5551369d19cf50138de61f1c42074ab970f74e99be916646777f8fc87" dependencies = [ "encode_unicode", "libc", @@ -510,6 +383,12 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "const-oid" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6ef517f0926dd24a1582492c791b6a4818a4d94e789a334894aa15b0d12f55c" + [[package]] name = "constant_time_eq" version = "0.3.1" @@ -576,18 +455,18 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.16" +version = "0.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d85363c37faeca707aef026efa9f3b34d077bce547e48f770770625c6013679e" +checksum = "82b8f8f868b36967f9606790d1903570de9ceaf870a7bf9fbbd3016d636a2cb2" dependencies = [ "crossbeam-utils", ] [[package]] name = "crossbeam-deque" -version = "0.8.7" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5181e0de7b61eb03a81e347d6dd8797bae9da5146707b51077e2d71a54ec0ceb" +checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" dependencies = [ "crossbeam-epoch", "crossbeam-utils", @@ -595,18 +474,18 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.20" +version = "0.9.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d6914041f254d6e9176c01941b21115dcfb7089e55135a35411081bd106ef3f" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" dependencies = [ "crossbeam-utils", ] [[package]] name = "crossbeam-utils" -version = "0.8.22" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61803da095bee82a81bb1a452ecc25d3b2f1416d1897eb86430c6159ef717c17" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] name = "crypto-common" @@ -619,10 +498,19 @@ dependencies = [ ] [[package]] -name = "cxx" -version = "1.0.199" +name = "crypto-common" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "824894a4a85dca76d4c95c2b9098c036f5a29f627b30c12780774f6654e60974" +checksum = "ce6e4c961d6cd6c9a86db418387425e8bdeaf05b3c8bc1411e6dca4c252f1453" +dependencies = [ + "hybrid-array", +] + +[[package]] +name = "cxx" +version = "1.0.194" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "747d8437319e3a2f43d93b341c137927ca70c0f5dabeea7a005a73665e247c7e" dependencies = [ "cc", "cxx-build", @@ -635,9 +523,9 @@ dependencies = [ [[package]] name = "cxx-build" -version = "1.0.199" +version = "1.0.194" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1ae0b651ea5b0000b19513aef5a03f194d7e3486f2d9258b658da8677fe9036" +checksum = "b0f4697d190a142477b16aef7da8a99bfdc41e7e8b1687583c0d23a79c7afc1e" dependencies = [ "cc", "codespan-reporting", @@ -645,39 +533,39 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 3.0.3", + "syn", ] [[package]] name = "cxxbridge-cmd" -version = "1.0.199" +version = "1.0.194" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb05f91d3fb8435d9bab6ac5ce6ac1868be774325fb7fb2a91be39393b21388e" +checksum = "d0956799fa8678d4c50eed028f2de1c0552ae183c76e976cf7ca8c4e36a7c328" dependencies = [ "clap", "codespan-reporting", "indexmap", "proc-macro2", "quote", - "syn 3.0.3", + "syn", ] [[package]] name = "cxxbridge-flags" -version = "1.0.199" +version = "1.0.194" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf293202e0e3e98495785745389e8d0755b217e66f19194a5c695c25e03282ef" +checksum = "23384a836ab4f0ad98ace7e3955ad2de39de42378ab487dc28d3990392cb283a" [[package]] name = "cxxbridge-macro" -version = "1.0.199" +version = "1.0.194" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca001d746947c7249ed9d332a10f7a59daedbafeb0ec68c5c18a7db7a93f6ccc" +checksum = "e6acc6b5822b9526adfb4fc377b67128fdd60aac757cc4a741a6278603f763cf" dependencies = [ "indexmap", "proc-macro2", "quote", - "syn 3.0.3", + "syn", ] [[package]] @@ -707,7 +595,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.119", + "syn", ] [[package]] @@ -718,7 +606,7 @@ checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" dependencies = [ "darling_core", "quote", - "syn 2.0.119", + "syn", ] [[package]] @@ -738,9 +626,9 @@ checksum = "ac6b926516df9c60bfa16e107b21086399f8285a44ca9711344b9e553c5146e2" [[package]] name = "der" -version = "0.8.1" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a69dedd701da44b0536442edf09c81a64b0ab97a7a4a5e3d1971f00027cbc63d" +checksum = "71fd89660b2dc699704064e59e9dba0147b903e85319429e131620d022be411b" dependencies = [ "pem-rfc7468", "zeroize", @@ -760,7 +648,7 @@ checksum = "1e567bd82dcff979e4b03460c307b3cdc9e96fde3d73bed1496d2bc75d9dd62a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn", ] [[package]] @@ -781,7 +669,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.119", + "syn", ] [[package]] @@ -791,7 +679,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c" dependencies = [ "derive_builder_core", - "syn 2.0.119", + "syn", ] [[package]] @@ -800,11 +688,22 @@ version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "block-buffer", - "crypto-common", + "block-buffer 0.10.4", + "crypto-common 0.1.7", "subtle", ] +[[package]] +name = "digest" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1dd6dbb5841937940781866fa1281a1ff7bd3bf827091440879f9994983d5c2" +dependencies = [ + "block-buffer 0.12.1", + "const-oid", + "crypto-common 0.2.2", +] + [[package]] name = "dirs" version = "5.0.1" @@ -828,13 +727,13 @@ dependencies = [ [[package]] name = "displaydoc" -version = "0.2.7" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6232dd377dcc64799954cbd3a9bb882e9cdc1308ccd87b1c098f1fb2eaf82a8" +checksum = "1ac70aa55017e108007fbaf5aa0f54b021c98f92ff8af59d42eda9da96e3dd4f" dependencies = [ "proc-macro2", "quote", - "syn 3.0.3", + "syn", ] [[package]] @@ -848,9 +747,9 @@ dependencies = [ [[package]] name = "either" -version = "1.17.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e5e8f6c15a24b9a3ee5efec809ccd006d3b30e8b3bb63c39af737c7f87daa1d" +checksum = "91622ff5e7162018101f2fea40d6ebf4a78bbe5a49736a2020649edf9693679e" [[package]] name = "encode_unicode" @@ -880,7 +779,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -915,9 +814,9 @@ checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a" [[package]] name = "fastrand" -version = "2.5.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223" +checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6" [[package]] name = "field-offset" @@ -941,9 +840,9 @@ dependencies = [ [[package]] name = "find-msvc-tools" -version = "0.1.11" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d45db016d36b838f563236e9193d0ee6ce38f3f68b6c94e914b4929c96bbb890" +checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" [[package]] name = "flate2" @@ -1002,24 +901,24 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.34" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f9e3d69d39e4862ffed03ed071a76f9a13ba1d9109d355b0f0aa6b15e393c4" +checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d" dependencies = [ "futures-core", ] [[package]] name = "futures-core" -version = "0.3.34" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92d699e522242e69e3003b94ecc1f960f3a5e015aa7c5d7486e65ad01dd94f5e" +checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d" [[package]] name = "futures-executor" -version = "0.3.34" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "031b47cf1a3c6cc8bc2fc76cd437f521619387907d469316e7c0bc278f1f5432" +checksum = "baf29c38818342a3b26b5b923639e7b1f4a61fc5e76102d4b1981c6dc7a7579d" dependencies = [ "futures-core", "futures-task", @@ -1028,32 +927,32 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.34" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53c0fa8157de1303bfffdaa1cc2a673bfffb60102f76b0ef4441659124373fed" +checksum = "cecba35d7ad927e23624b22ad55235f2239cfa44fd10428eecbeba6d6a717718" [[package]] name = "futures-macro" -version = "0.3.34" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb9654ba8355388abeb8dcb4fc62f511300867002afc858860463bdd9fe0c44" +checksum = "e835b70203e41293343137df5c0664546da5745f82ec9b84d40be8336958447b" dependencies = [ "proc-macro2", "quote", - "syn 3.0.3", + "syn", ] [[package]] name = "futures-task" -version = "0.3.34" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd417de3d1d015fc3bfd2b1ea46dfc7bab72ef86f1cc7cc9c78e728b34a6d1fd" +checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393" [[package]] name = "futures-util" -version = "0.3.34" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d50a92467f8ba5dd6e3ee5d4bd04d73ab2e4e1c44474a0674821dfce14b79bc" +checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6" dependencies = [ "futures-core", "futures-macro", @@ -1084,14 +983,14 @@ dependencies = [ "glib-sys", "gobject-sys", "libc", - "system-deps 7.0.8", + "system-deps", ] [[package]] name = "gdk4" -version = "0.11.4" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d81e2a6c6ecba2aab60633a98df1868b03fa0bfdce8105edc27c1bccf71f0e39" +checksum = "fd42fdbbf48612c6e8f47c65fb92d2e8f39c25aecd6af047e83897c1a22d2a4e" dependencies = [ "cairo-rs", "gdk-pixbuf", @@ -1105,9 +1004,9 @@ dependencies = [ [[package]] name = "gdk4-sys" -version = "0.11.4" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d8f608d8d7d229975c4d0d026f5d3071598c4ddab3c5262b0a31840fec78d13" +checksum = "9d974ac4f15e67472c3a9728daf612590b4a5762a4b33f0edd298df0b80d043c" dependencies = [ "cairo-sys-rs", "gdk-pixbuf-sys", @@ -1117,7 +1016,7 @@ dependencies = [ "libc", "pango-sys", "pkg-config", - "system-deps 7.0.8", + "system-deps", ] [[package]] @@ -1150,30 +1049,16 @@ dependencies = [ "cfg-if", "js-sys", "libc", - "r-efi 5.3.0", + "r-efi", "wasip2", "wasm-bindgen", ] -[[package]] -name = "getrandom" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099" -dependencies = [ - "cfg-if", - "js-sys", - "libc", - "r-efi 6.0.0", - "rand_core 0.10.1", - "wasm-bindgen", -] - [[package]] name = "gio" -version = "0.22.8" +version = "0.22.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b3e1f669909c326b9413bde5a742097b8c90a7d78f45326db13668984769ded" +checksum = "e3848bcba3a35cc0a71df8ba8ecfd799d6bfb862342a53a4a915fb62213aa4e6" dependencies = [ "futures-channel", "futures-core", @@ -1188,14 +1073,14 @@ dependencies = [ [[package]] name = "gio-sys" -version = "0.22.8" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "353fdc7da7cd16da916104b1e0e4e7de380ec9c8aaa20d4d742d66310ab4b0d5" +checksum = "64729ba2772c080448f9f966dba8f4456beeb100d8c28a865ef8a0f2ef4987e1" dependencies = [ "glib-sys", "gobject-sys", "libc", - "system-deps 7.0.8", + "system-deps", "windows-sys 0.61.2", ] @@ -1221,11 +1106,11 @@ dependencies = [ [[package]] name = "glib" -version = "0.22.8" +version = "0.22.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddbcf514bd1881fc1b960e4e52b4e82873f4da3bceddbd58d42827b508888100" +checksum = "c207e04e51605dcf7b2924c41591b3a10e1438eaac5bcf448fb91f325381104a" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.0", "futures-channel", "futures-core", "futures-executor", @@ -1249,24 +1134,24 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.119", + "syn", ] [[package]] name = "glib-sys" -version = "0.22.8" +version = "0.22.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "030967459f9f676851872c6304adea7825c6d462ec9b72554c733cf0c5952233" +checksum = "5f7fbac234ed5bc2a28359b7bde8e1b9cdf1441cc2d7f068e4824672d7db9445" dependencies = [ "libc", - "system-deps 7.0.8", + "system-deps", ] [[package]] name = "globset" -version = "0.4.20" +version = "0.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07c34a9410465b45bd9787443bc7370f37735bad04b0f0cd57ff1a3186c98988" +checksum = "52dfc19153a48bde0cbd630453615c8151bce3a5adfac7a0aebfbf0a1e1f57e3" dependencies = [ "aho-corasick", "bstr", @@ -1283,35 +1168,37 @@ checksum = "22a861859b887a79cf461359c192c97a57d8fb0229dd291232e57aa11f6fa72c" dependencies = [ "glib-sys", "libc", - "system-deps 7.0.8", + "system-deps", ] [[package]] name = "graphene-rs" -version = "0.22.8" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb856b9c558971c3f13ab692358926da710b046932a4e087aedcc35b040d7dff" +checksum = "c7d1b7881f96869f49808b6adfe906a93a57a34204952253444d68c3208d71f1" dependencies = [ "glib", "graphene-sys", + "libc", ] [[package]] name = "graphene-sys" -version = "0.22.8" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c7ffdfde88f3570d3705e0d8a2433e036d387a1f2930bbf47eafcb5f569fd04" +checksum = "517f062f3fd6b7fd3e57a3f038a74b3c23ca32f51199ff028aa704609943f79c" dependencies = [ "glib-sys", "libc", - "system-deps 7.0.8", + "pkg-config", + "system-deps", ] [[package]] name = "gsk4" -version = "0.11.4" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b867be1c5f14dcb8f552c0eff6e9a9b1da5f8b43943e8efc3a63c889d84952ff" +checksum = "53c912dfcbd28acace5fc99c40bb9f25e1dcb73efb1f2608327f66a99acdcb62" dependencies = [ "cairo-rs", "gdk4", @@ -1324,9 +1211,9 @@ dependencies = [ [[package]] name = "gsk4-sys" -version = "0.11.4" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b7c7eb2e681ee896646cfb8872b431f24d09f53ba9283289d9b10caa6707088" +checksum = "d7d54bbc7a9d8b6ffe4f0c95eede15ccfb365c8bf521275abe6bcfb57b18fb8a" dependencies = [ "cairo-sys-rs", "gdk4-sys", @@ -1335,14 +1222,14 @@ dependencies = [ "graphene-sys", "libc", "pango-sys", - "system-deps 7.0.8", + "system-deps", ] [[package]] name = "gtk4" -version = "0.11.4" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98a0a0466484f64b07b5b8184d43fa46be78eb0b8e04ae4e179af31d770b76d9" +checksum = "7181b837f04cbe93f79441475f7a00560a92cba7a72e38cc1a68b6f8b78eaae2" dependencies = [ "cairo-rs", "field-offset", @@ -1361,11 +1248,11 @@ dependencies = [ [[package]] name = "gtk4-layer-shell" -version = "0.8.1" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17c28ea0f4676fdaaae7ff2413a24d0d35c8657424f84856c1103c73454c9da4" +checksum = "a4069987ff4793699511a251028cc336b438e46565b463f111250148d574752a" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.0", "gdk4", "glib", "glib-sys", @@ -1376,34 +1263,34 @@ dependencies = [ [[package]] name = "gtk4-layer-shell-sys" -version = "0.6.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcf19bb884ef0ef55b9e6b2b369c39b4fcc0c41e3a0c1cbc8c267720338b690b" +checksum = "8f566a5ec5bcc454e7fcf2ab76930887ced5365afce12c1e5201bb296b95f1b9" dependencies = [ "gdk4-sys", "glib-sys", "gtk4-sys", "libc", - "system-deps 8.0.0", + "system-deps", ] [[package]] name = "gtk4-macros" -version = "0.11.4" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ac7179400a36a04de039c24206bb841c5596992b907b43b23ee8d5bdc40d00e" +checksum = "3581b242ba62fdff122ebb626ea641582ec326031622bd19d60f85029c804a87" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.119", + "syn", ] [[package]] name = "gtk4-sys" -version = "0.11.4" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82b8f954786af0b1984425c4446b77f5ff6594346181316be3f850caab1c6f01" +checksum = "20ba8e695e2640455561274e65e45f0a151619e450746007667f4b23ceae4e1b" dependencies = [ "cairo-sys-rs", "gdk-pixbuf-sys", @@ -1415,7 +1302,7 @@ dependencies = [ "gsk4-sys", "libc", "pango-sys", - "system-deps 7.0.8", + "system-deps", ] [[package]] @@ -1438,9 +1325,9 @@ dependencies = [ [[package]] name = "hashlink" -version = "0.12.1" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32069d97bb81e38fa67eab65e3393bf804bb85969f2bc06bf13f64aef5aba248" +checksum = "a5081f264ed7adee96ea4b4778b6bb9da0a7228b084587aa3bd3ff05da7c5a3b" dependencies = [ "hashbrown 0.17.1", ] @@ -1463,7 +1350,7 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest", + "digest 0.10.7", ] [[package]] @@ -1474,9 +1361,9 @@ checksum = "ec9d92d097f4749b64e8cc33d924d9f40a2d4eb91402b458014b781f5733d60f" [[package]] name = "http" -version = "1.5.0" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "918d3568bebf352712bc2ef3d46a8bcf1a75b373be6539de198e9105cbbf9ce0" +checksum = "6970f50e31d6fc17d3fa27329444bfa74e196cf62e95052a3f6fee181dba6425" dependencies = [ "bytes", "itoa", @@ -1489,10 +1376,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" [[package]] -name = "icu_collections" -version = "2.3.0" +name = "hybrid-array" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa68d21081c4a05d5a901a1c62add574c77048b6a1c67be3b50ce0b60d4ca513" +checksum = "9155a582abd142abc056962c29e3ce5ff2ad5469f4246b537ed42c5deba857da" +dependencies = [ + "typenum", +] + +[[package]] +name = "icu_collections" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2984d1cd16c883d7935b9e07e44071dca8d917fd52ecc02c04d5fa0b5a3f191c" dependencies = [ "displaydoc", "potential_utf", @@ -1504,9 +1400,9 @@ dependencies = [ [[package]] name = "icu_locale_core" -version = "2.3.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d56e28588da92eee5c3201a6eff33fabdd49b62269c8938d4ff050ce4d900deb" +checksum = "92219b62b3e2b4d88ac5119f8904c10f8f61bf7e95b640d25ba3075e6cac2c29" dependencies = [ "displaydoc", "litemap", @@ -1517,9 +1413,9 @@ dependencies = [ [[package]] name = "icu_normalizer" -version = "2.3.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f9cf5f235641ed274641dd81c3f28d870e276763d0797aeeab72317b1c646f" +checksum = "c56e5ee99d6e3d33bd91c5d85458b6005a22140021cc324cea84dd0e72cff3b4" dependencies = [ "icu_collections", "icu_normalizer_data", @@ -1531,17 +1427,16 @@ dependencies = [ [[package]] name = "icu_normalizer_data" -version = "2.3.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1563da1ed3e0b3bf3d74c9b85917ac9c56464d2f57242270c09c9e752f8021a0" +checksum = "da3be0ae77ea334f4da67c12f149704f19f81d1adf7c51cf482943e84a2bad38" [[package]] name = "icu_properties" -version = "2.3.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e7ca276ad3145661a65914e6daf131ca5120cd3dcee8f8f3214b8875184a148" +checksum = "bee3b67d0ea5c2cca5003417989af8996f8604e34fb9ddf96208a033901e70de" dependencies = [ - "displaydoc", "icu_collections", "icu_locale_core", "icu_properties_data", @@ -1552,15 +1447,15 @@ dependencies = [ [[package]] name = "icu_properties_data" -version = "2.3.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e590f038c1464a96894fd6d10127e90a8be4509f56ff7ecef851b15cee0b7caa" +checksum = "8e2bbb201e0c04f7b4b3e14382af113e17ba4f63e2c9d2ee626b720cbce54a14" [[package]] name = "icu_provider" -version = "2.3.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92a7ed671a6aad807a8651a2e1782a6598fda9ce5185dd8158549e95a91c6428" +checksum = "139c4cf31c8b5f33d7e199446eff9c1e02decfc2f0eec2c8d71f65befa45b421" dependencies = [ "displaydoc", "icu_locale_core", @@ -1600,9 +1495,9 @@ dependencies = [ [[package]] name = "ignore" -version = "0.4.33" +version = "0.4.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b69833ed729dc5aa7d19541d96d6cf8e9137194207a04916d658e43168402f" +checksum = "b915661dd01db3f05050265b2477bcc6527b3792388e2749b41623cc592be67d" dependencies = [ "crossbeam-deque", "globset", @@ -1626,9 +1521,9 @@ dependencies = [ [[package]] name = "indicatif" -version = "0.18.6" +version = "0.18.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9433806cd6b4ec1aba79c021c7e4c58fb4c3b9977c085062e611ac929998fb0c" +checksum = "25470f23803092da7d239834776d653104d551bc4d7eacaf31e6837854b8e9eb" dependencies = [ "console", "portable-atomic", @@ -1650,9 +1545,9 @@ dependencies = [ [[package]] name = "inotify-sys" -version = "0.1.8" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c033f80b2c113cdf91ab7a33faa9cbc014726dcad99880c8609af2a370edf37d" +checksum = "e05c02b5e89bff3b946cedeca278abc628fe811e604f027c45a8aa3cf793d0eb" dependencies = [ "libc", ] @@ -1667,12 +1562,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "is_terminal_polyfill" -version = "1.70.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" - [[package]] name = "itertools" version = "0.14.0" @@ -1690,19 +1579,19 @@ checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" [[package]] name = "jobserver" -version = "0.1.35" +version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c00acbd29eabad4a2392fa0e921c874934dbbf4194312ad20f04a0ed67a3cb3" +checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" dependencies = [ - "getrandom 0.4.3", + "getrandom 0.3.4", "libc", ] [[package]] name = "js-sys" -version = "0.3.104" +version = "0.3.102" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e0c1080212aad755ea003d18543e8768dd432c48819efd73a7bf1e39b7a5a3a" +checksum = "03d04c30968dffe80775bd4d7fb676131cd04a1fb46d2686dbffbaec2d9dfd31" dependencies = [ "cfg-if", "futures-util", @@ -1717,9 +1606,9 @@ checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" [[package]] name = "kqueue" -version = "1.2.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d763e5b24120b4ddf50de6c92308156765aabfbbccebf401da7cff2d70a41ea" +checksum = "273c0752728918e0ac4976f2b275b6fefb9ecd400585dec929419f3844cd87b5" dependencies = [ "kqueue-sys", "libc", @@ -1731,21 +1620,15 @@ version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07293a4e297ac234359b510362495713f75ea345d5307140414f20c69ffeb087" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.0", "libc", ] -[[package]] -name = "lazy_static" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" - [[package]] name = "libc" -version = "0.2.189" +version = "0.2.186" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2" +checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66" [[package]] name = "libloading" @@ -1759,18 +1642,18 @@ dependencies = [ [[package]] name = "libredox" -version = "0.1.20" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d0a00925a9f930d679b6789b721e3a7f9ed110f41b86d2497caa780c3a070a" +checksum = "f02ab6bace2054fb888a3c16f990117b579d14a3088e472d63c6011fa185c9d3" dependencies = [ "libc", ] [[package]] name = "libsqlite3-sys" -version = "0.38.2" +version = "0.38.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1d20bef17f513b9b3004532233187769cd072d790971f4e4da0e346eb6401e8" +checksum = "f6c19a05435c21ac299d71b6a9c13db3e3f47c520517d58990a462a1397a61db" dependencies = [ "cc", "pkg-config", @@ -1794,9 +1677,9 @@ checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" [[package]] name = "litemap" -version = "0.8.3" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47d9d19d1d6efa0109d2f65ff4c85cddd50bd572e5a00127ab10987290bcefae" +checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0" [[package]] name = "log" @@ -1806,27 +1689,28 @@ checksum = "0ceec5bc11778974d1bcb055b18002eba7f4b3518b6a0081b3af5f21666da9ad" [[package]] name = "lopdf" -version = "0.42.0" +version = "0.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25aab26d99567469098e64a02f42679f8965c6401263eefa31d8f2dcc37a221c" +checksum = "c7184fdea2bc3cd272a1acec4030c321a8f9875e877b3f92a53f2f6033fdc289" dependencies = [ "aes", - "bitflags 2.13.1", + "bitflags 2.13.0", "cbc", "ecb", "encoding_rs", "flate2", - "getrandom 0.4.3", + "getrandom 0.3.4", "indexmap", "itoa", "log", "md-5", "nom 8.0.0", - "rand 0.10.2", + "nom_locate", + "rand", "rangemap", - "sha2", + "sha2 0.10.9", "stringprep", - "thiserror 2.0.20", + "thiserror 2.0.18", "ttf-parser", "weezl", ] @@ -1860,34 +1744,25 @@ dependencies = [ [[package]] name = "macro_rules_attribute" -version = "0.2.3" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3ae8f6d608c795738406608304d30a2dfbdc8e58e44f7ba43236da5208ded3c" +checksum = "65049d7923698040cd0b1ddcced9b0eb14dd22c5f86ae59c3740eab64a676520" dependencies = [ "macro_rules_attribute-proc_macro", - "pastey", + "paste", ] [[package]] name = "macro_rules_attribute-proc_macro" -version = "0.2.3" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc04a4c58212d57930a24bf47d3fa87485264a3a054e9c10e042eb373573ad3c" - -[[package]] -name = "matchers" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1525a2a28c7f4fa0fc98bb91ae755d1e2d1505079e05539e35bc876b5d65ae9" -dependencies = [ - "regex-automata", -] +checksum = "670fdfda89751bc4a84ac13eaa63e205cf0fd22b4c9a5fbfa085b63c1f1d3a30" [[package]] name = "matrixmultiply" -version = "0.3.11" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f607c237553f086e7043417a51df26b2eb899d3caff94e6a67592ff992fedc7" +checksum = "a06de3016e9fae57a36fd14dba131fccf49f74b40b7fbdb472f96e361ec71a08" dependencies = [ "autocfg", "rawpointer", @@ -1900,14 +1775,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" dependencies = [ "cfg-if", - "digest", + "digest 0.10.7", ] [[package]] name = "memchr" -version = "2.8.3" +version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" +checksum = "88904434abc2901f197fe8cc55f0445e7ded921dba5911dad2e2b39b48e663c4" [[package]] name = "memoffset" @@ -1965,7 +1840,7 @@ checksum = "e4db6d5580af57bf992f59068d4ea26fd518574ff48d7639b255a36f9de6e7e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn", ] [[package]] @@ -2019,13 +1894,24 @@ dependencies = [ "memchr", ] +[[package]] +name = "nom_locate" +version = "5.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b577e2d69827c4740cba2b52efaad1c4cc7c73042860b199710b3575c68438d" +dependencies = [ + "bytecount", + "memchr", + "nom 8.0.0", +] + [[package]] name = "notify" version = "6.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6205bd8bb1e454ad2e27422015fb5e4f2bcc7e08fa8f27058670d208324a4d2d" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.0", "crossbeam-channel", "filetime", "fsevent-sys", @@ -2038,15 +1924,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "nu-ansi-term" -version = "0.50.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" -dependencies = [ - "windows-sys 0.61.2", -] - [[package]] name = "num-complex" version = "0.4.6" @@ -2064,9 +1941,9 @@ checksum = "521739c6d2bac4aa25192232afe6841231376b2b26d4d9fae5ecf8ca5772e441" [[package]] name = "num-integer" -version = "0.1.47" +version = "0.1.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ce2d95d4b3734dc35aa2f45e1aa22cd416814592a4f9d9205e11affd5b8e10b" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" dependencies = [ "num-traits", ] @@ -2082,9 +1959,9 @@ dependencies = [ [[package]] name = "numkong" -version = "7.8.0" +version = "7.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81601dc994296baed2968db046b01589be7898837c31f2b073704c6e65ff8f04" +checksum = "b58d4bb97df102ebdde66a352a20c0bc65c7c407ee9bef12ebe317edc2458a55" dependencies = [ "cc", ] @@ -2095,19 +1972,13 @@ version = "1.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" -[[package]] -name = "once_cell_polyfill" -version = "1.70.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" - [[package]] name = "onig" version = "6.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0cc3cbf698f9438986c11a880c90a6d04b9de27575afd28bbf45b154b6c709e2" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.0", "libc", "once_cell", "onig_sys", @@ -2129,7 +2000,7 @@ version = "0.10.81" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77823a27f0babb03091cb9ed9ef80af3b39dbc82f97e8fa530374b7dafd87a45" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.0", "cfg-if", "foreign-types", "libc", @@ -2145,7 +2016,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn", ] [[package]] @@ -2174,37 +2045,38 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] name = "ort" -version = "2.0.0-rc.13" +version = "2.0.0-rc.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4336a1e2b38848325241c72889086886004e589b7c74f335e60a8e8db5138a0b" +checksum = "d7de3af33d24a745ffb8fab904b13478438d1cd52868e6f17735ef6e1f8bf133" dependencies = [ "libloading", "ndarray", "ort-sys", "smallvec", "tracing", - "ureq 3.4.0", + "ureq 3.3.0", ] [[package]] name = "ort-sys" -version = "2.0.0-rc.13" +version = "2.0.0-rc.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf211e3776eea6aec988552fa118dd746d70e1b1e5e244058d1c98015f3e5872" +checksum = "d7b497d21a8b6fbb4b5a544f8fadb77e801a09ae0add9e411d31c6f89e3c1e90" dependencies = [ "hmac-sha256", "lzma-rust2", - "ureq 3.4.0", + "ureq 3.3.0", ] [[package]] name = "pango" -version = "0.22.8" +version = "0.22.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d800d8d0de2ad5d0fb046f5344dbaba14a003cf3dd27cc21d85893d35ea316c" +checksum = "251bdc6e6487b811be0e406a21e301e07e45c0aa8fa39e00c0c8e12a91752438" dependencies = [ "gio", "glib", + "libc", "pango-sys", ] @@ -2217,7 +2089,7 @@ dependencies = [ "glib-sys", "gobject-sys", "libc", - "system-deps 7.0.8", + "system-deps", ] [[package]] @@ -2226,27 +2098,21 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" -[[package]] -name = "pastey" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ee67f1008b1ba2321834326597b8e186293b049a023cdef258527550b9935b4" - [[package]] name = "pbkdf2" version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" dependencies = [ - "digest", + "digest 0.10.7", "hmac", ] [[package]] name = "pdf-extract" -version = "0.12.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "417e8fdc940f1d5bc62c5f89864c3a2255f74f69aa353c98509213d67df61e73" +checksum = "1e28ba1758a3d3f361459645780e09570b573fc3c82637449e9963174c813a98" dependencies = [ "adobe-cmap-parser", "cff-parser", @@ -2282,9 +2148,9 @@ checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" [[package]] name = "pkg-config" -version = "0.3.34" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6b464fbc74e149a392436b17d523f769e057cb6877f6a5c4618bc6f11800548" +checksum = "19f132c84eca552bf34cab8ec81f1c1dcc229b811638f9d283dceabe58c5569e" [[package]] name = "pom" @@ -2294,9 +2160,9 @@ checksum = "60f6ce597ecdcc9a098e7fddacb1065093a3d66446fa16c675e7e71d1b5c28e6" [[package]] name = "portable-atomic" -version = "1.15.0" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05c8b63e8d9609db387f0324918f81d68fe27748f084ef092fb35954d0539a85" +checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49" [[package]] name = "portable-atomic-util" @@ -2315,9 +2181,9 @@ checksum = "78451badbdaebaf17f053fd9152b3ffb33b516104eacb45e7864aaa9c712f306" [[package]] name = "potential_utf" -version = "0.1.6" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d83eb9bc6d8e5cf568e7a1101d60ee05e81ed50ea106026f3d18deeb046d7661" +checksum = "0103b1cef7ec0cf76490e969665504990193874ea05c85ff9bab8b911d0a0564" dependencies = [ "zerovec", ] @@ -2343,23 +2209,23 @@ version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f" dependencies = [ - "toml_edit 0.25.13+spec-1.1.0", + "toml_edit 0.25.12+spec-1.1.0", ] [[package]] name = "proc-macro2" -version = "1.0.107" +version = "1.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9" +checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" dependencies = [ "unicode-ident", ] [[package]] name = "quick-xml" -version = "0.41.0" +version = "0.40.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e660451e55124f798a69a5af3f49ccfbefbd41910eefd25caf2393e1f3473ec1" +checksum = "2474bd2e5029e7ccb6abb2ba48cf2383a333851dedf495901544281590c7da7f" dependencies = [ "memchr", "serde", @@ -2367,9 +2233,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.47" +version = "1.0.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001" +checksum = "dfbc457d0c7a0759a614551b11a6409e5951f6c7537be1f1b7682b9ae9230368" dependencies = [ "proc-macro2", ] @@ -2380,31 +2246,14 @@ version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" -[[package]] -name = "r-efi" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" - [[package]] name = "rand" -version = "0.9.5" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ef1d0d795eb7d84685bca4f72f3649f064e6641543d3a8c415898726a57b41" +checksum = "44c5af06bb1b7d3216d91932aed5265164bf384dc89cd6ba05cf59a35f5f76ea" dependencies = [ "rand_chacha", - "rand_core 0.9.5", -] - -[[package]] -name = "rand" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7f5fa3a058cd35567ef9bfa5e75732bee0f9e4c55fa90477bef2dfcdbc4be80" -dependencies = [ - "chacha20", - "getrandom 0.4.3", - "rand_core 0.10.1", + "rand_core", ] [[package]] @@ -2414,7 +2263,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" dependencies = [ "ppv-lite86", - "rand_core 0.9.5", + "rand_core", ] [[package]] @@ -2426,17 +2275,11 @@ dependencies = [ "getrandom 0.3.4", ] -[[package]] -name = "rand_core" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69" - [[package]] name = "rangemap" -version = "1.8.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a611d15b50743feb4c76b7d03edcb0e64f399c26961e4efe6975bc398be6aa3d" +checksum = "973443cf09a9c8656b574a866ab68dfa19f0867d0340648c7d2f6a71b8a8ea68" [[package]] name = "rawpointer" @@ -2488,9 +2331,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.13.1" +version = "1.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f020237b6c8eed93db2e2cb53c00c60a8e1bc73da7d073199a1180401450218d" +checksum = "f1292b7759ae1cb9ec195452d1390a074f0cd8541ab7a5a8c31cd6db45d4a6ba" dependencies = [ "aho-corasick", "memchr", @@ -2500,9 +2343,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.18" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad8553b9b26413251cbf30e620595c7a41b3887f03da04579c0e6b0d6a06b4b2" +checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f" dependencies = [ "aho-corasick", "memchr", @@ -2536,16 +2379,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c51c9ae4df8a7fba42103df5c621fa3c37eccf3a3c650879e90fc48b11cc192c" dependencies = [ "hashbrown 0.16.1", - "thiserror 2.0.20", + "thiserror 2.0.18", ] [[package]] name = "rusqlite" -version = "0.40.2" +version = "0.40.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23f2a97da3e3873c73cb2a2e71b35c40ff95e0b1eefa8d72d8499a6928c3b5b3" +checksum = "11438310b19e3109b6446c33d1ed5e889428cf2e278407bc7896bc4aaea43323" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.0", "fallible-iterator", "fallible-streaming-iterator", "hashlink", @@ -2569,18 +2412,18 @@ version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.0", "errno", "libc", "linux-raw-sys", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] name = "rustls" -version = "0.23.43" +version = "0.23.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0283386ce02abc0151e1761d08802dfe86c173b0b494af5cbc086574e453da06" +checksum = "6b92b125634d9b795e7beca796cc790df15a7fb38323bf3196fda83292d06b1f" dependencies = [ "log", "once_cell", @@ -2593,18 +2436,18 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.15.1" +version = "1.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f4925028c7eb5d1fcdaf196971378ed9d2c1c4efc7dc5d011256f76c99c0a96" +checksum = "30a7197ae7eb376e574fe940d068c30fe0462554a3ddbe4eca7838e049c937a9" dependencies = [ "zeroize", ] [[package]] name = "rustls-webpki" -version = "0.103.14" +version = "0.103.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0527518605e68109d875e248ea259b6758801cf165e4b2c2733ae3b51f12535a" +checksum = "61c429a8649f110dddef65e2a5ad240f747e85f7758a6bccc7e5777bd33f756e" dependencies = [ "ring", "rustls-pki-types", @@ -2613,9 +2456,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.23" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" [[package]] name = "ryu" @@ -2653,7 +2496,7 @@ version = "3.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b7f4bc775c73d9a02cde8bf7b2ec4c9d12743edf609006c7facc23998404cd1d" dependencies = [ - "bitflags 2.13.1", + "bitflags 2.13.0", "core-foundation", "core-foundation-sys", "libc", @@ -2678,9 +2521,9 @@ checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" [[package]] name = "serde" -version = "1.0.229" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" dependencies = [ "serde_core", "serde_derive", @@ -2688,29 +2531,29 @@ dependencies = [ [[package]] name = "serde_core" -version = "1.0.229" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.229" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", - "syn 3.0.3", + "syn", ] [[package]] name = "serde_json" -version = "1.0.151" +version = "1.0.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c841b55ecdae098c80dcae9cf767f6f8a0c2cdb3416bbef72181df4d0fe73f14" +checksum = "e8014e44b4736ed0538adeecded0fce2a272f22dc9578a7eb6b2d9993c74cfb9" dependencies = [ "itoa", "memchr", @@ -2739,13 +2582,13 @@ dependencies = [ [[package]] name = "sha1" -version = "0.10.7" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a978451301f4db1d02937a4ab3ccce137717b81826e79b7d49ffe3244a13c3b8" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ "cfg-if", "cpufeatures 0.2.17", - "digest", + "digest 0.10.7", ] [[package]] @@ -2756,16 +2599,18 @@ checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" dependencies = [ "cfg-if", "cpufeatures 0.2.17", - "digest", + "digest 0.10.7", ] [[package]] -name = "sharded-slab" -version = "0.1.7" +name = "sha2" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +checksum = "446ba717509524cb3f22f17ecc096f10f4822d76ab5c0b9822c5f9c284e825f4" dependencies = [ - "lazy_static", + "cfg-if", + "cpufeatures 0.3.0", + "digest 0.11.3", ] [[package]] @@ -2776,9 +2621,9 @@ checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" [[package]] name = "simd-adler32" -version = "0.3.10" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a219298ac11a56ea9a6d2120044824d6f01aeb034955e7af7bc16858527deea" +checksum = "703d5c7ef118737c72f1af64ad2f6f8c5e1921f818cdcb97b8fe6fc69bf66214" [[package]] name = "slab" @@ -2864,20 +2709,9 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" -version = "2.0.119" +version = "2.0.118" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "3.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53e9bae58849f64dfa4f5d5ae372c8341f7305f82a3868709269343628b659a3" +checksum = "1b9ae57f904213ebb649ce6895b8a66c66f0203b9319718f69a5612a065b1422" dependencies = [ "proc-macro2", "quote", @@ -2892,7 +2726,7 @@ checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn", ] [[package]] @@ -2904,20 +2738,7 @@ dependencies = [ "cfg-expr", "heck", "pkg-config", - "toml 1.1.4+spec-1.1.0", - "version-compare", -] - -[[package]] -name = "system-deps" -version = "8.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83779a5c956bcb6ba627a4ecf0a9d7625db47d7537e0892d97f712ac995648a3" -dependencies = [ - "cfg-expr", - "heck", - "pkg-config", - "toml 1.1.4+spec-1.1.0", + "toml 1.1.2+spec-1.1.0", "version-compare", ] @@ -2934,10 +2755,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" dependencies = [ "fastrand", - "getrandom 0.4.3", + "getrandom 0.3.4", "once_cell", "rustix", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -2960,11 +2781,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.20" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec86235f5fcc2a73650310756d2ac5b138a5780bbbdfae3eeccec992c435ba4f" +checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" dependencies = [ - "thiserror-impl 2.0.20", + "thiserror-impl 2.0.18", ] [[package]] @@ -2975,34 +2796,25 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn", ] [[package]] name = "thiserror-impl" -version = "2.0.20" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc04cd3e1236dd4a98afca4569f2deb3f120e5422a4023be2cb683f8486292af" +checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" dependencies = [ "proc-macro2", "quote", - "syn 3.0.3", -] - -[[package]] -name = "thread_local" -version = "1.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad99c4c6d32803332c548b1af0540b357b3f5fc0be8f6c6bfe8b2e6ae784070" -dependencies = [ - "cfg-if", + "syn", ] [[package]] name = "time" -version = "0.3.55" +version = "0.3.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb87b95ec50ddfa440816d227a17b2ccbdda963a316a727fda0fc4334f7d134" +checksum = "85c17d80feb7334b40c484e45ed1a5273dfd8bfda537c3be2e74a06a6686f327" dependencies = [ "deranged", "num-conv", @@ -3019,9 +2831,9 @@ checksum = "9e1c906769ad99c88eaa54e728060edef082f8e358ff32030cb7c7d315e81109" [[package]] name = "tinystr" -version = "0.8.4" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1e27c91459209c2986af3dcf603a5a74a4368754ce37414f59acc971167f643" +checksum = "c8323304221c2a851516f22236c5722a72eaa19749016521d6dff0824447d96d" dependencies = [ "displaydoc", "zerovec", @@ -3029,9 +2841,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.12.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb4ebadaa0af04fab11ae01eb5f9fdb5f9c5b875506e210e71c07873528baa7f" +checksum = "3e61e67053d25a4e82c844e8424039d9745781b3fc4f32b8d55ed50f5f667ef3" dependencies = [ "tinyvec_macros", ] @@ -3062,7 +2874,7 @@ dependencies = [ "monostate", "onig", "paste", - "rand 0.9.5", + "rand", "rayon", "rayon-cond", "regex", @@ -3070,7 +2882,7 @@ dependencies = [ "serde", "serde_json", "spm_precompiled", - "thiserror 2.0.20", + "thiserror 2.0.18", "unicode-normalization-alignments", "unicode-segmentation", "unicode_categories", @@ -3090,9 +2902,9 @@ dependencies = [ [[package]] name = "toml" -version = "1.1.4+spec-1.1.0" +version = "1.1.2+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3aace63f4bbcdfc2c965b059de67119c89c4017a70d633be6c104910f67056f5" +checksum = "81f3d15e84cbcd896376e6730314d59fb5a87f31e4b038454184435cd57defee" dependencies = [ "indexmap", "serde_core", @@ -3100,7 +2912,7 @@ dependencies = [ "toml_datetime 1.1.1+spec-1.1.0", "toml_parser", "toml_writer", - "winnow 1.0.4", + "winnow 1.0.3", ] [[package]] @@ -3137,23 +2949,23 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.25.13+spec-1.1.0" +version = "0.25.12+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6975367e4d2ef766d86af01ffad14b622fecc8d4357a998fbc4deb6e9bacaf9b" +checksum = "d2153edc6955a6c354fad8f5efd38b6a8769bdccf9fe50f8e1329f81b0baa5d7" dependencies = [ "indexmap", "toml_datetime 1.1.1+spec-1.1.0", "toml_parser", - "winnow 1.0.4", + "winnow 1.0.3", ] [[package]] name = "toml_parser" -version = "1.1.3+spec-1.1.0" +version = "1.1.2+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d38ac1cf9b95face32296c0a3ede1fdc270627c9d9c02a7274dd6d960dc4d56" +checksum = "a2abe9b86193656635d2411dc43050282ca48aa31c2451210f4202550afb7526" dependencies = [ - "winnow 1.0.4", + "winnow 1.0.3", ] [[package]] @@ -3164,9 +2976,9 @@ checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" [[package]] name = "toml_writer" -version = "1.1.2+spec-1.1.0" +version = "1.1.1+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d56353a2a665ad0f41a421187180aab746c8c325620617ad883a99a1cbe66d2" +checksum = "756daf9b1013ebe47a8776667b466417e2d4c5679d441c26230efd9ef78692db" [[package]] name = "tracing" @@ -3175,21 +2987,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" dependencies = [ "pin-project-lite", - "tracing-attributes", "tracing-core", ] -[[package]] -name = "tracing-attributes" -version = "0.1.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.119", -] - [[package]] name = "tracing-core" version = "0.1.36" @@ -3197,36 +2997,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" dependencies = [ "once_cell", - "valuable", -] - -[[package]] -name = "tracing-log" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" -dependencies = [ - "log", - "once_cell", - "tracing-core", -] - -[[package]] -name = "tracing-subscriber" -version = "0.3.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7f578e5945fb242538965c2d0b04418d38ec25c79d160cd279bf0731c8d319" -dependencies = [ - "matchers", - "nu-ansi-term", - "once_cell", - "regex-automata", - "sharded-slab", - "smallvec", - "thread_local", - "tracing", - "tracing-core", - "tracing-log", ] [[package]] @@ -3328,19 +3098,17 @@ dependencies = [ "once_cell", "rustls", "rustls-pki-types", - "serde", - "serde_json", "url", "webpki-roots 0.26.11", ] [[package]] name = "ureq" -version = "3.4.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "972d7902c8735f2695410b8aed7df6ed12a47394aa1c8d7af49f0497b731a94d" +checksum = "dea7109cdcd5864d4eeb1b58a1648dc9bf520360d7af16ec26d0a9354bafcfc0" dependencies = [ - "base64 0.23.1", + "base64 0.22.1", "der", "log", "native-tls", @@ -3354,11 +3122,11 @@ dependencies = [ [[package]] name = "ureq-proto" -version = "0.6.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da5f78b09e6941e1a0f2e30e695e4b120377b54d5e0aec11b594bb57b3971613" +checksum = "e994ba84b0bd1b1b0cf92878b7ef898a5c1760108fe7b6010327e274917a808c" dependencies = [ - "base64 0.23.1", + "base64 0.22.1", "http", "httparse", "log", @@ -3378,9 +3146,9 @@ dependencies = [ [[package]] name = "usearch" -version = "2.26.0" +version = "2.25.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd7f672d20412962c457b11c858c6c5aecb949808a5345a95e1d671112bcf72" +checksum = "5c08f764417012cf6aea6d1380ef9ea8712c5795a938b726fc67b9bf7ea8824b" dependencies = [ "cxx", "cxx-build", @@ -3399,18 +3167,6 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" -[[package]] -name = "utf8parse" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" - -[[package]] -name = "valuable" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" - [[package]] name = "vcpkg" version = "0.2.15" @@ -3456,9 +3212,9 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.127" +version = "0.2.125" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b70935747edd64d89de3efa29d73789b806c15798f8e7dca4d8ac356b50ce70" +checksum = "8ddb3f79143bced6de84270411622a2699cee572fc0875aeaf1e7867cf9fca1a" dependencies = [ "cfg-if", "once_cell", @@ -3469,9 +3225,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.127" +version = "0.2.125" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77775f8f3f7217702089053b94958f8f54061a3f663417df76e19cbdcca29bc1" +checksum = "4e21a184b13fb19e157296e2c46056aec9092264fab83e4ba59e68c61b323c3d" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3479,22 +3235,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.127" +version = "0.2.125" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e11d33f857dc2fb11b8bc75aee111aa9cbeb12cd9f25efd3d4c2a3dd4e235284" +checksum = "fecefd9c35bd935a20fc3fc344b5f29138961e4f47fb03297d88f2587afb5ebd" dependencies = [ "bumpalo", "proc-macro2", "quote", - "syn 2.0.119", + "syn", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.127" +version = "0.2.125" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef64dbcc55df09c7e5a46182d181c2cfa3e925f3da937ea764728b4bbb9dcbf" +checksum = "23939e44bb9a5d7576fa2b563dc2e136628f1224e88a8deed09e04858b77871f" dependencies = [ "unicode-ident", ] @@ -3511,9 +3267,9 @@ dependencies = [ [[package]] name = "webpki-root-certs" -version = "1.0.9" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b96554aa2acc8ccdb7e1c9a58a7a68dd5d13bccc69cd124cb09406db612a1c9b" +checksum = "0d46a5a140e6f7afeccd8eae97eff335163939eac8b929834875168b29b3d267" dependencies = [ "rustls-pki-types", ] @@ -3524,14 +3280,14 @@ version = "0.26.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "521bc38abb08001b01866da9f51eb7c5d647a19260e00054a8c7fd5f9e57f7a9" dependencies = [ - "webpki-roots 1.0.9", + "webpki-roots 1.0.8", ] [[package]] name = "webpki-roots" -version = "1.0.9" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dcd9d09a39985f5344844e66b0c530a33843579125f23e21e9f0f220850f22a" +checksum = "bf85cb06032201fa7c6f829d7db5a7e5aa45bcc0655327713065f6f0576731bf" dependencies = [ "rustls-pki-types", ] @@ -3738,9 +3494,9 @@ dependencies = [ [[package]] name = "winnow" -version = "1.0.4" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b97319f7b8343df12cc98938e5c3eb436064524c8d2b4e30a1d3a36eecdf81" +checksum = "0592e1c9d151f854e6fd382574c3a0855250e1d9b2f99d9281c6e6391af352f1" dependencies = [ "memchr", ] @@ -3753,15 +3509,15 @@ checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" [[package]] name = "writeable" -version = "0.6.4" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ad82d2a33cdc9674dc7465672f271e096168fcdbe0f799d9e6db8c5892679dc" +checksum = "1ffae5123b2d3fc086436f8834ae3ab053a283cfac8fe0a0b8eaae044768a4c4" [[package]] name = "xml-rs" -version = "0.8.29" +version = "0.8.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e450f9b2ed1dff33c94c12589a87338689467b9c4f5d8a5710bd09a847d2c8a7" +checksum = "3ae8337f8a065cfc972643663ea4279e04e7256de865aa66fe25cec5fb912d3f" [[package]] name = "xz2" @@ -3791,28 +3547,28 @@ checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn", "synstructure", ] [[package]] name = "zerocopy" -version = "0.8.56" +version = "0.8.52" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "556764e583adb45a9f8d413c2a147fa7e8d821e48e12b14fd560b607998b75eb" +checksum = "ce1022995ff5ff5d841ad7d994facc23098cd40152f2c1d11cd607c6f530653f" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.56" +version = "0.8.52" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2ab42fc20575779bd240faa45f94a74256f755c0fa9e89f0ede20d91d0cdfc1" +checksum = "1ae7f38b72ec2a254e2b87ef277cf2cd4fb97cbebf944faa6f33354da0867930" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn", ] [[package]] @@ -3832,7 +3588,7 @@ checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn", "synstructure", ] @@ -3853,14 +3609,14 @@ checksum = "3c50655cbb0fe3fc43170059e702f1ce5e19b84cec58dc87b037a09935c2f328" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn", ] [[package]] name = "zerotrie" -version = "0.2.5" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ea269c3bd32f0a32c321907a2ae912ba6f4649bb0fc764a15627e99a7095a3f" +checksum = "0f9152d31db0792fa83f70fb2f83148effb5c1f5b8c7686c3459e361d9bc20bf" dependencies = [ "displaydoc", "yoke", @@ -3869,9 +3625,9 @@ dependencies = [ [[package]] name = "zerovec" -version = "0.11.7" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94b5c6b5976d66c1d703c4fd17d3f5e43c8cedaacf604961b171adc7130896d8" +checksum = "90f911cbc359ab6af17377d242225f4d75119aec87ea711a880987b18cd7b239" dependencies = [ "yoke", "zerofrom", @@ -3880,13 +3636,13 @@ dependencies = [ [[package]] name = "zerovec-derive" -version = "0.11.4" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47402523226a02bfe5230160dc3ccc089aa6f6f19e7fcbb4e6f824bbb1b4aa62" +checksum = "625dc425cab0dca6dc3c3319506e6593dcb08a9f387ea3b284dbd52a92c40555" dependencies = [ "proc-macro2", "quote", - "syn 3.0.3", + "syn", ] [[package]] @@ -3911,7 +3667,7 @@ dependencies = [ "memchr", "pbkdf2", "sha1", - "thiserror 2.0.20", + "thiserror 2.0.18", "time", "xz2", "zeroize", @@ -3921,9 +3677,9 @@ dependencies = [ [[package]] name = "zmij" -version = "1.0.23" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b" +checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" [[package]] name = "zopfli" diff --git a/DESIGN.md b/DESIGN.md index 85d7e6b..ce706f3 100644 --- a/DESIGN.md +++ b/DESIGN.md @@ -80,9 +80,3 @@ Start from `breadbox/breadbox/src/main.rs`. **Reuse verbatim:** the gtk4-layer-s - nomic prefixes + mean-pool + normalize must match between index and query or recall collapses. - `ort` linking: prefer the crate's downloaded/bundled ONNX Runtime to avoid version skew with Arch's `onnxruntime`. - Office formats (docx/odt) are best-effort in v1; md/txt/org/pdf are the reliable path. -- GPU EPs (ROCm/CUDA/OpenVINO) fail to register silently at the ONNX Runtime level and fall back to CPU — always - check startup logs for `Successfully registered` before trusting a GPU build is actually accelerating. See - [README: GPU backend notes](README.md#gpu-backend-notes) for the MIGraphX-vs-ROCMExecutionProvider distinction - and the per-shape JIT-compile-and-cache behavior that matters for interactive query latency. -- CUDA and OpenVINO are compile-checked only — no NVIDIA or Intel GPU hardware in this dev environment (AMD-only) - to runtime-verify against, unlike ROCm which was confirmed end-to-end on real hardware. diff --git a/EVENTS.md b/EVENTS.md deleted file mode 100644 index 61f5030..0000000 --- a/EVENTS.md +++ /dev/null @@ -1,62 +0,0 @@ -# breadsearch — bread event integration - -breadsearch is a standalone document-search overlay: it works exactly the -same with or without `breadd` running. When breadd *is* present, the -`breadsearch` GTK overlay publishes events into the shared bread automation -fabric. See the parent `bread` repo's `Documentation.md` — specifically its -"Namespaces" and "Integrating a bread\* app" sections — for the general -convention this follows. - -App id: **`search`**. Transport: `bread-utils`'s `bread_client` module -(feature `bread-client`) — the overlay links it directly. Each `emit` is -its own short-lived connection (`BreadClient::emit` is fire-and-forget, -the same stance as `bread-emit`). Command verbs are only received while -`breadsearch listen` is running — that process holds the -`bread.command.search.**` subscription open. breadmill, the indexing -daemon, does not talk to breadd. - -## Events published (`bread.search.*`) - -| Event | Data | When | -|-------|------|------| -| `bread.search.opened` | `{}` | The overlay window maps (the search panel is shown). | -| `bread.search.opened_result` | `{ "path": "" }` | The user opens a hit — Enter / click opens the file, Ctrl+Enter reveals its folder. `path` is the hit's document path, not the parent folder. | -| `bread.search.open.done` | `{}` | `bread.command.search.open` was received and `breadsearch` was spawned. This is the command confirmation, not proof the overlay mapped — the spawned process is the same PID-file toggle as a keybind. | -| `bread.search.open.failed` | `{ "error": "" }` | `bread.command.search.open` was received but this binary could not be started. | - -## Commands honored (`bread.command.search.*`) - -These are only received while `breadsearch listen` is running. Publishing a -command with no subscriber is a silent no-op — that is the documented -bread convention, not a breadsearch bug. - -| Verb | Data | Effect | -|------|------|--------| -| `open` | none | Same as running `breadsearch` (PID-file toggle: show the overlay, or dismiss it if it is already up). Emits `bread.search.open.done` / `.failed`. | - -```lua -bread.spawn(function() - bread.emit("bread.command.search.open") - bread.wait("bread.search.open.done", { timeout = 5000 }) -end) -``` - -### Not implemented: extra verbs - -There is no `query` / `close` / `reindex` command verb. breadmill already -has its own query socket; inventing a bus query plane would be a new -product surface. If/when that exists, add the corresponding -`bread.command.search.*` verb at the same time, not stubbed as a no-op -ahead of it. - -## Fail-safe behavior - -- If breadd isn't installed or isn't running, `emit` is a silent no-op - (`BreadClient::emit` never blocks or errors the caller) and the - command subscription simply never receives anything — breadsearch's - overlay and breadmill's indexing/query path are entirely unaffected. -- If breadd restarts, the command subscription reconnects automatically - (`BreadClient::subscribe`'s background thread has its own backoff - loop); no restart of `breadsearch listen` is needed. -- If `breadsearch listen` is not running, commands are a graceful no-op at - the bus (no subscriber). The overlay CLI still works. diff --git a/README.md b/README.md index 71663ce..19d1fee 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,6 @@ Semantic document search for Bread OS. Type a concept — not a keyword — and get ranked hits from your documents. -This is **not** [breadbox](https://git.breadway.dev/Breadway/breadbox). breadsearch is document/meaning search over your files; breadbox is the app launcher (fuzzy `.desktop` launch). They are separate overlays with separate binaries, sockets, and keybinds — even though the search panel was originally forked from breadbox's launcher UI. - Two binaries in one Cargo workspace: - **breadmill** — background daemon. Walks configured directories, extracts text, chunks and embeds documents with [nomic-embed-text-v1.5](https://huggingface.co/nomic-ai/nomic-embed-text-v1.5) (768-dim ONNX), stores vectors in an HNSW index (usearch) backed by SQLite metadata, and serves queries over a Unix socket. Watches for filesystem changes and re-indexes incrementally. @@ -23,46 +21,14 @@ Optional features: | Feature | What it adds | |---------|-------------| -| `npu` | AMD XDNA NPU via VitisAI ONNX Runtime EP (requires Ryzen AI SDK) | -| `rocm` | AMD iGPU via the MIGraphX ONNX Runtime EP (ROCm-backed) | -| `cuda` | NVIDIA GPU via the CUDA ONNX Runtime EP | -| `openvino` | Intel iGPU/dGPU (Arc) via the OpenVINO ONNX Runtime EP | -| `full` | All four of the above in one binary | +| `npu` | AMD XDNA NPU via VitisAI ONNX Runtime EP (requires Ryzen AI SDK) | +| `rocm` | AMD iGPU via ROCm ONNX Runtime EP | ``` # NPU build cargo build --release -p breadmill --features npu - -# ROCm (AMD iGPU/dGPU) build -cargo build --release -p breadmill --features rocm - -# CUDA (NVIDIA GPU) build -cargo build --release -p breadmill --features cuda - -# OpenVINO (Intel iGPU/dGPU) build -cargo build --release -p breadmill --features openvino - -# All backends in one binary (what the release build ships) -cargo build --release -p breadmill --features full ``` -`rocm`/`cuda`/`npu`/`openvino` all use `ort`'s `load-dynamic` mode: at runtime, -breadmill dlopens whatever `libonnxruntime.so` the dynamic linker resolves (or -`ORT_DYLIB_PATH` if set). GPU acceleration only works if that ONNX Runtime -build actually has the matching execution provider compiled in — breadmill -logs a clear `Successfully registered` / `not enabled in this build` line for -this at startup (see [GPU backend notes](#gpu-backend-notes) below). - -Because all four are dlopen-based, `full` doesn't require the NPU/ROCm/CUDA/ -OpenVINO toolkits to be installed at build time — only at run time, and only -for whichever single backend you actually select via -`--npu`/`--rocm`/`--cuda`/`--openvino` or `backend` in config.toml. The -**released binaries are built with `full`**: same binary works CPU-only out -of the box, and picks up NPU/ROCm/CUDA/OpenVINO acceleration on a machine -that has the matching ONNX Runtime available, without needing a different -download. An explicit `--npu`/`--rocm`/`--cuda`/`--openvino` flag always -overrides `backend` in config.toml, not the other way around. - ## Setup **1. Fetch the embedding model** (~550 MB, downloaded once from Hugging Face): @@ -123,8 +89,6 @@ breadmill status # Backend flags (requires the matching Cargo feature) breadmill --npu breadmill --rocm -breadmill --cuda -breadmill --openvino ``` ## Config @@ -145,7 +109,7 @@ snippet_len = 200 # max characters in result snippet [model] name = "nomic-embed-text-v1.5" dim = 768 -backend = "cpu" # "cpu", "npu", "rocm", "cuda", or "openvino" +backend = "cpu" # "cpu", "npu", or "rocm" ``` `roots` and `excludes` support `~/` expansion. The index respects `.gitignore` files found during the walk. @@ -160,50 +124,6 @@ Set `backend = "npu"` in config (or pass `--npu`) when running a build compiled 4. `/etc/vaip_config.json` 5. `/opt/xilinx/vaip_config.json` -### GPU backend notes - -`rocm`, `cuda`, and `openvino` all need a system ONNX Runtime that was -actually built with the matching execution provider — the crate's own -downloaded binary is CPU-only. Point `ORT_DYLIB_PATH` at one, or install a -distro package that provides `libonnxruntime.so` with the EP baked in and -let the dynamic linker find it. - -**ROCm (`--rocm` / `backend = "rocm"`)** targets ONNX Runtime's **MIGraphX** -execution provider, not the classic `ROCMExecutionProvider`. Distro -ROCm-enabled ONNX Runtime packages (e.g. Arch's `onnxruntime-rocm`) are -commonly built with `--use_migraphx` rather than `--use_rocm`, so this is the -EP that's actually available in practice; the classic ROCm EP needs a bespoke -`--use_rocm` build most distros don't package. Startup logs a -`Successfully registered `MIGraphXExecutionProvider`` line when it's really -active — check for it if in doubt, since a failed GPU EP registration falls -back to CPU silently at the ONNX Runtime level (breadmill's own log line is -only a statement of intent, not a confirmation). - -MIGraphX JIT-compiles the model per distinct input sequence length and caches -the compiled kernel to disk (each compile takes ~60–120s and produces a -~500MB `.mxr` file). Set `ORT_MIGRAPHX_MODEL_CACHE_PATH=/path/to/cache` so -that cost is paid once per shape instead of on every daemon restart. Because -query text length varies, expect an occasional multi-second stall the first -time a new token length is seen — fine for background document indexing, -noticeable for interactive query embedding. - -**CUDA (`--cuda` / `backend = "cuda"`)** targets the standard -`CUDAExecutionProvider` and needs a CUDA-enabled ONNX Runtime + a working -CUDA/cuDNN install. Unverified on real NVIDIA hardware in this repo — only -compile-checked, since development happened on an AMD-only machine. - -**OpenVINO (`--openvino` / `backend = "openvino"`)** targets -`OpenVINOExecutionProvider` with `device_type = "GPU"`, covering both Intel -iGPUs and Arc dGPUs through the same EP (OpenVINO abstracts Intel's whole -hardware line — CPU/GPU/NPU — behind one provider and a device-type string). -Needs an OpenVINO-enabled ONNX Runtime and the OpenVINO runtime itself -installed. Its options go through a generic key/value FFI interface rather -than a fixed C struct (unlike MIGraphX's `OrtMIGraphXProviderOptions`), so it -should be less exposed to the kind of ABI-version-skew crash MIGraphX hit — -but that's inference from reading the EP's design, not something verified -against real Intel GPU hardware. Also unverified on real hardware in this -repo — only compile-checked, for the same reason as CUDA. - ## Runtime paths | Purpose | Path | diff --git a/breadmill/Cargo.toml b/breadmill/Cargo.toml index c57023e..91b4096 100644 --- a/breadmill/Cargo.toml +++ b/breadmill/Cargo.toml @@ -1,30 +1,13 @@ [package] name = "breadmill" -version = "0.3.3" +version = "0.1.0" edition = "2021" license = "MIT" [features] default = [] npu = ["ort/vitis", "ort/load-dynamic"] -# "rocm" targets the MIGraphX execution provider, not ONNX Runtime's classic -# ROCMExecutionProvider (--use_rocm build). Distro ROCm-enabled ONNX Runtime -# packages (e.g. Arch's onnxruntime-rocm) are commonly built with --use_migraphx -# instead; the classic ROCm EP needs a bespoke --use_rocm build that ships -# libonnxruntime_providers_rocm.so, which most distros don't package. -rocm = ["ort/migraphx", "ort/load-dynamic"] -cuda = ["ort/cuda", "ort/load-dynamic"] -# Intel iGPU/dGPU (Arc) + CPU via OpenVINO. One EP covers Intel's whole -# hardware line by device_type string ("CPU"/"GPU"/"GPU.0"/"NPU"/"HETERO:..."); -# we always request "GPU" since CPU is already covered by the cpu backend. -openvino = ["ort/openvino", "ort/load-dynamic"] -# All backends in one binary. Safe to combine: every backend here uses -# ort's load-dynamic (dlopen) mode, so none of this links against an actual -# NPU/ROCm/CUDA/OpenVINO toolkit at build time — which ONNX Runtime actually -# gets loaded (and thus which EPs are really available) is decided at -# runtime by ORT_DYLIB_PATH / the dynamic linker, per the --npu/--rocm/ -# --cuda/--openvino flag or `backend` config value in use for that run. -full = ["npu", "rocm", "cuda", "openvino"] +rocm = ["ort/rocm", "ort/load-dynamic"] [[bin]] name = "breadmill" @@ -42,11 +25,6 @@ breadsearch-shared = { path = "../breadsearch-shared" } # needed for the plain CPU path even in the npu build. ort = { version = "2.0.0-rc.12", default-features = false, features = ["std", "tracing", "download-binaries", "tls-native", "copy-dylibs", "api-23"] } tokenizers = "0" -bread-onnx = { git = "https://git.breadway.dev/Breadway/bread-ecosystem", tag = "v0.7.2" } - -# Surfaces ort's own EP-registration tracing (e.g. a GPU EP silently failing to -# register and falling back to CPU) as visible log output instead of nowhere. -tracing-subscriber = { version = "0.3", features = ["env-filter"] } # Vector index usearch = "2" diff --git a/breadmill/src/chunk.rs b/breadmill/src/chunk.rs index 7468f89..dcddca8 100644 --- a/breadmill/src/chunk.rs +++ b/breadmill/src/chunk.rs @@ -81,9 +81,10 @@ fn split_by_chars(chunk: Chunk, max_chars: usize) -> Vec { let text = &chunk.text; let mut result = Vec::new(); let mut seg_start = 0usize; + let mut count = 0usize; - for (count, (byte_idx, _)) in text.char_indices().enumerate() { - if count > 0 && count.is_multiple_of(max_chars) { + for (byte_idx, _) in text.char_indices() { + if count > 0 && count % max_chars == 0 { result.push(Chunk { text: text[seg_start..byte_idx].to_string(), start: chunk.start + seg_start, @@ -91,6 +92,7 @@ fn split_by_chars(chunk: Chunk, max_chars: usize) -> Vec { }); seg_start = byte_idx; } + count += 1; } if seg_start < text.len() { result.push(Chunk { diff --git a/breadmill/src/embed.rs b/breadmill/src/embed.rs index d507951..9287518 100644 --- a/breadmill/src/embed.rs +++ b/breadmill/src/embed.rs @@ -1,7 +1,10 @@ use std::path::{Path, PathBuf}; -use bread_onnx::embedding::EmbeddingSession; -use bread_onnx::Provider; +use ort::{ + session::{Session, builder::{GraphOptimizationLevel, SessionBuilder}}, + value::Tensor, +}; +use tokenizers::Tokenizer; const DOCUMENT_PREFIX: &str = "search_document: "; const QUERY_PREFIX: &str = "search_query: "; @@ -16,31 +19,28 @@ pub enum Backend { /// AMD XDNA NPU via the VitisAI ONNX Runtime execution provider. /// `cache_dir` is used to store the compiled NPU model between runs. Npu { cache_dir: PathBuf }, - /// AMD iGPU via the MIGraphX ONNX Runtime execution provider (ROCm-backed). - /// Distro ROCm ONNX Runtime builds (e.g. Arch's onnxruntime-rocm) are - /// commonly compiled with `--use_migraphx`, not `--use_rocm`, so this - /// targets `MIGraphXExecutionProvider` rather than the classic - /// `ROCMExecutionProvider`. + /// AMD iGPU via the ROCm ONNX Runtime execution provider. Rocm, - /// NVIDIA GPU via the CUDA ONNX Runtime execution provider. - Cuda, - /// Intel iGPU/dGPU (Arc) via the OpenVINO ONNX Runtime execution - /// provider, requesting device_type "GPU". `cache_dir` stores OpenVINO's - /// compiled-model blobs between runs (its own `with_cache_dir`, not an - /// env var — unlike MIGraphX this doesn't need a workaround). - OpenVino { cache_dir: PathBuf }, } pub struct OrtEmbedder { - inner: EmbeddingSession, + session: Session, + tokenizer: Tokenizer, + dim: usize, } impl OrtEmbedder { pub fn load(model_path: &Path, tokenizer_path: &Path, dim: usize, backend: Backend) -> Result { - let provider = to_provider(backend)?; - let inner = EmbeddingSession::load(model_path, tokenizer_path, dim, MAX_SEQ_LEN, &[provider]) + let builder = Session::builder() + .map_err(|e| e.to_string())? + .with_optimization_level(GraphOptimizationLevel::All) .map_err(|e| e.to_string())?; - Ok(Self { inner }) + + let mut builder = configure_eps(builder, &backend)?; + let session = builder.commit_from_file(model_path).map_err(|e| e.to_string())?; + let tokenizer = Tokenizer::from_file(tokenizer_path).map_err(|e| e.to_string())?; + + Ok(Self { session, tokenizer, dim }) } pub fn embed_document(&mut self, text: &str) -> Result, String> { @@ -53,71 +53,165 @@ impl OrtEmbedder { fn embed_with_prefix(&mut self, text: &str, prefix: &str) -> Result, String> { let input = format!("{}{}", prefix, text); - self.inner.embed(&input).map_err(|e| e.to_string()) + + let encoding = self + .tokenizer + .encode(input, true) + .map_err(|e| e.to_string())?; + + let mut ids: Vec = encoding.get_ids().iter().map(|&x| x as i64).collect(); + let mut mask: Vec = encoding + .get_attention_mask() + .iter() + .map(|&x| x as i64) + .collect(); + let mut type_ids: Vec = encoding + .get_type_ids() + .iter() + .map(|&x| x as i64) + .collect(); + + if ids.len() > MAX_SEQ_LEN { + eprintln!( + "breadmill: truncating {} tokens to {} (chunk too large)", + ids.len(), + MAX_SEQ_LEN + ); + ids.truncate(MAX_SEQ_LEN); + mask.truncate(MAX_SEQ_LEN); + type_ids.truncate(MAX_SEQ_LEN); + } + + let seq_len = ids.len() as i64; + + let id_tensor = + Tensor::::from_array((vec![1i64, seq_len], ids.clone())).map_err(|e| e.to_string())?; + let mask_tensor = + Tensor::::from_array((vec![1i64, seq_len], mask.clone())).map_err(|e| e.to_string())?; + let type_tensor = + Tensor::::from_array((vec![1i64, seq_len], type_ids)).map_err(|e| e.to_string())?; + + let outputs = self + .session + .run(ort::inputs! { + "input_ids" => id_tensor, + "attention_mask" => mask_tensor, + "token_type_ids" => type_tensor, + }) + .map_err(|e| e.to_string())?; + + // last_hidden_state: shape [1, seq_len, dim] + let (shape, data) = outputs["last_hidden_state"] + .try_extract_tensor::() + .map_err(|e| e.to_string())?; + + let actual_seq = shape[1] as usize; + let actual_dim = shape[2] as usize; + + // Mean-pool over non-padding positions + let mut result = vec![0.0f32; actual_dim]; + let mut count = 0usize; + + for t in 0..actual_seq { + if mask[t] > 0 { + for d in 0..actual_dim { + result[d] += data[t * actual_dim + d]; + } + count += 1; + } + } + + if count > 0 { + for x in &mut result { + *x /= count as f32; + } + } + + l2_normalize(&mut result); + + // Clamp/pad to configured dim + result.truncate(self.dim); + while result.len() < self.dim { + result.push(0.0); + } + + Ok(result) } } -// ---- Backend -> bread_onnx::Provider ---------------------------------------- -// -// `bread_onnx::session::build_session` (via `EmbeddingSession::load`) is the -// shared session-builder + EP-fallback + loud-logging code every EP branch -// below used to hand-roll separately (`configure_eps`/`npu_session`/ -// `rocm_session`/`cuda_session`/`openvino_session`). What's genuinely -// specific to this crate — its cargo feature gates (npu/rocm/cuda/openvino), -// and NPU's `vaip_config.json` discovery — stays here. +fn l2_normalize(v: &mut Vec) { + let norm: f32 = v.iter().map(|x| x * x).sum::().sqrt(); + if norm > 1e-10 { + for x in v.iter_mut() { + *x /= norm; + } + } +} -fn to_provider(backend: Backend) -> Result { +// ---- Execution provider selection ------------------------------------------- + +fn configure_eps(builder: SessionBuilder, backend: &Backend) -> Result { match backend { - Backend::Cpu => Ok(Provider::Cpu), - Backend::Npu { cache_dir } => npu_provider(cache_dir), - Backend::Rocm => rocm_provider(), - Backend::Cuda => cuda_provider(), - Backend::OpenVino { cache_dir } => Ok(Provider::OpenVino { device_type: "GPU".to_string(), cache_dir }), + Backend::Cpu => Ok(builder), + Backend::Npu { cache_dir } => npu_session(builder, cache_dir), + Backend::Rocm => rocm_session(builder), } } #[cfg(feature = "npu")] -fn npu_provider(cache_dir: PathBuf) -> Result { - let vaip_config = find_vaip_config()?; +fn npu_session(builder: SessionBuilder, cache_dir: &Path) -> Result { + let vitis_ep = build_vitis_ep(cache_dir)?; + eprintln!("breadmill: using NPU (VitisAI) execution provider"); if std::env::var("ORT_DYLIB_PATH").is_err() { eprintln!( "breadmill: hint — set ORT_DYLIB_PATH to the Ryzen AI SDK ORT, e.g.:\n \ ORT_DYLIB_PATH=~/.local/share/ryzen-ai-1.7.1/lib/libonnxruntime.so" ); } - Ok(Provider::Vitis { - config_file: vaip_config, - cache_dir: cache_dir.join("npu"), - cache_key: "nomic-embed-text-v1.5".to_string(), - }) + builder + .with_execution_providers([vitis_ep, ort::ep::CPU::default().build()]) + .map_err(|e| e.to_string()) } #[cfg(not(feature = "npu"))] -fn npu_provider(_cache_dir: PathBuf) -> Result { +fn npu_session(builder: SessionBuilder, _cache_dir: &Path) -> Result { eprintln!("breadmill: NPU backend requested but not compiled in (rebuild with --features npu); using CPU"); - Ok(Provider::Cpu) + Ok(builder) } +// ---- VitisAI EP (NPU) ------------------------------------------------------- + +#[cfg(feature = "npu")] +fn build_vitis_ep(cache_dir: &Path) -> Result { + let vaip_config = find_vaip_config()?; + let npu_cache = cache_dir.join("npu"); + std::fs::create_dir_all(&npu_cache).map_err(|e| e.to_string())?; + eprintln!("breadmill: vaip_config: {}", vaip_config.display()); + eprintln!("breadmill: NPU model cache: {}", npu_cache.display()); + Ok(ort::ep::Vitis::default() + .with_config_file(vaip_config.to_string_lossy()) + .with_cache_dir(npu_cache.to_string_lossy()) + .with_cache_key("nomic-embed-text-v1.5") + .build()) +} + +// ---- ROCm EP (AMD iGPU) ----------------------------------------------------- + #[cfg(feature = "rocm")] -fn rocm_provider() -> Result { - Ok(Provider::MiGraphX { device_id: 0 }) +fn rocm_session(builder: SessionBuilder) -> Result { + eprintln!("breadmill: using ROCm execution provider (device 0)"); + builder + .with_execution_providers([ + ort::execution_providers::ROCmExecutionProvider::default().build(), + ort::ep::CPU::default().build(), + ]) + .map_err(|e| e.to_string()) } #[cfg(not(feature = "rocm"))] -fn rocm_provider() -> Result { +fn rocm_session(builder: SessionBuilder) -> Result { eprintln!("breadmill: ROCm backend requested but not compiled in (rebuild with --features rocm); using CPU"); - Ok(Provider::Cpu) -} - -#[cfg(feature = "cuda")] -fn cuda_provider() -> Result { - Ok(Provider::Cuda { device_id: 0 }) -} - -#[cfg(not(feature = "cuda"))] -fn cuda_provider() -> Result { - eprintln!("breadmill: CUDA backend requested but not compiled in (rebuild with --features cuda); using CPU"); - Ok(Provider::Cpu) + Ok(builder) } /// Locate the VitisAI EP config file required by the AMD Ryzen AI SDK. diff --git a/breadmill/src/indexer.rs b/breadmill/src/indexer.rs index 67c7694..3ad20b5 100644 --- a/breadmill/src/indexer.rs +++ b/breadmill/src/indexer.rs @@ -10,7 +10,7 @@ use ignore::WalkBuilder; use notify::{RecommendedWatcher, RecursiveMode, Watcher, EventKind}; use sha2::{Digest, Sha256}; -use crate::{embed::OrtEmbedder, extract, chunk, power, store::Store, sync_ext::MutexExt}; +use crate::{embed::OrtEmbedder, extract, chunk, power, store::Store}; pub struct SharedState { pub store: Mutex, @@ -64,7 +64,7 @@ impl Indexer { pub fn full_reindex(&self) { eprintln!("breadmill: full reindex triggered"); { - let store = self.state.store.lock_recover(); + let mut store = self.state.store.lock().unwrap(); // Clear all state let _ = store.conn.execute_batch("DELETE FROM chunks; DELETE FROM files;"); let _ = store.index.reserve(4096); @@ -87,7 +87,7 @@ impl Indexer { // Snapshot existing indexed files let known: HashMap = { - let store = self.state.store.lock_recover(); + let store = self.state.store.lock().unwrap(); store.all_files() .unwrap_or_default() .into_iter() @@ -155,7 +155,7 @@ impl Indexer { .collect(); if !to_delete.is_empty() { - let mut store = self.state.store.lock_recover(); + let mut store = self.state.store.lock().unwrap(); for path in to_delete { eprintln!("breadmill: removing deleted file: {}", path); let _ = store.delete_file(&path); @@ -163,7 +163,7 @@ impl Indexer { } let count = { - let store = self.state.store.lock_recover(); + let store = self.state.store.lock().unwrap(); let n = store.chunk_count(); let _ = store.save_index(&self.state_dir); n @@ -238,7 +238,7 @@ impl Indexer { self.handle_fs_event(&path); } let count = { - let store = self.state.store.lock_recover(); + let store = self.state.store.lock().unwrap(); let n = store.chunk_count(); let _ = store.save_index(&self.state_dir); n @@ -261,7 +261,7 @@ impl Indexer { if !path.is_file() { let path_str = path.to_string_lossy().into_owned(); // File deleted — remove from index - let mut store = self.state.store.lock_recover(); + let mut store = self.state.store.lock().unwrap(); let _ = store.delete_file(&path_str); return; } @@ -309,7 +309,7 @@ impl Indexer { // Check if hash changed (catches content changes without mtime change) { - let store = self.state.store.lock_recover(); + let store = self.state.store.lock().unwrap(); if let Ok(files) = store.all_files() { if files.iter().any(|f| f.path == path_str && f.hash == hash) { return; @@ -322,22 +322,20 @@ impl Indexer { // for natural-language files. let chunks = chunk::chunk_text(&text, 400, 80, 2_000); eprintln!("breadmill: embedding {} ({} chars, {} chunks)", path_str, text.len(), chunks.len()); + let mut embedder_guard = self.state.embedder.lock().unwrap(); if !self.state.model_ready.load(Ordering::Relaxed) { eprintln!("breadmill: model not ready, skipping embed for {}", path_str); return; } - // Confirm the embedder is actually present before committing to - // clearing this file's old chunks below — same check as before, - // just without holding the embedder lock past this one glance (see - // the per-chunk locking in the loop for why). - if self.state.embedder.lock_recover().is_none() { - return; - } + let embedder = match embedder_guard.as_mut() { + Some(e) => e, + None => return, + }; { - let mut store = self.state.store.lock_recover(); + let mut store = self.state.store.lock().unwrap(); let _ = store.delete_file(path_str); // remove old chunks/vectors first } @@ -346,18 +344,9 @@ impl Indexer { for (i, chunk) in chunks.iter().enumerate() { eprintln!("breadmill: embed chunk {}/{} ({} chars) for {}", i + 1, chunks.len(), chunk.text.len(), path_str); - // Lock the embedder only around this single chunk's embed call — - // this used to be held for the whole file's chunk loop, so one - // large file needing a fresh MIGraphX JIT compile (60-120s for a - // new sequence length) could block every query (serve.rs locks - // this same mutex) for the entire file, not just one chunk. - let embed_result = match self.state.embedder.lock_recover().as_mut() { - Some(embedder) => embedder.embed_document(&chunk.text), - None => break, // model was unloaded mid-scan; stop here - }; - match embed_result { + match embedder.embed_document(&chunk.text) { Ok(embedding) => { - let mut store = self.state.store.lock_recover(); + let mut store = self.state.store.lock().unwrap(); // Ensure file row exists before inserting chunks (FK constraint) let _ = store.upsert_file(path_str, mtime, &hash); let _ = store.insert_chunk( @@ -378,7 +367,7 @@ impl Indexer { eprintln!("breadmill: no chunks embedded for {}", path_str); // Record the file so the mtime+hash check skips it on the next startup // rather than re-entering the same embed-fail loop. - let store = self.state.store.lock_recover(); + let store = self.state.store.lock().unwrap(); let _ = store.upsert_file(path_str, mtime, &hash); } else { // Increment live so `status` reflects progress before the full scan ends. @@ -416,9 +405,9 @@ fn sha256_str(bytes: &[u8]) -> String { } pub fn expand_home(path: &str) -> PathBuf { - if let Some(rest) = path.strip_prefix("~/") { + if path.starts_with("~/") { let home = std::env::var("HOME").unwrap_or_else(|_| "/tmp".into()); - PathBuf::from(home).join(rest) + PathBuf::from(home).join(&path[2..]) } else { PathBuf::from(path) } diff --git a/breadmill/src/main.rs b/breadmill/src/main.rs index 0b79eef..eb6c9b4 100644 --- a/breadmill/src/main.rs +++ b/breadmill/src/main.rs @@ -1,4 +1,5 @@ use std::{ + io::Read, path::{Path, PathBuf}, sync::{Arc, atomic::Ordering}, }; @@ -12,12 +13,10 @@ mod indexer; mod power; mod serve; mod store; -mod sync_ext; use embed::{Backend, OrtEmbedder}; use indexer::{Indexer, SharedState}; use store::Store; -use sync_ext::MutexExt; const MODEL_URL: &str = "https://huggingface.co/nomic-ai/nomic-embed-text-v1.5/resolve/main/onnx/model.onnx"; @@ -25,29 +24,17 @@ const TOKENIZER_URL: &str = "https://huggingface.co/nomic-ai/nomic-embed-text-v1.5/resolve/main/tokenizer.json"; fn main() { - // Surfaces ort's EP-registration warnings/errors (e.g. a GPU EP silently - // falling back to CPU) by default, without requiring RUST_LOG to be set. - tracing_subscriber::fmt() - .with_env_filter( - tracing_subscriber::EnvFilter::try_from_default_env() - .unwrap_or_else(|_| tracing_subscriber::EnvFilter::new("warn,ort=info")), - ) - .init(); - let raw_args: Vec = std::env::args().collect(); // Extract global flags before command dispatch. let use_npu = raw_args.iter().any(|a| a == "--npu"); let use_rocm = raw_args.iter().any(|a| a == "--rocm"); - let use_cuda = raw_args.iter().any(|a| a == "--cuda"); - let use_openvino = raw_args.iter().any(|a| a == "--openvino"); // Build a view of argv without backend flags for command matching. - let backend_flags = ["--npu", "--rocm", "--cuda", "--openvino"]; let args: Vec<&str> = raw_args .iter() .skip(1) - .filter(|a| !backend_flags.contains(&a.as_str())) + .filter(|a| a.as_str() != "--npu" && a.as_str() != "--rocm") .map(|s| s.as_str()) .collect(); @@ -62,7 +49,7 @@ fn main() { } } Some("--reindex") | Some("reindex") => { - if let Err(e) = run_daemon(true, use_npu, use_rocm, use_cuda, use_openvino) { + if let Err(e) = run_daemon(true, use_npu, use_rocm) { eprintln!("breadmill: {}", e); std::process::exit(1); } @@ -79,7 +66,7 @@ fn main() { cli_status(); } None | Some("serve") | Some("--serve") => { - if let Err(e) = run_daemon(false, use_npu, use_rocm, use_cuda, use_openvino) { + if let Err(e) = run_daemon(false, use_npu, use_rocm) { eprintln!("breadmill: {}", e); std::process::exit(1); } @@ -87,7 +74,7 @@ fn main() { Some(cmd) => { eprintln!("breadmill: unknown command: {}", cmd); eprintln!( - "usage: breadmill [serve|reindex|fetch-model|query |status] [--npu|--rocm|--cuda|--openvino] [--version]" + "usage: breadmill [serve|reindex|fetch-model|query |status] [--npu|--rocm] [--version]" ); std::process::exit(1); } @@ -96,13 +83,7 @@ fn main() { // ---- Daemon ----------------------------------------------------------------- -fn run_daemon( - force_reindex: bool, - use_npu: bool, - use_rocm: bool, - use_cuda: bool, - use_openvino: bool, -) -> Result<(), String> { +fn run_daemon(force_reindex: bool, use_npu: bool, use_rocm: bool) -> Result<(), String> { let config = breadsearch_shared::Config::load(); let state_dir = breadsearch_shared::state_dir(); let cache_dir = breadsearch_shared::cache_dir(); @@ -114,70 +95,34 @@ fn run_daemon( std::fs::create_dir_all(&state_dir).map_err(|e| e.to_string())?; std::fs::create_dir_all(&cache_dir).map_err(|e| e.to_string())?; - // CLI flags always override config — otherwise an explicit --cuda/--npu on - // the command line would silently lose to an unrelated `backend = "..."` - // already sitting in config.toml, since that's whatever earlier branch a - // fixed if/else-if priority order happened to check first. - let backend_name = if use_npu { - "npu" - } else if use_rocm { - "rocm" - } else if use_cuda { - "cuda" - } else if use_openvino { - "openvino" + let backend = if use_npu || config.model.backend == "npu" { + eprintln!("breadmill: NPU backend selected"); + Backend::Npu { cache_dir: cache_dir.clone() } + } else if use_rocm || config.model.backend == "rocm" { + eprintln!("breadmill: ROCm backend selected"); + Backend::Rocm } else { - config.model.backend.as_str() - }; - - let backend = match backend_name { - "npu" => { - eprintln!("breadmill: NPU backend selected"); - Backend::Npu { cache_dir: cache_dir.clone() } - } - "rocm" => { - eprintln!("breadmill: ROCm backend selected"); - Backend::Rocm - } - "cuda" => { - eprintln!("breadmill: CUDA backend selected"); - Backend::Cuda - } - "openvino" => { - eprintln!("breadmill: OpenVINO backend selected"); - Backend::OpenVino { cache_dir: cache_dir.clone() } - } - _ => Backend::Cpu, + Backend::Cpu }; let store = Store::open(&state_dir, dim)?; let state = Arc::new(SharedState::new(store)); - // Load the embedder on a background thread — an OpenVINO/CUDA/etc EP - // compile can take minutes or hang outright, and doing this inline used - // to block the socket bind below until it finished. That turned "model - // still loading" into an indistinguishable "connection refused" for - // every client, including the GUI, for as long as the load took. The - // socket now opens immediately; serve.rs already answers "model not - // ready" (via `model_ready`) for any request that arrives before the - // background load finishes. + // Load embedder if model files present let model_dir = model_dir(&cache_dir); let model_path = model_dir.join("model.onnx"); let tokenizer_path = model_dir.join("tokenizer.json"); if model_path.exists() && tokenizer_path.exists() { - let state_clone = Arc::clone(&state); - std::thread::spawn(move || { - eprintln!("breadmill: loading model..."); - match OrtEmbedder::load(&model_path, &tokenizer_path, dim, backend) { - Ok(embedder) => { - *state_clone.embedder.lock_recover() = Some(embedder); - state_clone.model_ready.store(true, Ordering::Relaxed); - eprintln!("breadmill: model loaded"); - } - Err(e) => eprintln!("breadmill: model load failed: {} — run --fetch-model", e), + eprintln!("breadmill: loading model..."); + match OrtEmbedder::load(&model_path, &tokenizer_path, dim, backend) { + Ok(embedder) => { + *state.embedder.lock().unwrap() = Some(embedder); + state.model_ready.store(true, Ordering::Relaxed); + eprintln!("breadmill: model loaded"); } - }); + Err(e) => eprintln!("breadmill: model load failed: {} — run --fetch-model", e), + } } else { eprintln!( "breadmill: model files not found in {} — run: breadmill --fetch-model", @@ -225,10 +170,29 @@ fn download_if_missing(url: &str, dest: &Path) -> Result<(), String> { eprintln!(" already present: {}", dest.display()); return Ok(()); } - // Shared with breadarrd's own (previously reqwest/async, now also this - // same sync/ureq implementation) model downloader — see - // bread_onnx::download's doc comment. - bread_onnx::download::ensure_file(url, dest, None).map_err(|e| e.to_string())?; + + eprintln!(" downloading {} ...", url); + let agent = ureq::AgentBuilder::new() + .timeout(std::time::Duration::from_secs(300)) + .build(); + + let response = agent.get(url).call().map_err(|e| e.to_string())?; + let mut bytes = Vec::new(); + response + .into_reader() + .read_to_end(&mut bytes) + .map_err(|e| e.to_string())?; + + if bytes.is_empty() { + return Err(format!("empty download from {}", url)); + } + + // Write atomically via temp file + let tmp = dest.with_extension("tmp"); + std::fs::write(&tmp, &bytes).map_err(|e| e.to_string())?; + std::fs::rename(&tmp, dest).map_err(|e| e.to_string())?; + + eprintln!(" saved {} ({:.1} MB)", dest.display(), bytes.len() as f64 / 1_048_576.0); Ok(()) } diff --git a/breadmill/src/serve.rs b/breadmill/src/serve.rs index a147235..cd67e67 100644 --- a/breadmill/src/serve.rs +++ b/breadmill/src/serve.rs @@ -8,7 +8,6 @@ use std::{ use breadsearch_shared::{Request, Response, StatusInfo}; use crate::indexer::SharedState; -use crate::sync_ext::MutexExt; pub fn run(socket_path: &Path, state: Arc, snippet_len: usize, search_limit: usize) { let _ = std::fs::remove_file(socket_path); @@ -87,7 +86,7 @@ fn dispatch( } let embedding = { - let mut embedder = state.embedder.lock_recover(); + let mut embedder = state.embedder.lock().unwrap(); match embedder.as_mut() { Some(e) => match e.embed_query(&query) { Ok(v) => v, @@ -102,7 +101,7 @@ fn dispatch( }; let limit = limit.min(search_limit).max(1); - let store = state.store.lock_recover(); + let store = state.store.lock().unwrap(); match store.search(&embedding, limit, snippet_len) { Ok(hits) => Response::Hits { hits }, diff --git a/breadmill/src/store.rs b/breadmill/src/store.rs index 106e4c5..077736d 100644 --- a/breadmill/src/store.rs +++ b/breadmill/src/store.rs @@ -6,6 +6,7 @@ use usearch::{Index, IndexOptions, MetricKind, ScalarKind, new_index}; pub struct Store { pub conn: Connection, pub index: Index, + pub dim: usize, } // usearch::Index wraps a raw C++ pointer; access is serialized by the Mutex. @@ -56,37 +57,14 @@ impl Store { let index = new_index(&options).map_err(|e| e.to_string())?; if idx_path.exists() { - // NOTE: this only catches corruption that usearch's loader - // itself detects and reports as an `Err` (e.g. a recognizable - // but wrong/incompatible header). Verified experimentally: a - // file that doesn't even look like a usearch index at all (pure - // garbage bytes) crashes the *process* with a SIGSEGV inside the - // native loader rather than returning an `Err` — no amount of - // Rust-side `Result`/`catch_unwind` handling can intercept that, - // it's a native-code robustness gap in the usearch library - // itself. This recovery path is still worth having (it's the - // difference between "won't start" and "rebuilds and starts" - // for the errors it *does* catch), but it is not a complete - // guarantee against every possible corrupt file. The atomic - // save below is the real fix for the common case this was - // written for (a crash mid-save) — it now can't produce a - // half-written `vectors.usearch` in the first place. - if let Err(e) = index.load(idx_path.to_str().unwrap()) { - eprintln!( - "breadmill: WARNING: {} failed to load ({}) — treating it as corrupt, \ - discarding it, and rebuilding the index from scratch on the next scan", - idx_path.display(), - e - ); - conn.execute_batch("DELETE FROM chunks; DELETE FROM files;") - .map_err(|e| e.to_string())?; - index.reserve(4096).map_err(|e| e.to_string())?; - } + index + .load(idx_path.to_str().unwrap()) + .map_err(|e| e.to_string())?; } else { index.reserve(4096).map_err(|e| e.to_string())?; } - Ok(Self { conn, index }) + Ok(Self { conn, index, dim }) } // ---- file state --------------------------------------------------------- @@ -240,18 +218,11 @@ impl Store { // ---- persistence -------------------------------------------------------- - /// Saves to a `.tmp` sibling and renames it into place — a same- - /// filesystem rename is atomic, so a crash mid-save leaves only an - /// orphaned `.tmp` file rather than a truncated/corrupt - /// `vectors.usearch` that would otherwise fail to load on next start - /// (see the recovery path in `open`). pub fn save_index(&self, state_dir: &Path) -> Result<(), String> { let idx_path = state_dir.join("vectors.usearch"); - let tmp_path = state_dir.join("vectors.usearch.tmp"); self.index - .save(tmp_path.to_str().unwrap()) - .map_err(|e| e.to_string())?; - std::fs::rename(&tmp_path, &idx_path).map_err(|e| e.to_string()) + .save(idx_path.to_str().unwrap()) + .map_err(|e| e.to_string()) } } @@ -262,45 +233,3 @@ fn truncate_to_chars(s: &str, max_chars: usize) -> String { let truncated: String = s.chars().take(max_chars).collect(); format!("{}…", truncated.trim_end()) } - -#[cfg(test)] -mod tests { - use super::*; - - fn test_dir(name: &str) -> std::path::PathBuf { - let dir = std::env::temp_dir().join(format!("breadmill-store-test-{name}-{}", std::process::id())); - let _ = std::fs::remove_dir_all(&dir); - std::fs::create_dir_all(&dir).unwrap(); - dir - } - - #[test] - fn save_index_leaves_no_tmp_file_behind_and_is_loadable() { - let dir = test_dir("save-atomic"); - let store = Store::open(&dir, 4).unwrap(); - store.save_index(&dir).unwrap(); - - assert!(dir.join("vectors.usearch").exists()); - assert!( - !dir.join("vectors.usearch.tmp").exists(), - "the .tmp staging file should be renamed away, not left behind" - ); - - // A fresh `open` can load what was just saved without error. - Store::open(&dir, 4).unwrap(); - - std::fs::remove_dir_all(&dir).unwrap(); - } - - // No automated test for the corrupt-index recovery branch in `open`: - // the natural way to construct a "corrupt" fixture (writing arbitrary - // garbage to vectors.usearch) was tried and crashes the *test process* - // with a SIGSEGV inside usearch's native loader before our `Result` - // handling ever gets a chance to run — see the comment on that branch - // in `open`. A real usearch file with a deliberately-broken-but-still- - // parseable header could plausibly hit the `Err` path exercised there - // instead, but reverse-engineering that format precisely enough to - // build a safe fixture wasn't worth the risk of another flaky/crashing - // test. The atomic-save test above covers the actual mechanism that - // prevents this scenario from arising in the first place. -} diff --git a/breadmill/src/sync_ext.rs b/breadmill/src/sync_ext.rs deleted file mode 100644 index a891cd7..0000000 --- a/breadmill/src/sync_ext.rs +++ /dev/null @@ -1,41 +0,0 @@ -//! Poison-tolerant `Mutex` locking. -//! -//! A panic on any thread while holding `SharedState::store` or -//! `SharedState::embedder` (e.g. an untrapped ONNX Runtime panic — only PDF -//! extraction is `catch_unwind`-guarded, see `extract.rs`) poisons the -//! `Mutex`. Every subsequent plain `.lock().unwrap()` — in the indexer *and* -//! in every query handler in `serve.rs` — would then immediately panic too, -//! silently bricking indexing and search until the daemon is restarted by -//! hand. -//! -//! `Mutex` poisoning exists to flag "the data guarded by this lock might be -//! in an inconsistent state," but every lock scope in this crate is a short, -//! single-step SQLite call or usearch operation — nothing here spans a -//! multi-step invariant across a single `lock()` call — so recovering the -//! guard and logging loudly is a reasonable trade here: continuing to serve -//! (and re-attempting the operation that panicked, on the next file/query) -//! beats a daemon that silently stops answering everything after one panic. - -use std::sync::{Mutex, MutexGuard}; - -pub trait MutexExt { - /// Like `.lock().unwrap()`, but recovers from a poisoned mutex instead - /// of panicking again — logs once per recovery so it's visible in the - /// daemon's own output, not just silently swallowed. - fn lock_recover(&self) -> MutexGuard<'_, T>; -} - -impl MutexExt for Mutex { - fn lock_recover(&self) -> MutexGuard<'_, T> { - match self.lock() { - Ok(guard) => guard, - Err(poisoned) => { - eprintln!( - "breadmill: WARNING: a mutex was poisoned by a panic on another thread; \ - recovering it and continuing instead of cascading the panic" - ); - poisoned.into_inner() - } - } - } -} diff --git a/breadsearch-shared/Cargo.toml b/breadsearch-shared/Cargo.toml index 6f45d3f..703db23 100644 --- a/breadsearch-shared/Cargo.toml +++ b/breadsearch-shared/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "breadsearch-shared" -version = "0.3.3" +version = "0.1.0" edition = "2021" license = "MIT" diff --git a/breadsearch-shared/src/lib.rs b/breadsearch-shared/src/lib.rs index 5ed69c4..0d02cb8 100644 --- a/breadsearch-shared/src/lib.rs +++ b/breadsearch-shared/src/lib.rs @@ -43,7 +43,7 @@ pub fn socket_path() -> PathBuf { // ---- Config ----------------------------------------------------------------- -#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[derive(Debug, Clone, Serialize, Deserialize)] pub struct Config { #[serde(default)] pub index: IndexConfig, @@ -129,8 +129,7 @@ pub struct ModelConfig { pub name: String, #[serde(default = "default_dim")] pub dim: usize, - /// Compute backend: "cpu", "npu" (VitisAI/XDNA), "rocm" (MIGraphX/AMD GPU), - /// "cuda" (NVIDIA GPU), or "openvino" (Intel iGPU/dGPU). + /// Compute backend: "cpu" or "npu" (VitisAI/XDNA). #[serde(default = "default_backend")] pub backend: String, } @@ -157,6 +156,16 @@ impl Default for ModelConfig { } } +impl Default for Config { + fn default() -> Self { + Self { + index: IndexConfig::default(), + search: SearchConfig::default(), + model: ModelConfig::default(), + power: PowerConfig::default(), + } + } +} #[derive(Debug, Clone, Serialize, Deserialize)] pub struct PowerConfig { @@ -245,7 +254,8 @@ pub struct StatusInfo { pub fn send_request(req: &Request) -> std::io::Result { let mut stream = UnixStream::connect(socket_path())?; - let mut line = serde_json::to_string(req).map_err(std::io::Error::other)?; + let mut line = serde_json::to_string(req) + .map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e))?; line.push('\n'); stream.write_all(line.as_bytes())?; stream.flush()?; diff --git a/breadsearch/Cargo.toml b/breadsearch/Cargo.toml index 2c11e28..fc469e0 100644 --- a/breadsearch/Cargo.toml +++ b/breadsearch/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "breadsearch" -version = "0.3.3" +version = "0.1.0" edition = "2021" license = "MIT" @@ -10,13 +10,7 @@ path = "src/main.rs" [dependencies] breadsearch-shared = { path = "../breadsearch-shared" } -bread-theme = { git = "https://git.breadway.dev/Breadway/bread-ecosystem", tag = "v0.7.4", features = ["gtk"] } -# Bread event fabric client — emit bread.search.* (fail-silent if breadd is down). -bread-utils = { git = "https://git.breadway.dev/Breadway/bread-ecosystem", tag = "v0.7.2", features = ["bread-client", "gtk"] } -# Capture primitives for `--screenshot` mode — see src/screenshot.rs. -bread-screenshots = { git = "https://git.breadway.dev/Breadway/bread-ecosystem", tag = "v0.7.2" } +bread-theme = { git = "https://github.com/Breadway/bread-ecosystem", tag = "v0.2.8", features = ["gtk"] } gtk4 = { version = "0.11", features = ["v4_12"] } gtk4-layer-shell = "0.8" serde_json = "1" -clap = { version = "4", features = ["derive"] } -anyhow = "1" diff --git a/breadsearch/src/bread_events.rs b/breadsearch/src/bread_events.rs deleted file mode 100644 index d87e595..0000000 --- a/breadsearch/src/bread_events.rs +++ /dev/null @@ -1,26 +0,0 @@ -//! `bread.search.*` event integration — optional, non-blocking. See -//! `EVENTS.md` at the repo root for the full contract. breadsearch works -//! identically with or without breadd running; every call here is -//! fire-and-forget (`BreadClient::emit` never blocks or errors this -//! process) so a missing or restarting breadd never affects the overlay. - -use bread_utils::bread_client::BreadClient; - -/// This app's id in bread's sibling-app namespace registry -/// (`bread_shared::apps::KNOWN_APPS`) — events publish as `bread.search.*`. -pub const APP_ID: &str = "search"; - -fn client() -> BreadClient { - BreadClient::connect(APP_ID) -} - -pub fn emit_opened() { - client().emit("bread.search.opened", serde_json::json!({})); -} - -pub fn emit_opened_result(path: &str) { - client().emit( - "bread.search.opened_result", - serde_json::json!({ "path": path }), - ); -} diff --git a/breadsearch/src/listen.rs b/breadsearch/src/listen.rs deleted file mode 100644 index aef9c84..0000000 --- a/breadsearch/src/listen.rs +++ /dev/null @@ -1,84 +0,0 @@ -//! Long-running command subscription for `bread.command.search.*`. -//! -//! `breadsearch` is still a one-shot toggle overlay by default. -//! `breadsearch listen` is the optional persistent process that can honor -//! bus commands. See `EVENTS.md`. - -use bread_utils::bread_client::{BreadClient, BreadEvent}; - -use crate::bread_events::APP_ID; - -/// Subscribe to `bread.command.search.**` and block until the process is killed. -/// -/// breadd being absent is not an error: [`BreadClient::subscribe`] reconnects -/// with backoff, and `on_event` simply isn't called until the daemon is up. -pub fn run() { - let client = BreadClient::connect(APP_ID); - if client.health().is_none() { - eprintln!( - "breadsearch: breadd unreachable; command subscription will connect when it comes back" - ); - } - - let _commands = client.subscribe("bread.command.search.**", |event| { - handle_command(&event); - }); - - eprintln!("breadsearch: listening for bread.command.search.**"); - loop { - std::thread::park(); - } -} - -/// Reacts to `bread.command.search.*` verbs. Only `open` is honored today — -/// other verbs are ignored, not stubbed as no-ops that pretend to succeed. -fn handle_command(event: &BreadEvent) { - let Some(verb) = command_verb(&event.event) else { - return; - }; - match verb { - "open" => handle_open(), - other => { - eprintln!("breadsearch: ignoring unrecognized bread.command.search.{other}"); - } - } -} - -fn handle_open() { - // Same as running `breadsearch` from a keybind: the PID-file toggle - // shows the overlay (or dismisses it if it is already up). - let result = spawn_self(); - let client = BreadClient::connect(APP_ID); - match result { - Ok(_) => client.emit("bread.search.open.done", serde_json::json!({})), - Err(e) => { - eprintln!("breadsearch: bread.command.search.open failed: {e}"); - client.emit( - "bread.search.open.failed", - serde_json::json!({ "error": e.to_string() }), - ); - } - } -} - -fn spawn_self() -> std::io::Result { - let exe = std::env::current_exe().unwrap_or_else(|_| std::path::PathBuf::from("breadsearch")); - std::process::Command::new(exe).spawn() -} - -fn command_verb(event_name: &str) -> Option<&str> { - event_name.strip_prefix("bread.command.search.") -} - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn command_verb_strips_search_prefix() { - assert_eq!(command_verb("bread.command.search.open"), Some("open")); - assert_eq!(command_verb("bread.command.search.query"), Some("query")); - assert_eq!(command_verb("bread.command.box.open"), None); - assert_eq!(command_verb("bread.search.opened"), None); - } -} diff --git a/breadsearch/src/main.rs b/breadsearch/src/main.rs index 53302ec..58f4b47 100644 --- a/breadsearch/src/main.rs +++ b/breadsearch/src/main.rs @@ -1,16 +1,22 @@ use bread_theme::{hex_to_rgba, ink_on, load_palette, Palette}; use breadsearch_shared::{Hit, Request, Response}; -use std::{cell::RefCell, process::Command, rc::Rc, sync::mpsc}; - -use gtk4::{ - glib, pango::EllipsizeMode, prelude::*, Application, Box as GBox, CssProvider, - EventControllerKey, Image, Label, ListBox, Orientation, PolicyType, ScrolledWindow, - SearchEntry, SelectionMode, +use std::{ + cell::RefCell, + env, fs, + path::PathBuf, + process::Command, + rc::Rc, + sync::mpsc, }; -mod bread_events; -mod listen; -mod screenshot; +use gtk4::{ + glib, + pango::EllipsizeMode, + prelude::*, + Application, ApplicationWindow, Box as GBox, CssProvider, EventControllerKey, Image, Label, + ListBox, Orientation, PolicyType, ScrolledWindow, SearchEntry, SelectionMode, +}; +use gtk4_layer_shell::{Edge, KeyboardMode, Layer, LayerShell}; // ---- Theming ---------------------------------------------------------------- @@ -33,14 +39,47 @@ fn build_css(p: &Palette) -> String { .hit-snippet {{ opacity: 0.75; font-size: 11px; font-style: italic; }}\ .hit-score {{ opacity: 0.5; font-size: 11px; }}\ image {{ margin-right: 8px; }}", - bg_panel = bg_panel, - surface = p.color0, - accent = p.color4, - on_bg = ink_on(&p.background), + bg_panel = bg_panel, + surface = p.color0, + accent = p.color4, + on_bg = ink_on(&p.background), on_surface = ink_on(&p.color0), ) } +// ---- PID file toggle -------------------------------------------------------- + +fn pid_file() -> PathBuf { + env::var("XDG_RUNTIME_DIR") + .map(PathBuf::from) + .unwrap_or_else(|_| PathBuf::from("/tmp")) + .join("breadsearch.pid") +} + +fn is_breadsearch_pid(pid: u32) -> bool { + fs::read_to_string(format!("/proc/{}/comm", pid)) + .map(|s| s.trim() == "breadsearch") + .unwrap_or(false) +} + +fn toggle_or_continue() -> bool { + let pf = pid_file(); + if let Ok(content) = fs::read_to_string(&pf) { + if let Ok(pid) = content.trim().parse::() { + if is_breadsearch_pid(pid) { + let _ = Command::new("kill").arg(pid.to_string()).status(); + return false; + } + } + } + let _ = fs::write(&pf, std::process::id().to_string()); + true +} + +fn cleanup_pid() { + let _ = fs::remove_file(pid_file()); +} + // ---- Row builder ------------------------------------------------------------ fn make_hit_row(hit: &Hit) -> gtk4::ListBoxRow { @@ -152,7 +191,6 @@ fn open_file(path: &str) { .stdout(std::process::Stdio::null()) .stderr(std::process::Stdio::null()) .spawn(); - bread_events::emit_opened_result(path); } fn open_folder(path: &str) { @@ -166,22 +204,14 @@ fn open_folder(path: &str) { .stdout(std::process::Stdio::null()) .stderr(std::process::Stdio::null()) .spawn(); - bread_events::emit_opened_result(path); } // ---- UI --------------------------------------------------------------------- -fn run_ui(screenshot_req: Option) { - let mut builder = Application::builder().application_id("com.breadway.breadsearch"); - if screenshot_req.is_some() { - // GApplication is single-instance by default; this machine typically - // already has a real breadsearch instance, so without this a - // screenshot run would just message the *existing* instance instead - // of starting a fresh one that ever sees `screenshot_req`. - builder = builder.flags(gtk4::gio::ApplicationFlags::NON_UNIQUE); - } - let app = builder.build(); - let is_screenshot_run = screenshot_req.is_some(); +fn run_ui() { + let app = Application::builder() + .application_id("com.breadway.breadsearch") + .build(); let debounce_id: Rc>> = Rc::new(RefCell::new(None)); @@ -195,13 +225,20 @@ fn run_ui(screenshot_req: Option) { bread_theme::gtk::apply_user_css(&user_css_path, &user_cell); } - // Full-screen transparent overlay; panel widget is positioned inside it. - let window = bread_utils::gtk_popup::new_overlay_window(app, "breadsearch"); - bread_theme::gtk::bind_window_auto(&window); + let window = ApplicationWindow::builder().application(app).build(); + window.init_layer_shell(); + window.set_namespace(Some("breadsearch")); + window.set_layer(Layer::Overlay); + window.set_keyboard_mode(KeyboardMode::Exclusive); + for edge in [Edge::Top, Edge::Bottom, Edge::Left, Edge::Right] { + window.set_anchor(edge, true); + } + window.set_exclusive_zone(0); let close_all: Rc = Rc::new({ let w = window.clone(); move || { + cleanup_pid(); w.close(); } }); @@ -257,26 +294,16 @@ fn run_ui(screenshot_req: Option) { let (tx, rx) = mpsc::sync_channel::>(1); std::thread::spawn(move || { - let req = Request::Query { - query: q, - limit: 10, - }; + let req = Request::Query { query: q, limit: 10 }; let _ = tx.send(breadsearch_shared::send_request(&req)); }); - // Wait for the thread's result on a bounded timer rather than - // an `idle_add_local` — an idle source has no wait condition - // of its own, so GLib re-invokes it on every single main-loop - // iteration, i.e. a busy-spin pinning a full CPU core for as - // long as the daemon takes to answer (normally sub-ms, but - // the daemon's socket has no read timeout of its own, so a - // wedged/slow daemon previously meant an indefinite spin). - // 15ms is imperceptible added latency for a search box and - // caps this at a couple dozen checks per second instead. + // Poll via idle_add_local until the thread delivers its result. + // Unix socket round-trips are sub-millisecond so this fires once. let rx = Rc::new(rx); let list_t = list_clone.clone(); - glib::timeout_add_local(std::time::Duration::from_millis(15), move || { + glib::idle_add_local(move || { match rx.try_recv() { Ok(result) => { populate_list(&list_t, result); @@ -320,11 +347,36 @@ fn run_ui(screenshot_req: Option) { glib::Propagation::Stop } Key::Down => { - bread_utils::gtk_popup::select_next_visible(&list_k); + let cur = list_k.selected_row().map(|r| r.index()).unwrap_or(-1); + let mut i = cur + 1; + loop { + match list_k.row_at_index(i) { + Some(r) if r.is_selectable() => { + list_k.select_row(Some(&r)); + break; + } + Some(_) => i += 1, + None => break, + } + } glib::Propagation::Stop } Key::Up => { - bread_utils::gtk_popup::select_prev_visible(&list_k); + let cur = list_k.selected_row().map(|r| r.index()).unwrap_or(0); + let mut i = cur - 1; + loop { + if i < 0 { + break; + } + match list_k.row_at_index(i) { + Some(r) if r.is_selectable() => { + list_k.select_row(Some(&r)); + break; + } + Some(_) => i -= 1, + None => break, + } + } glib::Propagation::Stop } _ => glib::Propagation::Proceed, @@ -342,65 +394,36 @@ fn run_ui(screenshot_req: Option) { }); // Click outside launcher panel → close - { - let close_outside = Rc::clone(&close_all); - bread_utils::gtk_popup::close_on_outside_click(&window, &vbox, move || close_outside()); - } + let close_outside = Rc::clone(&close_all); + let vbox_ref = vbox.clone(); + let win_ref = window.clone(); + let outside_click = gtk4::GestureClick::new(); + outside_click.connect_pressed(move |_, _, x, y| { + if let Some(b) = vbox_ref.compute_bounds(&win_ref) { + if x < b.x() as f64 + || x > (b.x() + b.width()) as f64 + || y < b.y() as f64 + || y > (b.y() + b.height()) as f64 + { + close_outside(); + } + } + }); + window.add_controller(outside_click); - if let Some(req) = screenshot_req.clone() { - screenshot::dispatch(&window, req); - } - - window.connect_map(|_| bread_events::emit_opened()); + window.connect_destroy(|_| cleanup_pid()); window.present(); search.grab_focus(); }); - if is_screenshot_run { - // GLib's own option parser otherwise rejects --screenshot/--output - // before clap ever sees them (`Cli::parse()` already ran in `main`, - // over the real argv). - app.run_with_args(&[] as &[&str]); - } else { - app.run(); - } + app.run(); } // ---- Main ------------------------------------------------------------------- fn main() { - if std::env::args().nth(1).as_deref() == Some("listen") { - listen::run(); + if !toggle_or_continue() { return; } - - use clap::Parser; - let cli = screenshot::Cli::parse(); - let screenshot_req = cli.screenshot_request(); - - // `toggle_or_kill` kills whatever's holding the single-instance lock — - // a real, already-running breadsearch included. A screenshot run must - // never touch it: it's a separate, disposable instance by design (same - // reasoning as breadbar's `allow_multiple_instances`), not a toggle of - // the operator's real search panel. - // - // Kept alive for the rest of `main` — dropping it releases the - // single-instance lock and removes the pid file, which happens - // naturally once `run_ui` returns (after the window closes). - let _singleton_guard = if screenshot_req.is_some() { - None - } else { - match bread_utils::singleton::toggle_or_kill("breadsearch") { - Ok(bread_utils::singleton::Toggle::Started(guard)) => Some(guard), - Ok(bread_utils::singleton::Toggle::KilledExisting) => return, - Err(e) => { - eprintln!( - "breadsearch: single-instance lock unavailable ({e}); continuing without it" - ); - None - } - } - }; - - run_ui(screenshot_req); + run_ui(); } diff --git a/breadsearch/src/screenshot.rs b/breadsearch/src/screenshot.rs deleted file mode 100644 index ad1f6ad..0000000 --- a/breadsearch/src/screenshot.rs +++ /dev/null @@ -1,93 +0,0 @@ -//! `--screenshot` CLI mode: render breadsearch's search panel, capture it -//! via `bread-screenshots`, then exit — driven by `bread-ecosystem`'s -//! `bread-capture` orchestrator, or run standalone for one-off captures. -//! -//! Same reasoning as breadbox: one view ("search"), full known-size canvas -//! capture since the panel isn't its own layer surface. Captures whatever -//! the panel shows at settle time — normally the "Type to search…" empty -//! state, since there's no query to type in an automated run. - -use bread_utils::screenshot_cli::{validate_pair, DEFAULT_HEIGHT, DEFAULT_WIDTH, SETTLE_DELAY}; -use clap::Parser; -use gtk4::prelude::*; -use std::path::PathBuf; - -#[derive(Parser)] -#[command(name = "breadsearch")] -pub struct Cli { - /// Render the named view, capture it, then exit instead of running - /// normally. Known views: "search". - #[arg(long)] - pub screenshot: Option, - - /// PNG path to write the capture to. Required together with --screenshot. - #[arg(long)] - pub output: Option, - - /// Capture canvas width — matches the isolated compositor's output width - /// (`bread-capture --isolate-width`). - #[arg(long, default_value_t = DEFAULT_WIDTH)] - pub width: u32, - - /// Capture canvas height — see `width`. - #[arg(long, default_value_t = DEFAULT_HEIGHT)] - pub height: u32, -} - -#[derive(Clone)] -pub struct ScreenshotRequest { - pub view: String, - pub output: PathBuf, - pub width: u32, - pub height: u32, -} - -impl Cli { - /// `None` for a normal run. Exits the process with an error if the - /// `--screenshot` / `--output` pair is incomplete, before any GTK setup - /// happens. - pub fn screenshot_request(&self) -> Option { - if let Err(e) = validate_pair(self.screenshot.as_deref(), self.output.as_deref()) { - eprintln!("breadsearch: {e}"); - std::process::exit(1); - } - Some(ScreenshotRequest { - view: self.screenshot.clone()?, - output: self.output.clone()?, - width: self.width, - height: self.height, - }) - } -} - -/// Wire up the given view's screenshot sequence against an already-built, -/// not-yet-presented window. Every path here ends by exiting the process — -/// it never returns control to the normal search UI. -pub fn dispatch(window: >k4::ApplicationWindow, req: ScreenshotRequest) { - match req.view.as_str() { - "search" => { - let output = req.output; - let (width, height) = (req.width as i32, req.height as i32); - window.connect_map(move |_| { - let output = output.clone(); - gtk4::glib::timeout_add_local_once(SETTLE_DELAY, move || { - finish(bread_screenshots::capture_region(0, 0, width, height, &output)); - }); - }); - } - other => { - eprintln!("breadsearch: unknown screenshot view '{other}' (known: search)"); - std::process::exit(1); - } - } -} - -fn finish(result: anyhow::Result<()>) { - match result { - Ok(()) => std::process::exit(0), - Err(e) => { - eprintln!("breadsearch: screenshot capture failed: {e}"); - std::process::exit(1); - } - } -} diff --git a/ci/bread-ecosystem.rev b/ci/bread-ecosystem.rev deleted file mode 100644 index 34e7aa9..0000000 --- a/ci/bread-ecosystem.rev +++ /dev/null @@ -1 +0,0 @@ -147cfbbf96ae4b171027defa1130d2caddb934b1 diff --git a/ci/build.sh b/ci/build.sh deleted file mode 100755 index 2c71070..0000000 --- a/ci/build.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash -# Delegates to bread-ecosystem's shared CI build image/script, pinned to -# the commit in ci/bread-ecosystem.rev — not `main`. bread-ecosystem's CI -# files now affect every product's release pipeline, so bumping the pin -# is a deliberate act instead of silent drift (see the bread-theme test -# that broke here for exactly that reason, before it was pinned by rev). -# -# Usage: ci/build.sh cargo build --release --locked -set -euo pipefail - -ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" -REV="$(cat "${ROOT}/ci/bread-ecosystem.rev")" - -CACHE_DIR="/tmp/bread-ecosystem-ci-${REV}" -if [ ! -d "$CACHE_DIR" ]; then - rm -rf /tmp/bread-ecosystem-ci-* - git clone https://git.breadway.dev/Breadway/bread-ecosystem.git "$CACHE_DIR" - git -C "$CACHE_DIR" checkout --quiet "$REV" -fi - -bash "${CACHE_DIR}/ci/build.sh" breadsearch "$ROOT" "$@" diff --git a/packaging/breadmill.service b/packaging/breadmill.service index e6ade17..2b4d65e 100644 --- a/packaging/breadmill.service +++ b/packaging/breadmill.service @@ -1,16 +1,10 @@ [Unit] Description=Breadmill semantic search indexer -Documentation=https://git.breadway.dev/Breadway/breadsearch +Documentation=https://github.com/breadway/breadsearch After=default.target [Service] Type=simple -# Required (not just a perf tweak) when backend = "rocm": without a valid -# cache dir, ONNX Runtime's MIGraphX EP reads an uninitialized cache path and -# crashes on the first query instead of just recompiling every restart. Inert -# for cpu/npu/cuda/openvino backends (openvino's cache dir is set in code, -# not via env var). See README.md#gpu-backend-notes. -Environment=ORT_MIGRAPHX_MODEL_CACHE_PATH=%h/.cache/breadsearch/migraphx-cache ExecStart=%h/.cargo/bin/breadmill Restart=on-failure RestartSec=5