diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..1a2ba62 --- /dev/null +++ b/.env.example @@ -0,0 +1,54 @@ +# ThoughtSync production settings. Copy to `.env` and edit: +# +# cp .env.example .env +# +# Only POSTGRES_PASSWORD has no default — compose refuses to start without it. +# Everything else here is optional. Anything NOT in this file (site name, signups, +# attachment limits, trash retention, link previews) is configured in the admin +# Settings UI and stored in the database, not here. + +# --- required --------------------------------------------------------------- + +# Generate one and keep it: changing it later means also changing it inside the +# database, or Postgres will reject the app's connection. +# +# openssl rand -base64 24 | tr -d '/+=' | head -c 32 +# +# Stick to letters and digits. This value goes into a connection URL, so a `@`, +# `/`, `:` or `#` in it will be misparsed as URL structure rather than password. +POSTGRES_PASSWORD= + +# --- optional --------------------------------------------------------------- + +# Which build to run. +# +# latest tracks the `main` branch — the production line (default) +# dev tracks the `dev` branch — newer, less settled +# pins one exact build; every push publishes one, and this is +# the rollback lever when an upgrade misbehaves +# +# NOTE: `main` can sit well behind `dev`. If a feature you expect is missing, +# check which branch it actually landed on before assuming a bug. +#THOUGHTSYNC_TAG=latest + +# The host port the app is published on. +#THOUGHTSYNC_PORT=5000 + +# Which interface to bind. The default (all interfaces) is what lets desktop +# clients on your network reach the server. Behind a reverse proxy, set this to +# 127.0.0.1 so only the proxy can talk to it. +#THOUGHTSYNC_BIND=0.0.0.0 + +# Database identity. Changing these AFTER the first start does not rename anything +# that already exists — the volume keeps whatever the first run created. +#POSTGRES_USER=thoughtsync +#POSTGRES_DB=thoughtsync + +# --- a note on HTTPS -------------------------------------------------------- +# +# The app marks its session cookie Secure automatically when a request arrives over +# HTTPS, directly or via a proxy setting X-Forwarded-Proto — no setting needed. +# +# Worth knowing if you use the desktop app: typing a bare hostname there defaults to +# https://, deliberately, so a device token never crosses the wire in cleartext by +# accident. Serving over plain HTTP means typing the `http://` yourself. diff --git a/.forgejo/workflows/android.yml b/.forgejo/workflows/android.yml new file mode 100644 index 0000000..e7e922b --- /dev/null +++ b/.forgejo/workflows/android.yml @@ -0,0 +1,257 @@ +name: Android + +# The native Kotlin/Compose client over the shared Rust core (M12). +# +# Replaces the Tauri-mobile lane deleted in step 2. What changed is what this +# builds, not that Android has a lane: the UI is Compose, and the store and sync +# engine are `thoughtsync-core` cross-compiled by cargo-ndk and loaded through +# uniffi. +# +# CI can only prove this BUILDS. A Linux runner cannot execute an APK, so anything +# about feel, touch or on-device correctness is an operator pass on an emulator or +# phone. +# +# The artifact is a SIGNED RELEASE APK when the keystore secret is present, and an +# unsigned debug one when it is not. That distinction is not cosmetic: two builds +# signed with different keys cannot replace one another, and bridging that gap +# means uninstalling first — which deletes the app's database and every local note +# with it (Scribe issue 2803). + +on: + push: + branches: [dev, main] + paths: + - "android/**" + # The Rust the .so is built from. A core change reaches the phone exactly + # as it reaches the desktop, so this lane has to rebuild on it. + - "core/**" + - "Cargo.toml" + - "Cargo.lock" + - ".forgejo/workflows/android.yml" + workflow_dispatch: + +concurrency: + group: android-${{ github.ref }} + cancel-in-progress: true + +env: + # Silences the JDK 22+ "restricted method in java.lang.System has been called" + # warning that Gradle 9.1's bundled native-platform jar trips at launch. This + # targets the LAUNCHER JVM, which is why org.gradle.jvmargs in + # gradle.properties is not enough on its own (Minstrel hit the same thing). + JAVA_TOOL_OPTIONS: "--enable-native-access=ALL-UNNAMED" + +jobs: + build: + name: Kotlin + Rust (APK) + # runs-on is only a scheduling label (Label Model B). flutter-ci is the + # proven-working label that can pull our container images. + runs-on: flutter-ci + container: + # The image repurposed from ci-tauri-android in M12 step 3: Rust + the four + # Android ABIs + cargo-ndk + SDK/NDK + JDK 25 + ktlint + detekt. + image: git.fabledsword.com/bvandeusen/ci-rust-android:1.97 + + permissions: + contents: write + # For the dispatch at the end: this lane starts the server image build. + actions: write + + defaults: + run: + working-directory: android + + steps: + - uses: actions/checkout@v4 + + - name: Cache Gradle and Cargo + uses: actions/cache@v4 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + ~/.kotlin + target + key: android-${{ hashFiles('android/gradle/wrapper/gradle-wrapper.properties', 'android/gradle/libs.versions.toml', 'android/**/*.gradle.kts', 'Cargo.lock') }} + restore-keys: | + android- + + # Everything downstream keys off this: the variant to build, the Cargo + # profile to build it with, and the version it carries. Decided once so no + # two Gradle invocations in this run can disagree and force a second + # four-minute cross-compile. + - name: Signing key, variant and version + id: build + env: + ANDROID_KEYSTORE_BASE64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }} + run: | + version="$(sh ../desktop/packaging/build-version.sh)" + echo "name=$version" >> $GITHUB_OUTPUT + # versionCode must RISE for Android to accept an update, and the run + # number is the same monotonic counter the desktop's version scheme + # already uses — no state carried between runs, and immune to the + # shallow checkout that makes a commit count useless here. + echo "code=$GITHUB_RUN_NUMBER" >> $GITHUB_OUTPUT + + if [ -n "${ANDROID_KEYSTORE_BASE64:-}" ]; then + printf '%s' "$ANDROID_KEYSTORE_BASE64" | base64 -d > /tmp/thoughtsync-release.jks + echo "variant=Release" >> $GITHUB_OUTPUT + echo "label=release" >> $GITHUB_OUTPUT + # DEBUG profile, in a release APK, deliberately — see the note above + # the cargoNdk task. The release profile strips the symbols uniffi + # reads its metadata out of, so `generateUniffiBindings` fails + # outright (run 4077). Unpicking that is worth doing and is not worth + # blocking signed builds on. + echo "profile=debug" >> $GITHUB_OUTPUT + echo "keystore=/tmp/thoughtsync-release.jks" >> $GITHUB_OUTPUT + echo "apk=android/app/build/outputs/apk/release/app-release.apk" >> $GITHUB_OUTPUT + echo "Signed release build — $version (versionCode $GITHUB_RUN_NUMBER)" + else + echo "::warning::No ANDROID_KEYSTORE_BASE64 secret. Building an UNSIGNED DEBUG APK: it cannot be installed over a signed build and cannot self-update." + echo "variant=Debug" >> $GITHUB_OUTPUT + echo "label=debug" >> $GITHUB_OUTPUT + echo "profile=debug" >> $GITHUB_OUTPUT + echo "keystore=" >> $GITHUB_OUTPUT + echo "apk=android/app/build/outputs/apk/debug/app-debug.apk" >> $GITHUB_OUTPUT + fi + + - name: Make gradlew executable + run: chmod +x ./gradlew + + # Fails loudly here if the wrapper and the image's JDK disagree, rather + # than thirty seconds into a compile with an opaque version message. + - name: Gradle wrapper check + run: ./gradlew --version + + # Cross-compiles the core for four ABIs and generates the Kotlin bindings + # from the built .so. Run as its own step so a Rust failure is legible as a + # Rust failure instead of arriving inside a Gradle stack trace. + - name: Build the native library and bindings + run: ./gradlew generateUniffiBindings -PTHOUGHTSYNC_CARGO_PROFILE=${{ steps.build.outputs.profile }} + + # The image's PINNED CLIs, not Gradle plugins. ci-rust-android carries both + # (M12 step 3) precisely so this lane needs no second image, and going + # through Gradle plugins would mean a second version of each tool resolved + # at build time and kept in lockstep with the image's by hand. + # + # Scoped to src/main: the generated uniffi bindings live under build/ and + # are not ours to style. + - name: ktlint + run: ktlint "app/src/main/**/*.kt" + + - name: detekt + run: detekt --build-upon-default-config --config config/detekt.yml --input app/src/main/java + + - name: Unit tests + # Host-JVM tests only. Anything touching the core needs an Android + # runtime to load the .so, so those are instrumented tests and belong on + # an emulator, not here — the Rust side is covered by the workspace + # tests in the desktop lane. + # + # DEBUG regardless of what is being packaged: AGP creates unit-test tasks + # only for `testBuildType`, which is debug, so `testReleaseUnitTest` does + # not exist (run 4082). It costs one extra Kotlin compile and buys the + # type-check on the debug variant, which is the one an emulator build + # would use. + run: ./gradlew testDebugUnitTest -PTHOUGHTSYNC_CARGO_PROFILE=${{ steps.build.outputs.profile }} + + - name: Assemble the APK + env: + # Empty on the unsigned path, which build.gradle.kts reads as "no + # signing config" rather than as a path to a missing file. + ANDROID_KEYSTORE_FILE: ${{ steps.build.outputs.keystore }} + ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }} + run: | + ./gradlew assemble${{ steps.build.outputs.variant }} \ + -PTHOUGHTSYNC_CARGO_PROFILE=${{ steps.build.outputs.profile }} \ + -PTHOUGHTSYNC_VERSION_NAME=${{ steps.build.outputs.name }} \ + -PTHOUGHTSYNC_VERSION_CODE=${{ steps.build.outputs.code }} + + # Prints the certificate the APK was actually signed with, so the operator + # can compare it against the fingerprint recorded when the key was + # generated. Signing with the WRONG key produces a perfectly valid APK that + # simply refuses to install over the app already on the phone — a failure + # that otherwise only shows up on the device, after the run is green. + - name: Show the signing certificate + if: steps.build.outputs.keystore != '' + run: | + apksigner="$(ls /opt/android-sdk/build-tools/*/apksigner | head -1)" + "$apksigner" verify --print-certs "app/build/outputs/apk/release/app-release.apk" + + # Staged with a STABLE name plus the sidecar the server reads its version + # out of — an APK keeps that in a binary manifest Python cannot parse, and + # `aapt` is not on a Quart server. Computed here, where the real values are + # already known. + - name: Stage the client for distribution + if: steps.build.outputs.keystore != '' + run: | + mkdir -p dist + cp "app/build/outputs/apk/release/app-release.apk" dist/thoughtsync.apk + size="$(wc -c < dist/thoughtsync.apk | tr -d ' ')" + sha="$(sha256sum dist/thoughtsync.apk | cut -d' ' -f1)" + cat > dist/thoughtsync-android.json <` is the immutable rollback unit (rule 46) + # and rebuilding it with different content would make it neither. + # + # So on such a push this workflow stands down, and the Android lane dispatches it + # when it is finished. Exactly one image per commit, containing the client from + # that commit. + # + # The path list below MUST match android.yml's trigger. Two places holding one + # decision is the recurring failure in this repo (issues 2181-2183); it is here + # because a workflow cannot read another's filters, and it is a `git diff` rather + # than a config so at least it is inspectable in the log. + gate: + name: Build now, or wait for Android? + if: github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') + runs-on: python-ci + container: + image: git.fabledsword.com/bvandeusen/ci-python:3.14 + outputs: + build: ${{ steps.decide.outputs.build }} + steps: + - uses: actions/checkout@v6 + with: + # Full history: the diff below spans the whole PUSHED RANGE, not just the + # tip. A push of three commits whose Android change sits in the first + # would otherwise look Android-free, and the race this job exists to + # prevent would happen anyway — silently, which is the worst version. + fetch-depth: 0 + + - name: Decide + id: decide + run: | + # A dispatched run IS the Android lane calling back. Always build. + if [ "${{ github.event_name }}" != "push" ]; then + echo "Dispatched by the Android lane — building." + echo "build=true" >> $GITHUB_OUTPUT + exit 0 + fi + + # A tag. The Android lane does not run on tags, so nothing would ever + # call back — standing down here would mean a release tag that never + # produces an image at all. + case "${{ github.ref }}" in + refs/tags/*) + echo "Tag build — the Android lane does not run on tags. Building." + echo "build=true" >> $GITHUB_OUTPUT + exit 0 + ;; + esac + + # No parent (first commit, or a force-push that orphaned it) — nothing to + # compare, so build rather than stall. + if ! git rev-parse --verify -q HEAD^ >/dev/null; then + echo "No parent commit to diff against — building." + echo "build=true" >> $GITHUB_OUTPUT + exit 0 + fi + + # The whole push, not just its tip. `before` is what the ref pointed at + # beforehand; it is absent or all-zeros for a brand-new branch, and may + # be unreachable after a force-push — fall back to the tip commit then. + before="${{ github.event.before }}" + if [ -n "$before" ] \ + && [ "$before" != "0000000000000000000000000000000000000000" ] \ + && git cat-file -e "$before^{commit}" 2>/dev/null; then + range="$before..HEAD" + else + range="HEAD^..HEAD" + fi + echo "Comparing $range" + + changed="$(git diff --name-only $range)" + echo "Changed in this push:" + echo "$changed" | sed 's/^/ /' + + if echo "$changed" | grep -qE '^(android/|core/|Cargo\.toml$|Cargo\.lock$|\.forgejo/workflows/android\.yml$)'; then + echo "" + echo "This push also changes the Android client. Standing down: the" + echo "Android lane will publish a new APK and dispatch this workflow," + echo "so the image is built once, with the client from this commit." + echo "build=false" >> $GITHUB_OUTPUT + else + echo "" + echo "No Android change — the newest published client is already the" + echo "right one to bake in. Building." + echo "build=true" >> $GITHUB_OUTPUT + fi + typecheck: name: TypeScript typecheck if: github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') @@ -95,8 +191,8 @@ jobs: # Build gates on lint + typecheck. The `test` job runs in parallel for # visibility but does not block dev image builds (DB-backed integration # testing happens against the dev image manually, not on every push). - needs: [typecheck, lint] - if: github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') + needs: [gate, typecheck, lint] + if: needs.gate.outputs.build == 'true' runs-on: python-ci container: image: git.fabledsword.com/bvandeusen/ci-python:3.14 @@ -136,6 +232,43 @@ jobs: docker system prune -af || true docker builder prune --keep-storage 5g -f || true + # Bake the Android client in, on EVERY image build, so :dev, :latest and + # : all carry one and a `docker compose pull` delivers a new client + # along with the new server. + # + # Always the rolling `dev` release — the newest build there is. A versioned + # image therefore carries the newest client rather than one pinned to that + # version; the two negotiate a sync protocol version before linking, so + # "newest" is safe in a way "matching" would not buy anything over. + # + # Fetched by the JOB, not by the Dockerfile: the release is private, and a + # token used inside a build lands in the context or a layer. + # + # NEVER fails the build. An image with no Android client advertises none and + # hides the download — a supported state, and the only one available before + # the first Android build has ever published. + - name: Fetch the Android client to bake in + env: + GITHUB_TOKEN: ${{ github.token }} + run: | + mkdir -p client + base="${{ github.server_url }}/${{ github.repository }}/releases/download/dev" + ok=1 + for f in thoughtsync.apk thoughtsync-android.json; do + curl -fsSL -H "Authorization: token $GITHUB_TOKEN" -o "client/$f" "$base/$f" || ok=0 + done + if [ "$ok" = 1 ]; then + echo "Baking in:" + cat client/thoughtsync-android.json + ls -l client/thoughtsync.apk + else + # Both or neither. Half a pair is worse than none: the server would + # read a sidecar describing an APK that isn't there, or an APK it + # cannot state a version for. + echo "::warning::No Android client on the dev release — this image ships without one." + rm -f client/thoughtsync.apk client/thoughtsync-android.json + fi + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v4 diff --git a/.forgejo/workflows/desktop.yml b/.forgejo/workflows/desktop.yml index e5ff048..ff5cd1f 100644 --- a/.forgejo/workflows/desktop.yml +++ b/.forgejo/workflows/desktop.yml @@ -1,6 +1,13 @@ -# Tauri desktop (Linux) build — SEPARATE from ci.yml on purpose: this is a heavy -# Rust + AppImage build (~20-40 min) that should NOT run on backend/frontend-only -# pushes. Scoped to desktop/** (+ this file). Produces the .deb and .AppImage. +# Tauri desktop (Linux) build — SEPARATE from ci.yml on purpose: a Rust + AppImage +# build that shouldn't run on server-only pushes. Produces the .deb and .AppImage. +# +# It DOES run on frontend changes. tauri's generate_context! embeds the built +# frontend in the binary, so a frontend commit that never triggers this ships to +# the web and silently never reaches the desktop app — and desktop, web and Android +# are peer surfaces held to one quality bar, not a primary and its fallbacks. The +# filter was once narrowed to the adapter/bridge directories against a "~20-40 min" +# build; measured runs are 4-5 minutes, so the cost that justified the narrowing +# isn't there. # # Toolchain comes from the ci-tauri image (Rust + Node + WebKitGTK 4.1 + tauri-cli); # runs-on is just a registered scheduling label (Label Model B), not a per-purpose @@ -13,10 +20,23 @@ on: tags: ["v*"] paths: - "desktop/**" - # The desktop app embeds the frontend, and the data seam / Tauri bridge are - # what the offline core rides on — rebuild the app when those change too. - - "frontend/src/adapters/**" - - "frontend/src/desktop/**" + # The shared client core (store + sync engine) the desktop wraps. Its own + # crate since the Android client binds the same code, so a change there is a + # change to this app even though nothing under desktop/ moved. + - "core/**" + # The Android uniffi shim. It builds no desktop artifact, but it is a + # workspace member, so this lane's `cargo clippy --all-targets` is what + # compiles and lints it — and until the Android lane exists (M12 step 5), + # it is the ONLY thing that does. + - "android/**" + # The workspace manifest and lockfile, which now live at the repo root. + - "Cargo.toml" + - "Cargo.lock" + # The whole frontend, not just the adapter/bridge seam: it is compiled INTO + # the desktop binary, so any part of it changing means the shipped app is out + # of date. Config and lockfile included — a dependency bump changes the bundle + # as surely as a component does. + - "frontend/**" - ".forgejo/workflows/desktop.yml" workflow_dispatch: @@ -52,21 +72,63 @@ jobs: run: npm ci && npm run build working-directory: frontend - - name: Rust format check - run: cargo fmt --check - working-directory: desktop/src-tauri - + # --locked on the FIRST cargo invocation of the job is the lockfile gate: it + # fails the run if Cargo.toml and the committed Cargo.lock disagree, instead + # of silently re-resolving. Everything after it in this job then compiles the + # exact versions recorded in the lockfile, so the flag isn't repeated on the + # bundle build (issue 2102). + # + # Run from the REPO ROOT with --workspace, not from desktop/src-tauri. + # + # These three steps used to run inside the desktop crate, which was right when + # it was the only Rust in the repo. After the core was extracted (M12 step 1) + # it silently stopped being right: cargo scoped to the desktop PACKAGE, so the + # core's 89 tests stopped running and nothing lints the Android uniffi shim at + # all. Both crates are dependencies of the desktop, so they still COMPILED — + # which is exactly why the gap was invisible, and why a green run kept meaning + # less than it looked like it meant. - name: Clippy - run: cargo clippy --all-targets -- -D warnings - working-directory: desktop/src-tauri + run: cargo clippy --locked --workspace --all-targets -- -D warnings - name: Test - run: cargo test - working-directory: desktop/src-tauri + run: cargo test --locked --workspace + + # Deliberately AFTER clippy + test, not before. + # + # It's the cheapest check, so fail-fast ordering would normally put it first — + # but there is no Rust toolchain on the workstation (the desktop lane is + # verified entirely here), so a formatting nit failing first SKIPS clippy and + # the tests, and one CI cycle teaches nothing but whitespace. Running it here + # means every push reports its real problems too. Still before the ~20-40 min + # bundle build, so a fmt failure doesn't burn that. + - name: Rust format check + run: cargo fmt --all --check # Frontend already built above; skip the beforeBuildCommand rebuild. + # + # createUpdaterArtifacts is applied only when a signing key exists (M10.9): + # tauri FAILS the build if it's asked to produce updater artifacts with no key, + # so making it conditional is what lets the pipeline stay green before the + # operator has added the secret. With the key present, each bundle gets a + # `.sig` beside it — the file the updater actually verifies against. - name: Tauri build (deb + AppImage) - run: cargo tauri build --config '{"build":{"beforeBuildCommand":""}}' + env: + TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} + TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }} + run: | + updater='{}' + if [ -n "${TAURI_SIGNING_PRIVATE_KEY:-}" ]; then + echo "Signing key present — producing updater artifacts." + updater='{"bundle":{"createUpdaterArtifacts":true}}' + else + echo "No TAURI_SIGNING_PRIVATE_KEY — building unsigned, no updater artifacts." + fi + version="$(sh ../packaging/build-version.sh)" + echo "Building version $version" + cargo tauri build \ + --config '{"build":{"beforeBuildCommand":""}}' \ + --config "{\"version\":\"$version\"}" \ + --config "$updater" working-directory: desktop/src-tauri # Tauri's AppImage bundles the build host's graphics/display libs @@ -78,6 +140,28 @@ jobs: - name: De-bundle AppImage graphics libraries run: bash desktop/packaging/appimage/debundle-graphics.sh + # MUST run after de-bundling, not before. The step above DELETES the AppImage + # and repackages it, so the signature tauri produced during the build now + # describes a file that no longer exists. Publishing that stale .sig would make + # every Linux update fail verification — and the error names a signature + # mismatch, which points nowhere near "a later build step rewrote the file". + # Windows needs no equivalent: nothing post-processes the NSIS installer. + - name: Re-sign the de-bundled AppImage + env: + TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} + TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }} + run: | + if [ -z "${TAURI_SIGNING_PRIVATE_KEY:-}" ]; then + echo "No signing key — the build produced no signature to replace." + exit 0 + fi + appimage="$(find target/release/bundle/appimage -name '*.AppImage' -type f | head -1)" + [ -n "$appimage" ] || { echo "ERROR: no AppImage found to re-sign" >&2; exit 1; } + rm -f "$appimage.sig" + cargo tauri signer sign "$appimage" + [ -s "$appimage.sig" ] || { echo "ERROR: re-signing produced no .sig" >&2; exit 1; } + echo "Re-signed $(basename "$appimage")" + # install.sh hands the .deb to every Debian/Ubuntu user, so the package's # Depends must be right BEFORE a release exists. Prints the generated # control file and cross-checks it against what the ELF actually needs @@ -101,20 +185,25 @@ jobs: run: bash desktop/packaging/arch/package-prebuilt.sh # Make the built .deb + .AppImage downloadable from the run (for hand-testing). - # continue-on-error: the Forgejo artifact backend may not be configured yet; a - # failed upload must not fail the build itself. - # Forgejo doesn't support the v4 artifact protocol (@actions/artifact v2+), - # so pin v3, which uses the older protocol the instance accepts. + # Mirrored action, never actions/upload-artifact: @v4+ throws + # GHESNotSupportedError on the hostname before it connects, and @v3 uploads + # something Gitea stores but will never serve back (it returns artifacts only + # through the v4 API, which filters on content_encoding='application/zip'). + # Pinned by SHA — the mirror auto-syncs, so a moved upstream tag would + # silently change what runs. See Scribe issues 2255 / 2270. + # No continue-on-error: a swallowed upload failure is exactly how 110 + # unreachable artifacts accumulated here unnoticed. Fail loudly instead. - name: Upload bundles - continue-on-error: true - uses: actions/upload-artifact@v3 + uses: https://git.fabledsword.com/bvandeusen/upload-artifact@cb8afe72b42edc798abfb8fcb556cf660d894245 with: name: thoughtsync-linux path: | - desktop/src-tauri/target/release/bundle/appimage/*.AppImage - desktop/src-tauri/target/release/bundle/deb/*.deb - desktop/src-tauri/target/release/bundle/arch/*.pkg.tar.* - if-no-files-found: warn + target/release/bundle/appimage/*.AppImage + target/release/bundle/deb/*.deb + target/release/bundle/arch/*.pkg.tar.* + # error, not warn: a build that bundles nothing should report as a + # failure, not as a green run with an empty artifact. + if-no-files-found: error # Tag builds only: publish a real, versioned Fabled-Git Release with the # AppImage + .deb attached — the stable fetch target the install script and @@ -126,3 +215,184 @@ jobs: env: GITHUB_TOKEN: ${{ github.token }} run: bash desktop/packaging/publish-release.sh + + # The rolling DEVELOPMENT channel (M10.9): a release whose tag never moves, so + # the updater has a permanent URL to read — Forgejo has no + # /releases/latest/download/ route, so "newest" can't be named in a URL. + # + # Gated on the signing key INSIDE the script rather than with an `if:`, because + # the secrets context isn't reliably available to step conditions. Publishing + # bundles the app would then refuse to verify is worse than publishing nothing: + # it looks like a working feed. + - name: Publish to the dev channel + if: github.ref == 'refs/heads/dev' + env: + GITHUB_TOKEN: ${{ github.token }} + TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} + RELEASE_TAG: dev + RELEASE_PRERELEASE: "true" + run: | + if [ -z "${TAURI_SIGNING_PRIVATE_KEY:-}" ]; then + echo "No TAURI_SIGNING_PRIVATE_KEY — skipping the dev channel publish." + exit 0 + fi + bash desktop/packaging/publish-release.sh + + # Windows installer, CROSS-COMPILED from Linux — there is no Windows build host. + # A Windows container can't run on a Linux host (containers share the host + # kernel), so cross-compiling is the only route without Windows hardware: + # cargo-xwin + LLVM's lld-link + makensis are Linux programs that emit Windows + # PE output. That toolchain is why this needs its own image rather than ci-tauri. + # + # NSIS only. `.msi` needs WiX v3, which is a Windows program — Tauri: ".msi + # installers can only be created on Windows". It returns if a Windows node does. + # + # A separate job, so a Windows-side failure never blocks the Linux artifacts that + # are the primary product today. Tauri calls this path "not tested as much" and a + # last resort, and nothing here can LAUNCH a Windows binary — green means it + # built, not that it runs. A real-machine check stays mandatory before trusting it. + windows: + name: Windows installer (cross-compiled) + if: github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') + runs-on: python-ci + container: + image: git.fabledsword.com/bvandeusen/ci-tauri-win:1.97 + steps: + - uses: actions/checkout@v6 + + # Same reason as the Linux job: generate_context! embeds the built frontend + # at compile time, so it must exist before cargo runs. + - name: Build the shared frontend + run: npm ci && npm run build + working-directory: frontend + + # tauri-build generates a Windows Resource file and needs `icons/icon.ico`, + # which the repo doesn't carry — only the PNG set the Linux bundles use. + # Generating it from the committed 1024px source keeps one icon of record + # instead of a hand-made .ico that could silently drift from the brand art. + # Linux doesn't need this step, which is why it lives here and not in `build`. + - name: Generate the Windows icon set + run: cargo tauri icon app-icon.png + working-directory: desktop/src-tauri + + # This lane's lockfile gate (the Linux job gets it from `cargo clippy + # --locked`). It has to be its own step here because the build is this job's + # only crate-graph command, and discovering the drift 30 minutes into a + # cross-compile is the expensive way to learn it. Fetching for the Windows + # target also pre-warms exactly the crates the build will want. + - name: Verify the lockfile and fetch dependencies + run: cargo fetch --locked --target x86_64-pc-windows-msvc + working-directory: desktop/src-tauri + + # --runner cargo-xwin swaps cargo for the cross-compiling driver (it supplies + # the MSVC CRT/SDK, pre-warmed into the image, and links with lld-link). + # Frontend already built above; skip the beforeBuildCommand rebuild. + - name: Tauri build (NSIS installer) + env: + TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} + TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }} + run: | + version="$(sh ../packaging/build-version.sh)" + echo "Building version $version" + updater='{}' + if [ -n "${TAURI_SIGNING_PRIVATE_KEY:-}" ]; then + updater='{"bundle":{"createUpdaterArtifacts":true}}' + fi + cargo tauri build \ + --runner cargo-xwin \ + --target x86_64-pc-windows-msvc \ + --bundles nsis \ + --config '{"build":{"beforeBuildCommand":""}}' \ + --config "{\"version\":\"$version\"}" \ + --config "$updater" + working-directory: desktop/src-tauri + + # Mirrored action, never actions/upload-artifact — see the Linux job's + # Upload bundles step for the full reasoning. Pinned by SHA because the + # mirror auto-syncs. + - name: Upload installer + uses: https://git.fabledsword.com/bvandeusen/upload-artifact@cb8afe72b42edc798abfb8fcb556cf660d894245 + with: + name: thoughtsync-windows + path: target/x86_64-pc-windows-msvc/release/bundle/nsis/*.exe + if-no-files-found: error + + # Publishes to the SAME release as the Linux job. Safe to run twice: the + # script reuses an existing release (409) and nullglob means each job uploads + # only the bundles present in its own workspace. + - name: Publish release + if: startsWith(github.ref, 'refs/tags/v') + env: + GITHUB_TOKEN: ${{ github.token }} + run: bash desktop/packaging/publish-release.sh + + # The rolling DEVELOPMENT channel (M10.9): a release whose tag never moves, so + # the updater has a permanent URL to read — Forgejo has no + # /releases/latest/download/ route, so "newest" can't be named in a URL. + # + # Gated on the signing key INSIDE the script rather than with an `if:`, because + # the secrets context isn't reliably available to step conditions. Publishing + # bundles the app would then refuse to verify is worse than publishing nothing: + # it looks like a working feed. + - name: Publish to the dev channel + if: github.ref == 'refs/heads/dev' + env: + GITHUB_TOKEN: ${{ github.token }} + TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} + RELEASE_TAG: dev + RELEASE_PRERELEASE: "true" + run: | + if [ -z "${TAURI_SIGNING_PRIVATE_KEY:-}" ]; then + echo "No TAURI_SIGNING_PRIVATE_KEY — skipping the dev channel publish." + exit 0 + fi + bash desktop/packaging/publish-release.sh + + # The updater manifest, written AFTER both bundle jobs — they run in separate + # workspaces and neither can see the other's output, but one latest.json has to + # describe both platforms. Building it inside either job would silently omit the + # other, and a missing platform reads to a user as "no update available" rather + # than as a broken feed. + # + # Reads what actually landed on the channel release, so it can never advertise a + # bundle that failed to upload. + manifest: + name: Update manifest + needs: [build, windows] + if: github.ref == 'refs/heads/dev' || startsWith(github.ref, 'refs/tags/v') + runs-on: python-ci + container: + image: git.fabledsword.com/bvandeusen/ci-tauri:1.97 + steps: + - uses: actions/checkout@v6 + + - name: Write and publish latest.json + env: + GITHUB_TOKEN: ${{ github.token }} + TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} + run: | + if [ -z "${TAURI_SIGNING_PRIVATE_KEY:-}" ]; then + echo "No TAURI_SIGNING_PRIVATE_KEY — nothing was signed, so there is no" + echo "manifest to write. Add the secret to enable in-app updates." + exit 0 + fi + # The SAME helper the bundles were built with — a second derivation here + # could drift, and a manifest whose version doesn't match the binary it + # points at is an updater that never settles. + version="$(sh desktop/packaging/build-version.sh)" + if [ "${GITHUB_REF_NAME}" = "dev" ]; then + export RELEASE_TAG=dev + export RELEASE_NOTES="Development build from ${GITHUB_SHA}" + # Rolling channel: drop the previous build's bundles once the manifest + # points at this one. Nothing can reach them, and they're ~100 MB a push. + export PRUNE_OLD_ASSETS=true + APP_VERSION="$version" bash desktop/packaging/write-manifest.sh + else + export RELEASE_TAG="${GITHUB_REF_NAME}" + export RELEASE_NOTES="ThoughtSync ${GITHUB_REF_NAME}" + # Twice: once onto the versioned release itself, and once onto the + # permanent `stable` pointer the app actually reads. Same manifest both + # times — its URLs point at the versioned assets either way. + APP_VERSION="$version" bash desktop/packaging/write-manifest.sh + APP_VERSION="$version" MANIFEST_TAG=stable bash desktop/packaging/write-manifest.sh + fi diff --git a/.gitignore b/.gitignore index 36b13f1..a3d7f3a 100644 --- a/.gitignore +++ b/.gitignore @@ -174,3 +174,40 @@ cython_debug/ # PyPI configuration file .pypirc + +# Rust workspace build output (one target dir for core + desktop + android) +/target/ + +# Android / Gradle build output. +# +# `local.properties` holds the machine's SDK path — it is per-workstation and +# must never be committed; CI gets the SDK from ANDROID_HOME in the image. +# The wrapper JAR is deliberately NOT ignored: it is how a clean checkout gets +# the right Gradle without one installed first. +android/.gradle/ +android/build/ +android/app/build/ +android/local.properties +.kotlin/ + +# Locally-downloaded APKs for emulator/device testing. +# +# CI builds these and attaches them to the run as artifacts; a copy sitting in +# the working tree is a convenience, never a source. Ignored because they are +# ~57 MB and `git add -A` would otherwise put one in history forever. +*.apk + +# Signing material. NEVER committed — an Android signing key cannot be rotated +# without the original (v3 lineage needs it), so a leaked or lost one means every +# install has to be removed and replaced by hand. Listed before any keystore +# exists so that generating one in this directory cannot go wrong. +*.jks +*.keystore +*.p12 +*.b64 + +# The Android client CI bakes into the server image. Fetched fresh on every image +# build, so it is never worth 55 MiB of git history. client/.keep IS tracked, so +# the Dockerfile's COPY always has a directory to copy. +client/thoughtsync.apk +client/thoughtsync-android.json diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..223732e --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,5709 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "adler2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" + +[[package]] +name = "ahash" +version = "0.8.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "aho-corasick" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c982642fa9e8606056828ee9a8505737230110bb1099153c79efe865c59d12ba" +dependencies = [ + "memchr", +] + +[[package]] +name = "alloc-no-stdlib" +version = "2.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" + +[[package]] +name = "alloc-stdlib" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e76a019e91224d279006ff972f1e984179a6e9feb050adba6ce8274aef23195" +dependencies = [ + "alloc-no-stdlib", +] + +[[package]] +name = "android_log-sys" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84521a3cf562bc62942e294181d9eef17eb38ceb8c68677bc49f144e4c3d4f8d" + +[[package]] +name = "android_logger" +version = "0.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbb4e440d04be07da1f1bf44fb4495ebd58669372fe0cffa6e48595ac5bd88a3" +dependencies = [ + "android_log-sys", + "env_filter", + "log", +] + +[[package]] +name = "android_system_properties" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae221649c9976a6f6c56ae1facf410f3ddb33cc661c4b7b61020a912d4237fbc" +dependencies = [ + "libc", +] + +[[package]] +name = "anstyle" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000" + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3d036a3c4ab069c7b410a2ce876bd74808d2d0888a82667669f8e783a898bf1" +dependencies = [ + "derive_arbitrary", +] + +[[package]] +name = "askama" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1bf825125edd887a019d0a3a837dcc5499a68b0d034cc3eb594070c3e18addc" +dependencies = [ + "askama_macros", + "itoa", + "percent-encoding", + "serde", + "serde_json", +] + +[[package]] +name = "askama_derive" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1c7065972a130eafa84215f21352ae15b4a7393da48c1f5e103904490736738" +dependencies = [ + "askama_parser", + "basic-toml", + "glob", + "memchr", + "proc-macro2", + "quote", + "rustc-hash", + "serde", + "serde_derive", + "syn 2.0.119", +] + +[[package]] +name = "askama_macros" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e23b1d2c4bd39a41971f6124cef4cc6fd0540913ecb90919b69ab3bbe44ae1a" +dependencies = [ + "askama_derive", +] + +[[package]] +name = "askama_parser" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7db09fde9143e7ac4513358fb32ee32847125b63b18ea715afd487956da715da" +dependencies = [ + "rustc-hash", + "serde", + "serde_derive", + "unicode-ident", + "winnow 1.0.4", +] + +[[package]] +name = "async-compat" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1ba85bc55464dcbf728b56d97e119d673f4cf9062be330a9a26f3acf504a590" +dependencies = [ + "futures-core", + "futures-io", + "once_cell", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "atk" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "241b621213072e993be4f6f3a9e4b45f65b7e6faad43001be957184b7bb1824b" +dependencies = [ + "atk-sys", + "glib", + "libc", +] + +[[package]] +name = "atk-sys" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5e48b684b0ca77d2bbadeef17424c2ea3c897d44d566a1617e7e8f30614d086" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[package]] +name = "autocfg" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" + +[[package]] +name = "base64" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "basic-toml" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba62675e8242a4c4e806d12f11d136e626e6c8361d6b829310732241652a178a" +dependencies = [ + "serde", +] + +[[package]] +name = "bit-set" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b588b76d00fde79687d7646a9b5bdf3cc0f655e0bbd080335a95d7e96f3587da" +dependencies = [ + "serde_core", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "block2" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdeb9d870516001442e364c5220d3574d2da8dc765554b4a617230d33fa58ef5" +dependencies = [ + "objc2", +] + +[[package]] +name = "brotli" +version = "8.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cc91aac060a7a1e25823bdccbfb6af1875b88f17c6daac97894eed8207166b3" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", + "brotli-decompressor", +] + +[[package]] +name = "brotli-decompressor" +version = "5.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a32acac15fe1967bc3986b2a6347dffc965602354ea6f450ad07e8bfd253583" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", +] + +[[package]] +name = "bs58" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "bumpalo" +version = "3.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649" + +[[package]] +name = "bytemuck" +version = "1.25.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95832e849adfb21180ccb6826a99da14e5d266ae5c2e668e1602cf234f153797" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04" +dependencies = [ + "serde", +] + +[[package]] +name = "cairo-rs" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ca26ef0159422fb77631dc9d17b102f253b876fe1586b03b803e63a309b4ee2" +dependencies = [ + "bitflags 2.13.1", + "cairo-sys-rs", + "glib", + "libc", + "once_cell", + "thiserror 1.0.69", +] + +[[package]] +name = "cairo-sys-rs" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "685c9fa8e590b8b3d678873528d83411db17242a73fccaed827770ea0fedda51" +dependencies = [ + "glib-sys", + "libc", + "system-deps", +] + +[[package]] +name = "camino" +version = "1.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb1307f12aa967b5a58416e87b3653360e0fd614a016b6e970db08fecbb1b80d" +dependencies = [ + "serde_core", +] + +[[package]] +name = "cargo-platform" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e35af189006b9c0f00a064685c727031e3ed2d8020f7ba284d78cc2671bd36ea" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo-platform" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd0061da739915fae12ea00e16397555ed4371a6bb285431aab930f61b0aa4ba" +dependencies = [ + "serde", + "serde_core", +] + +[[package]] +name = "cargo_metadata" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd5eb614ed4c27c5d706420e4320fbe3216ab31fa1c33cd8246ac36dae4479ba" +dependencies = [ + "camino", + "cargo-platform 0.1.9", + "semver", + "serde", + "serde_json", + "thiserror 2.0.20", +] + +[[package]] +name = "cargo_metadata" +version = "0.23.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef987d17b0a113becdd19d3d0022d04d7ef41f9efe4f3fb63ac44ba61df3ade9" +dependencies = [ + "camino", + "cargo-platform 0.3.3", + "semver", + "serde", + "serde_json", + "thiserror 2.0.20", +] + +[[package]] +name = "cargo_toml" +version = "0.22.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "374b7c592d9c00c1f4972ea58390ac6b18cbb6ab79011f3bdc90a0b82ca06b77" +dependencies = [ + "serde", + "toml 0.9.12+spec-1.1.0", +] + +[[package]] +name = "cc" +version = "1.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "509591b7bcd67f4ef775afad7662703b4935daaa6ec0e5605cfb1090b32a2b6d" +dependencies = [ + "find-msvc-tools", + "shlex", +] + +[[package]] +name = "cesu8" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" + +[[package]] +name = "cfb" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d38f2da7a0a2c4ccf0065be06397cc26a81f4e528be095826eee9d4adbb8c60f" +dependencies = [ + "byteorder", + "fnv", + "uuid", +] + +[[package]] +name = "cfg-expr" +version = "0.15.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d067ad48b8650848b989a59a86c6c36a995d02d2bf778d45c3c5d57bc2718f02" +dependencies = [ + "smallvec", + "target-lexicon", +] + +[[package]] +name = "cfg-if" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" + +[[package]] +name = "chrono" +version = "0.4.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aa79e62e7697b8e29b513a68abacf485adcd1fe8284a4316c5ae868e6633327" +dependencies = [ + "iana-time-zone", + "num-traits", + "serde", + "windows-link 0.2.1", +] + +[[package]] +name = "clap" +version = "4.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "473c7e07f409a8d772161724aa8db6a765a2532a70f9667eeb7b49d3d02fbdca" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b48fea5a88e9ae728a2dcbedbfc0e730f7d60da42e1cb049a83c9fb8b789889" +dependencies = [ + "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 0.5.0", + "proc-macro2", + "quote", + "syn 3.0.3", +] + +[[package]] +name = "clap_lex" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9" + +[[package]] +name = "combine" +version = "4.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" +dependencies = [ + "bytes", + "memchr", +] + +[[package]] +name = "cookie" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a373e3602691c3cdea496d2f0ee5935151e6168fe87739483c463db1b2f2f87" +dependencies = [ + "time", + "version_check", +] + +[[package]] +name = "core-foundation" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "core-graphics" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "064badf302c3194842cf2c5d61f56cc88e54a759313879cdf03abdd27d0c3b97" +dependencies = [ + "bitflags 2.13.1", + "core-foundation", + "core-graphics-types", + "foreign-types 0.5.0", + "libc", +] + +[[package]] +name = "core-graphics-types" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d44a101f213f6c4cdc1853d4b78aef6db6bdfa3468798cc1d9912f4735013eb" +dependencies = [ + "bitflags 2.13.1", + "core-foundation", + "libc", +] + +[[package]] +name = "cpufeatures" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] + +[[package]] +name = "crc32fast" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crossbeam-channel" +version = "0.5.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d85363c37faeca707aef026efa9f3b34d077bce547e48f770770625c6013679e" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61803da095bee82a81bb1a452ecc25d3b2f1416d1897eb86430c6159ef717c17" + +[[package]] +name = "crypto-common" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "cssparser" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dae61cf9c0abb83bd659dab65b7e4e38d8236824c85f0f804f173567bda257d2" +dependencies = [ + "cssparser-macros", + "dtoa-short", + "itoa", + "phf", + "smallvec", +] + +[[package]] +name = "cssparser-macros" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" +dependencies = [ + "quote", + "syn 2.0.119", +] + +[[package]] +name = "ctor" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "352d39c2f7bef1d6ad73db6f5160efcaed66d94ef8c6c573a8410c00bf909a98" +dependencies = [ + "ctor-proc-macro", + "dtor", +] + +[[package]] +name = "ctor-proc-macro" +version = "0.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52560adf09603e58c9a7ee1fe1dcb95a16927b17c127f0ac02d6e768a0e25bc1" + +[[package]] +name = "darling" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25ae13da2f202d56bd7f91c25fba009e7717a1e4a1cc98a76d844b65ae912e9d" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9865a50f7c335f53564bb694ef660825eb8610e0a53d3e11bf1b0d3df31e03b0" +dependencies = [ + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.119", +] + +[[package]] +name = "darling_macro" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3984ec7bd6cfa798e62b4a642426a5be0e68f9401cfc2a01e3fa9ea2fcdb8d" +dependencies = [ + "darling_core", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "dbus" +version = "0.9.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ab69f03cc8c4340c9c8e315114e1658e6775a9b16a04357973aa21cec22b32e" +dependencies = [ + "libc", + "libdbus-sys", + "windows-sys 0.61.2", +] + +[[package]] +name = "defmt" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2953bfe4f93bbd20cc71198842756f77d161884c99ebbabc41d80231ded88d1" +dependencies = [ + "bitflags 1.3.2", + "defmt-macros", +] + +[[package]] +name = "defmt-macros" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bad9c72e7ca2137e0dc3813245a0d282fd6daad32fd800af018306a9169b5fe8" +dependencies = [ + "defmt-parser", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "defmt-parser" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10d60334b3b2e7c9d91ef8150abfb6fa4c1c39ebbcf4a81c2e346aad939fee3e" +dependencies = [ + "thiserror 2.0.20", +] + +[[package]] +name = "deranged" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c" +dependencies = [ + "serde_core", +] + +[[package]] +name = "derive_arbitrary" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e567bd82dcff979e4b03460c307b3cdc9e96fde3d73bed1496d2bc75d9dd62a" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "derive_more" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d751e9e49156b02b44f9c1815bcb94b984cdcc4396ecc32521c739452808b134" +dependencies = [ + "derive_more-impl", +] + +[[package]] +name = "derive_more-impl" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "799a97264921d8623a957f6c3b9011f3b5492f557bbb7a5a19b7fa6d06ba8dcb" +dependencies = [ + "proc-macro2", + "quote", + "rustc_version", + "syn 2.0.119", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", +] + +[[package]] +name = "dirs" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e" +dependencies = [ + "dirs-sys", +] + +[[package]] +name = "dirs-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab" +dependencies = [ + "libc", + "option-ext", + "redox_users", + "windows-sys 0.61.2", +] + +[[package]] +name = "dispatch2" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e0e367e4e7da84520dedcac1901e4da967309406d1e51017ae1abfb97adbd38" +dependencies = [ + "bitflags 2.13.1", + "block2", + "libc", + "objc2", +] + +[[package]] +name = "displaydoc" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6232dd377dcc64799954cbd3a9bb882e9cdc1308ccd87b1c098f1fb2eaf82a8" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.3", +] + +[[package]] +name = "dlopen2" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e2c5bd4158e66d1e215c49b837e11d62f3267b30c92f1d171c4d3105e3dc4d4" +dependencies = [ + "dlopen2_derive", + "libc", + "once_cell", + "winapi", +] + +[[package]] +name = "dlopen2_derive" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fbbb781877580993a8707ec48672673ec7b81eeba04cfd2310bd28c08e47c8f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "dom_query" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "521e380c0c8afb8d9a1e83a1822ee03556fc3e3e7dbc1fd30be14e37f9cb3f89" +dependencies = [ + "bit-set", + "cssparser", + "foldhash", + "html5ever", + "precomputed-hash", + "selectors", + "tendril", +] + +[[package]] +name = "dpi" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8b14ccef22fc6f5a8f4d7d768562a182c04ce9a3b3157b91390b52ddfdf1a76" +dependencies = [ + "serde", +] + +[[package]] +name = "dtoa" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c3cf4824e2d5f025c7b531afcb2325364084a16806f6d47fbc1f5fbd9960590" + +[[package]] +name = "dtoa-short" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd1511a7b6a56299bd043a9c167a6d2bfb37bf84a6dfceaba651168adfb43c87" +dependencies = [ + "dtoa", +] + +[[package]] +name = "dtor" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1057d6c64987086ff8ed0fd3fbf377a6b7d205cc7715868cd401705f715cbe4" +dependencies = [ + "dtor-proc-macro", +] + +[[package]] +name = "dtor-proc-macro" +version = "0.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f678cf4a922c215c63e0de95eb1ff08a958a81d47e485cf9da1e27bf6305cfa5" + +[[package]] +name = "dunce" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" + +[[package]] +name = "dyn-clone" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" + +[[package]] +name = "embed-resource" +version = "3.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbfdaacccebec3b28e4866b8973543c7647797db5ada1bdab552e48fe665fbbd" +dependencies = [ + "cc", + "memchr", + "rustc_version", + "toml 1.1.4+spec-1.1.0", + "vswhom", + "winreg", +] + +[[package]] +name = "embed_plist" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ef6b89e5b37196644d8796de5268852ff179b44e96276cf4290264843743bb7" + +[[package]] +name = "env_filter" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bf3c259d255ca70051b30e2e95b5446cdb8949ac4cd22c0d7fd634d89f568e2" +dependencies = [ + "log", + "regex", +] + +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "erased-serde" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2add8a07dd6a8d93ff627029c51de145e12686fbc36ecb298ac22e74cf02dec" +dependencies = [ + "serde", + "serde_core", + "typeid", +] + +[[package]] +name = "errno" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "fallible-iterator" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649" + +[[package]] +name = "fallible-streaming-iterator" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a" + +[[package]] +name = "fastrand" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223" + +[[package]] +name = "fdeflate" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c" +dependencies = [ + "simd-adler32", +] + +[[package]] +name = "fern" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4316185f709b23713e41e3195f90edef7fb00c3ed4adc79769cf09cc762a3b29" +dependencies = [ + "log", +] + +[[package]] +name = "field-offset" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38e2275cc4e4fc009b0669731a1e5ab7ebf11f469eaede2bab9309a5b4d6057f" +dependencies = [ + "memoffset", + "rustc_version", +] + +[[package]] +name = "filetime" +version = "0.2.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c287a33c7f0a620c38e641e7f60827713987b3c0f26e8ddc9462cc69cf75759" +dependencies = [ + "cfg-if", + "libc", +] + +[[package]] +name = "find-msvc-tools" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d45db016d36b838f563236e9193d0ee6ce38f3f68b6c94e914b4929c96bbb890" + +[[package]] +name = "flate2" +version = "1.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foldhash" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" + +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared 0.1.1", +] + +[[package]] +name = "foreign-types" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" +dependencies = [ + "foreign-types-macros", + "foreign-types-shared 0.3.1", +] + +[[package]] +name = "foreign-types-macros" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea5190182e6915eb873ddbc16e23b711b6eb1f9c00a0d0a3a91b5f6228475225" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.3", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + +[[package]] +name = "foreign-types-shared" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" + +[[package]] +name = "form_urlencoded" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "fs-err" +version = "3.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b91aa448ca50d7e79433bdf3ee8d99215430d2ec02ade5aefab2a073a1822e8a" +dependencies = [ + "autocfg", +] + +[[package]] +name = "futures-channel" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f9e3d69d39e4862ffed03ed071a76f9a13ba1d9109d355b0f0aa6b15e393c4" +dependencies = [ + "futures-core", +] + +[[package]] +name = "futures-core" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92d699e522242e69e3003b94ecc1f960f3a5e015aa7c5d7486e65ad01dd94f5e" + +[[package]] +name = "futures-executor" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "031b47cf1a3c6cc8bc2fc76cd437f521619387907d469316e7c0bc278f1f5432" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53c0fa8157de1303bfffdaa1cc2a673bfffb60102f76b0ef4441659124373fed" + +[[package]] +name = "futures-macro" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fb9654ba8355388abeb8dcb4fc62f511300867002afc858860463bdd9fe0c44" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.3", +] + +[[package]] +name = "futures-sink" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1944426bf7d03f1d14f708785e4b33efd750b36d48a157b836b3efc15ede8e1d" + +[[package]] +name = "futures-task" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd417de3d1d015fc3bfd2b1ea46dfc7bab72ef86f1cc7cc9c78e728b34a6d1fd" + +[[package]] +name = "futures-util" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d50a92467f8ba5dd6e3ee5d4bd04d73ab2e4e1c44474a0674821dfce14b79bc" +dependencies = [ + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "slab", +] + +[[package]] +name = "gdk" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9f245958c627ac99d8e529166f9823fb3b838d1d41fd2b297af3075093c2691" +dependencies = [ + "cairo-rs", + "gdk-pixbuf", + "gdk-sys", + "gio", + "glib", + "libc", + "pango", +] + +[[package]] +name = "gdk-pixbuf" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50e1f5f1b0bfb830d6ccc8066d18db35c487b1b2b1e8589b5dfe9f07e8defaec" +dependencies = [ + "gdk-pixbuf-sys", + "gio", + "glib", + "libc", + "once_cell", +] + +[[package]] +name = "gdk-pixbuf-sys" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9839ea644ed9c97a34d129ad56d38a25e6756f99f3a88e15cd39c20629caf7" +dependencies = [ + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + +[[package]] +name = "gdk-sys" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c2d13f38594ac1e66619e188c6d5a1adb98d11b2fcf7894fc416ad76aa2f3f7" +dependencies = [ + "cairo-sys-rs", + "gdk-pixbuf-sys", + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "pango-sys", + "pkg-config", + "system-deps", +] + +[[package]] +name = "gdkwayland-sys" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "140071d506d223f7572b9f09b5e155afbd77428cd5cc7af8f2694c41d98dfe69" +dependencies = [ + "gdk-sys", + "glib-sys", + "gobject-sys", + "libc", + "pkg-config", + "system-deps", +] + +[[package]] +name = "gdkx11" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3caa00e14351bebbc8183b3c36690327eb77c49abc2268dd4bd36b856db3fbfe" +dependencies = [ + "gdk", + "gdkx11-sys", + "gio", + "glib", + "libc", + "x11", +] + +[[package]] +name = "gdkx11-sys" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e2e7445fe01ac26f11601db260dd8608fe172514eb63b3b5e261ea6b0f4428d" +dependencies = [ + "gdk-sys", + "glib-sys", + "libc", + "system-deps", + "x11", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "getrandom" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +dependencies = [ + "cfg-if", + "libc", + "r-efi 5.3.0", + "wasip2", +] + +[[package]] +name = "getrandom" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099" +dependencies = [ + "cfg-if", + "libc", + "r-efi 6.0.0", +] + +[[package]] +name = "gio" +version = "0.18.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4fc8f532f87b79cbc51a79748f16a6828fb784be93145a322fa14d06d354c73" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-util", + "gio-sys", + "glib", + "libc", + "once_cell", + "pin-project-lite", + "smallvec", + "thiserror 1.0.69", +] + +[[package]] +name = "gio-sys" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37566df850baf5e4cb0dfb78af2e4b9898d817ed9263d1090a2df958c64737d2" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", + "winapi", +] + +[[package]] +name = "glib" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "233daaf6e83ae6a12a52055f568f9d7cf4671dabb78ff9560ab6da230ce00ee5" +dependencies = [ + "bitflags 2.13.1", + "futures-channel", + "futures-core", + "futures-executor", + "futures-task", + "futures-util", + "gio-sys", + "glib-macros", + "glib-sys", + "gobject-sys", + "libc", + "memchr", + "once_cell", + "smallvec", + "thiserror 1.0.69", +] + +[[package]] +name = "glib-macros" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bb0228f477c0900c880fd78c8759b95c7636dbd7842707f49e132378aa2acdc" +dependencies = [ + "heck 0.4.1", + "proc-macro-crate 2.0.2", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "glib-sys" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "063ce2eb6a8d0ea93d2bf8ba1957e78dbab6be1c2220dd3daca57d5a9d869898" +dependencies = [ + "libc", + "system-deps", +] + +[[package]] +name = "glob" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4eba85ea1d0a966a983acd07deee566e67395d2d96b6fb39e62b5a833f1eb0b" + +[[package]] +name = "gobject-sys" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0850127b514d1c4a4654ead6dedadb18198999985908e6ffe4436f53c785ce44" +dependencies = [ + "glib-sys", + "libc", + "system-deps", +] + +[[package]] +name = "goblin" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b363a30c165f666402fe6a3024d3bec7ebc898f96a4a23bd1c99f8dbf3f4f47" +dependencies = [ + "log", + "plain", + "scroll", +] + +[[package]] +name = "gtk" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd56fb197bfc42bd5d2751f4f017d44ff59fbb58140c6b49f9b3b2bdab08506a" +dependencies = [ + "atk", + "cairo-rs", + "field-offset", + "futures-channel", + "gdk", + "gdk-pixbuf", + "gio", + "glib", + "gtk-sys", + "gtk3-macros", + "libc", + "pango", + "pkg-config", +] + +[[package]] +name = "gtk-sys" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f29a1c21c59553eb7dd40e918be54dccd60c52b049b75119d5d96ce6b624414" +dependencies = [ + "atk-sys", + "cairo-sys-rs", + "gdk-pixbuf-sys", + "gdk-sys", + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "pango-sys", + "system-deps", +] + +[[package]] +name = "gtk3-macros" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52ff3c5b21f14f0736fed6dcfc0bfb4225ebf5725f3c0209edeec181e4d73e9d" +dependencies = [ + "proc-macro-crate 1.3.1", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash", +] + +[[package]] +name = "hashbrown" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" + +[[package]] +name = "hashlink" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ba4ff7128dee98c7dc9794b6a411377e1404dba1c97deb8d1a55297bd25d8af" +dependencies = [ + "hashbrown 0.14.5", +] + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "html5ever" +version = "0.38.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1054432bae2f14e0061e33d23402fbaa67a921d319d56adc6bcf887ddad1cbc2" +dependencies = [ + "log", + "markup5ever", +] + +[[package]] +name = "http" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "918d3568bebf352712bc2ef3d46a8bcf1a75b373be6539de198e9105cbbf9ce0" +dependencies = [ + "bytes", + "itoa", +] + +[[package]] +name = "http-body" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca2a8f2913ee65f60facd6a5905613afaa448497a0230cc41ce022d93290bc2c" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23169fe34a5fbcdd3f3862e78fb9b6fccd5f02a6dc6f732547005d45631ce71c" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "hyper" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d22053281f852e11534f5198498373cbb59295120a20771d90f7ed1897490a72" +dependencies = [ + "atomic-waker", + "bytes", + "futures-channel", + "futures-core", + "http", + "http-body", + "httparse", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.27.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ca68d021ef39cf6463ab54c1d0f5daf03377b70561305bb89a8f83aab66e0f" +dependencies = [ + "http", + "hyper", + "hyper-util", + "rustls", + "tokio", + "tokio-rustls", + "tower-service", +] + +[[package]] +name = "hyper-tls" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" +dependencies = [ + "bytes", + "http-body-util", + "hyper", + "hyper-util", + "native-tls", + "tokio", + "tokio-native-tls", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0" +dependencies = [ + "base64 0.22.1", + "bytes", + "futures-channel", + "futures-util", + "http", + "http-body", + "hyper", + "ipnet", + "libc", + "percent-encoding", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.65" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "log", + "wasm-bindgen", + "windows-core 0.62.2", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "ico" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e795dff5605e0f04bff85ca41b51a96b83e80b281e96231bcaaf1ac35103371" +dependencies = [ + "byteorder", + "png 0.17.16", +] + +[[package]] +name = "icu_collections" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa68d21081c4a05d5a901a1c62add574c77048b6a1c67be3b50ce0b60d4ca513" +dependencies = [ + "displaydoc", + "potential_utf", + "utf8_iter", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d56e28588da92eee5c3201a6eff33fabdd49b62269c8938d4ff050ce4d900deb" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12f9cf5f235641ed274641dd81c3f28d870e276763d0797aeeab72317b1c646f" +dependencies = [ + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1563da1ed3e0b3bf3d74c9b85917ac9c56464d2f57242270c09c9e752f8021a0" + +[[package]] +name = "icu_properties" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e7ca276ad3145661a65914e6daf131ca5120cd3dcee8f8f3214b8875184a148" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e590f038c1464a96894fd6d10127e90a8be4509f56ff7ecef851b15cee0b7caa" + +[[package]] +name = "icu_provider" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92a7ed671a6aad807a8651a2e1782a6598fda9ce5185dd8158549e95a91c6428" +dependencies = [ + "displaydoc", + "icu_locale_core", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", + "serde", +] + +[[package]] +name = "indexmap" +version = "2.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9" +dependencies = [ + "equivalent", + "hashbrown 0.17.1", + "serde", + "serde_core", +] + +[[package]] +name = "infer" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a588916bfdfd92e71cacef98a63d9b1f0d74d6599980d11894290e7ddefffcf7" +dependencies = [ + "cfb", +] + +[[package]] +name = "ipnet" +version = "2.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a756c3fac73139e83f14c2d742155dd2b78d3ee56597b419a0579b7bdd6dd78" + +[[package]] +name = "itoa" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" + +[[package]] +name = "javascriptcore-rs" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca5671e9ffce8ffba57afc24070e906da7fc4b1ba66f2cabebf61bf2ea257fcc" +dependencies = [ + "bitflags 1.3.2", + "glib", + "javascriptcore-rs-sys", +] + +[[package]] +name = "javascriptcore-rs-sys" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af1be78d14ffa4b75b66df31840478fef72b51f8c2465d4ca7c194da9f7a5124" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + +[[package]] +name = "jiff" +version = "0.2.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "668b7183bd07af9a4885f5c35b0cc5c83c4607a913c16b7e17291832910d2dcc" +dependencies = [ + "defmt", + "jiff-core", + "jiff-static", + "jiff-tzdb-platform", + "log", + "portable-atomic", + "portable-atomic-util", + "serde_core", + "windows-link 0.2.1", +] + +[[package]] +name = "jiff-core" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7feca88439efe53da3754500c1851dedf3cb36c524dd5cf8225cc0794de95d09" +dependencies = [ + "defmt", +] + +[[package]] +name = "jiff-static" +version = "0.2.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a69dcb3a21cfb32ce1cd056169337ca284af0766dd766e7878819b251a49204" +dependencies = [ + "jiff-core", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "jiff-tzdb" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "142bd39932ad231f10513df9ab62661fead8719872150b7ad02a2df79f4e141e" + +[[package]] +name = "jiff-tzdb-platform" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "875a5a69ac2bab1a891711cf5eccbec1ce0341ea805560dcd90b7a2e925132e8" +dependencies = [ + "jiff-tzdb", +] + +[[package]] +name = "jni" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" +dependencies = [ + "cesu8", + "cfg-if", + "combine", + "jni-sys 0.3.1", + "log", + "thiserror 1.0.69", + "walkdir", + "windows-sys 0.45.0", +] + +[[package]] +name = "jni" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5efd9a482cf3a427f00d6b35f14332adc7902ce91efb778580e180ff90fa3498" +dependencies = [ + "cfg-if", + "combine", + "jni-macros", + "jni-sys 0.4.1", + "log", + "simd_cesu8", + "thiserror 2.0.20", + "walkdir", + "windows-link 0.2.1", +] + +[[package]] +name = "jni-macros" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a00109accc170f0bdb141fed3e393c565b6f5e072365c3bd58f5b062591560a3" +dependencies = [ + "proc-macro2", + "quote", + "rustc_version", + "simd_cesu8", + "syn 2.0.119", +] + +[[package]] +name = "jni-sys" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41a652e1f9b6e0275df1f15b32661cf0d4b78d4d87ddec5e0c3c20f097433258" +dependencies = [ + "jni-sys 0.4.1", +] + +[[package]] +name = "jni-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6377a88cb3910bee9b0fa88d4f42e1d2da8e79915598f65fb0c7ee14c878af2" +dependencies = [ + "jni-sys-macros", +] + +[[package]] +name = "jni-sys-macros" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264" +dependencies = [ + "quote", + "syn 2.0.119", +] + +[[package]] +name = "js-sys" +version = "0.3.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e0c1080212aad755ea003d18543e8768dd432c48819efd73a7bf1e39b7a5a3a" +dependencies = [ + "cfg-if", + "futures-util", + "wasm-bindgen", +] + +[[package]] +name = "json-patch" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "863726d7afb6bc2590eeff7135d923545e5e964f004c2ccf8716c25e70a86f08" +dependencies = [ + "jsonptr", + "serde", + "serde_json", + "thiserror 1.0.69", +] + +[[package]] +name = "jsonptr" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dea2b27dd239b2556ed7a25ba842fe47fd602e7fc7433c2a8d6106d4d9edd70" +dependencies = [ + "serde", + "serde_json", +] + +[[package]] +name = "keyboard-types" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b750dcadc39a09dbadd74e118f6dd6598df77fa01df0cfcdc52c28dece74528a" +dependencies = [ + "bitflags 2.13.1", + "serde", + "unicode-segmentation", +] + +[[package]] +name = "libappindicator" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03589b9607c868cc7ae54c0b2a22c8dc03dd41692d48f2d7df73615c6a95dc0a" +dependencies = [ + "glib", + "gtk", + "gtk-sys", + "libappindicator-sys", + "log", +] + +[[package]] +name = "libappindicator-sys" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e9ec52138abedcc58dc17a7c6c0c00a2bdb4f3427c7f63fa97fd0d859155caf" +dependencies = [ + "gtk-sys", + "libloading", + "once_cell", +] + +[[package]] +name = "libc" +version = "0.2.189" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2" + +[[package]] +name = "libdbus-sys" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "328c4789d42200f1eeec05bd86c9c13c7f091d2ba9a6ea35acdf51f31bc0f043" +dependencies = [ + "pkg-config", +] + +[[package]] +name = "libloading" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" +dependencies = [ + "cfg-if", + "winapi", +] + +[[package]] +name = "libredox" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28d0a00925a9f930d679b6789b721e3a7f9ed110f41b86d2497caa780c3a070a" +dependencies = [ + "libc", +] + +[[package]] +name = "libsqlite3-sys" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e99fb7a497b1e3339bc746195567ed8d3e24945ecd636e3619d20b9de9e9149" +dependencies = [ + "cc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "linux-raw-sys" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" + +[[package]] +name = "litemap" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47d9d19d1d6efa0109d2f65ff4c85cddd50bd572e5a00127ab10987290bcefae" + +[[package]] +name = "lock_api" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ceec5bc11778974d1bcb055b18002eba7f4b3518b6a0081b3af5f21666da9ad" + +[[package]] +name = "markup5ever" +version = "0.38.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8983d30f2915feeaaab2d6babdd6bc7e9ed1a00b66b5e6d74df19aa9c0e91862" +dependencies = [ + "log", + "tendril", + "web_atoms", +] + +[[package]] +name = "memchr" +version = "2.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" + +[[package]] +name = "memoffset" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" +dependencies = [ + "autocfg", +] + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "minisign-verify" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22f9645cb765ea72b8111f36c522475d2daa0d22c957a9826437e97534bc4e9e" + +[[package]] +name = "miniz_oxide" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" +dependencies = [ + "adler2", + "simd-adler32", +] + +[[package]] +name = "mio" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30d65c71f1ce40ab09135ce117d742b9f8a19ff91a41a8b57ed50bc2de59c427" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.61.2", +] + +[[package]] +name = "muda" +version = "0.19.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dd04e60bc0b07438a6771710ee1698f98f6ebbc7f89b61264af1563b8aeb878" +dependencies = [ + "crossbeam-channel", + "dpi", + "gtk", + "keyboard-types", + "objc2", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-foundation", + "once_cell", + "png 0.18.1", + "serde", + "thiserror 2.0.20", + "windows-sys 0.61.2", +] + +[[package]] +name = "native-tls" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "465500e14ea162429d264d44189adc38b199b62b1c21eea9f69e4b73cb03bbf2" +dependencies = [ + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + +[[package]] +name = "ndk" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" +dependencies = [ + "bitflags 2.13.1", + "jni-sys 0.3.1", + "log", + "ndk-sys", + "num_enum", + "raw-window-handle", + "thiserror 1.0.69", +] + +[[package]] +name = "ndk-sys" +version = "0.6.0+11769913" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873" +dependencies = [ + "jni-sys 0.3.1", +] + +[[package]] +name = "new_debug_unreachable" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "num-conv" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "521739c6d2bac4aa25192232afe6841231376b2b26d4d9fae5ecf8ca5772e441" + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_enum" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d0bca838442ec211fa11de3a8b0e0e8f3a4522575b5c4c06ed722e005036f26" +dependencies = [ + "num_enum_derive", + "rustversion", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "680998035259dcfcafe653688bf2aa6d3e2dc05e98be6ab46afb089dc84f1df8" +dependencies = [ + "proc-macro-crate 3.5.0", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "num_threads" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c7398b9c8b70908f6371f47ed36737907c87c52af34c268fed0bf0ceb92ead9" +dependencies = [ + "libc", +] + +[[package]] +name = "objc2" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a12a8ed07aefc768292f076dc3ac8c48f3781c8f2d5851dd3d98950e8c5a89f" +dependencies = [ + "objc2-encode", + "objc2-exception-helper", +] + +[[package]] +name = "objc2-app-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d49e936b501e5c5bf01fda3a9452ff86dc3ea98ad5f283e1455153142d97518c" +dependencies = [ + "bitflags 2.13.1", + "block2", + "objc2", + "objc2-core-foundation", + "objc2-foundation", +] + +[[package]] +name = "objc2-cloud-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73ad74d880bb43877038da939b7427bba67e9dd42004a18b809ba7d87cee241c" +dependencies = [ + "bitflags 2.13.1", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-data" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b402a653efbb5e82ce4df10683b6b28027616a2715e90009947d50b8dd298fa" +dependencies = [ + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-foundation" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" +dependencies = [ + "bitflags 2.13.1", + "dispatch2", + "objc2", +] + +[[package]] +name = "objc2-core-graphics" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e022c9d066895efa1345f8e33e584b9f958da2fd4cd116792e15e07e4720a807" +dependencies = [ + "bitflags 2.13.1", + "dispatch2", + "objc2", + "objc2-core-foundation", + "objc2-io-surface", +] + +[[package]] +name = "objc2-core-image" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5d563b38d2b97209f8e861173de434bd0214cf020e3423a52624cd1d989f006" +dependencies = [ + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-location" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca347214e24bc973fc025fd0d36ebb179ff30536ed1f80252706db19ee452009" +dependencies = [ + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-text" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cde0dfb48d25d2b4862161a4d5fcc0e3c24367869ad306b0c9ec0073bfed92d" +dependencies = [ + "bitflags 2.13.1", + "objc2", + "objc2-core-foundation", + "objc2-core-graphics", +] + +[[package]] +name = "objc2-encode" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33" + +[[package]] +name = "objc2-exception-helper" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7a1c5fbb72d7735b076bb47b578523aedc40f3c439bea6dfd595c089d79d98a" +dependencies = [ + "cc", +] + +[[package]] +name = "objc2-foundation" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272" +dependencies = [ + "bitflags 2.13.1", + "block2", + "libc", + "objc2", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-io-surface" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180788110936d59bab6bd83b6060ffdfffb3b922ba1396b312ae795e1de9d81d" +dependencies = [ + "bitflags 2.13.1", + "objc2", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-osa-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f112d1746737b0da274ef79a23aac283376f335f4095a083a267a082f21db0c0" +dependencies = [ + "bitflags 2.13.1", + "objc2", + "objc2-app-kit", + "objc2-foundation", +] + +[[package]] +name = "objc2-quartz-core" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96c1358452b371bf9f104e21ec536d37a650eb10f7ee379fff67d2e08d537f1f" +dependencies = [ + "bitflags 2.13.1", + "objc2", + "objc2-core-foundation", + "objc2-foundation", +] + +[[package]] +name = "objc2-ui-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d87d638e33c06f577498cbcc50491496a3ed4246998a7fbba7ccb98b1e7eab22" +dependencies = [ + "bitflags 2.13.1", + "block2", + "objc2", + "objc2-cloud-kit", + "objc2-core-data", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-core-image", + "objc2-core-location", + "objc2-core-text", + "objc2-foundation", + "objc2-quartz-core", + "objc2-user-notifications", +] + +[[package]] +name = "objc2-user-notifications" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9df9128cbbfef73cda168416ccf7f837b62737d748333bfe9ab71c245d76613e" +dependencies = [ + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-web-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2e5aaab980c433cf470df9d7af96a7b46a9d892d521a2cbbb2f8a4c16751e7f" +dependencies = [ + "bitflags 2.13.1", + "block2", + "objc2", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-foundation", +] + +[[package]] +name = "once_cell" +version = "1.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" + +[[package]] +name = "openssl" +version = "0.10.81" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77823a27f0babb03091cb9ed9ef80af3b39dbc82f97e8fa530374b7dafd87a45" +dependencies = [ + "bitflags 2.13.1", + "cfg-if", + "foreign-types 0.3.2", + "libc", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "openssl-probe" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe" + +[[package]] +name = "openssl-src" +version = "300.6.1+3.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46eb8fb9fb3b61ce1c0f8a026c4c1a0714d3a9e138e7fbde78753ce2babc3846" +dependencies = [ + "cc", +] + +[[package]] +name = "openssl-sys" +version = "0.9.117" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b47e7e6bb2c38cd930d25a23b40fa52e068c10e85f3e03a7f5ba5aaca5713695" +dependencies = [ + "cc", + "libc", + "openssl-src", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + +[[package]] +name = "osakit" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "732c71caeaa72c065bb69d7ea08717bd3f4863a4f451402fc9513e29dbd5261b" +dependencies = [ + "objc2", + "objc2-foundation", + "objc2-osa-kit", + "serde", + "serde_json", + "thiserror 2.0.20", +] + +[[package]] +name = "pango" +version = "0.18.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ca27ec1eb0457ab26f3036ea52229edbdb74dee1edd29063f5b9b010e7ebee4" +dependencies = [ + "gio", + "glib", + "libc", + "once_cell", + "pango-sys", +] + +[[package]] +name = "pango-sys" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "436737e391a843e5933d6d9aa102cb126d501e815b83601365a948a518555dc5" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + +[[package]] +name = "parking_lot" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-link 0.2.1", +] + +[[package]] +name = "percent-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + +[[package]] +name = "phf" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1562dc717473dbaa4c1f85a36410e03c047b2e7df7f45ee938fbef64ae7fadf" +dependencies = [ + "phf_macros", + "phf_shared", + "serde", +] + +[[package]] +name = "phf_codegen" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49aa7f9d80421bca176ca8dbfebe668cc7a2684708594ec9f3c0db0805d5d6e1" +dependencies = [ + "phf_generator", + "phf_shared", +] + +[[package]] +name = "phf_generator" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "135ace3a761e564ec88c03a77317a7c6b80bb7f7135ef2544dbe054243b89737" +dependencies = [ + "fastrand", + "phf_shared", +] + +[[package]] +name = "phf_macros" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "812f032b54b1e759ccd5f8b6677695d5268c588701effba24601f6932f8269ef" +dependencies = [ + "phf_generator", + "phf_shared", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "phf_shared" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e57fef6bc5981e38c2ce2d63bfa546861309f875b8a75f092d1d54ae2d64f266" +dependencies = [ + "siphasher", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" + +[[package]] +name = "pkg-config" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6b464fbc74e149a392436b17d523f769e057cb6877f6a5c4618bc6f11800548" + +[[package]] +name = "plain" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" + +[[package]] +name = "plist" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da1d65da6dd5d1e44199ac0f58712d241c0f439f80adea8924d832384087f85" +dependencies = [ + "base64 0.22.1", + "indexmap 2.14.0", + "quick-xml", + "serde", + "time", +] + +[[package]] +name = "png" +version = "0.17.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82151a2fc869e011c153adc57cf2789ccb8d9906ce52c0b39a6b5697749d7526" +dependencies = [ + "bitflags 1.3.2", + "crc32fast", + "fdeflate", + "flate2", + "miniz_oxide", +] + +[[package]] +name = "png" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60769b8b31b2a9f263dae2776c37b1b28ae246943cf719eb6946a1db05128a61" +dependencies = [ + "bitflags 2.13.1", + "crc32fast", + "fdeflate", + "flate2", + "miniz_oxide", +] + +[[package]] +name = "portable-atomic" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05c8b63e8d9609db387f0324918f81d68fe27748f084ef092fb35954d0539a85" + +[[package]] +name = "portable-atomic-util" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2a106d1259c23fac8e543272398ae0e3c0b8d33c88ed73d0cc71b0f1d902618" +dependencies = [ + "portable-atomic", +] + +[[package]] +name = "potential_utf" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d83eb9bc6d8e5cf568e7a1101d60ee05e81ed50ea106026f3d18deeb046d7661" +dependencies = [ + "zerovec", +] + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "precomputed-hash" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" + +[[package]] +name = "proc-macro-crate" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +dependencies = [ + "once_cell", + "toml_edit 0.19.15", +] + +[[package]] +name = "proc-macro-crate" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b00f26d3400549137f92511a46ac1cd8ce37cb5598a96d382381458b992a5d24" +dependencies = [ + "toml_datetime 0.6.3", + "toml_edit 0.20.2", +] + +[[package]] +name = "proc-macro-crate" +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", +] + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "syn 1.0.109", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "version_check", +] + +[[package]] +name = "proc-macro2" +version = "1.0.107" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quick-xml" +version = "0.41.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e660451e55124f798a69a5af3f49ccfbefbd41910eefd25caf2393e1f3473ec1" +dependencies = [ + "memchr", +] + +[[package]] +name = "quote" +version = "1.0.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +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 = "raw-window-handle" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" + +[[package]] +name = "redox_syscall" +version = "0.5.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" +dependencies = [ + "bitflags 2.13.1", +] + +[[package]] +name = "redox_users" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac" +dependencies = [ + "getrandom 0.2.17", + "libredox", + "thiserror 2.0.20", +] + +[[package]] +name = "ref-cast" +version = "1.0.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "216e8f773d7923bcba9ceb86a86c93cabb3903a11872fc3f138c49630e50b96d" +dependencies = [ + "ref-cast-impl", +] + +[[package]] +name = "ref-cast-impl" +version = "1.0.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9283685feec7d69af75fb0e858d5e7378f33fe4fc699383b2916ab9273e03c" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.3", +] + +[[package]] +name = "regex" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f020237b6c8eed93db2e2cb53c00c60a8e1bc73da7d073199a1180401450218d" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad8553b9b26413251cbf30e620595c7a41b3887f03da04579c0e6b0d6a06b4b2" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4" + +[[package]] +name = "reqwest" +version = "0.12.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147" +dependencies = [ + "base64 0.22.1", + "bytes", + "futures-core", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-tls", + "hyper-util", + "js-sys", + "log", + "native-tls", + "percent-encoding", + "pin-project-lite", + "rustls-pki-types", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tokio-native-tls", + "tower", + "tower-http", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "reqwest" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "219c5811de6525e5416c7d5d53bb656d3afdbc6c5af816e0802bcfa42dbdc1c3" +dependencies = [ + "base64 0.22.1", + "bytes", + "futures-core", + "futures-util", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-rustls", + "hyper-util", + "js-sys", + "log", + "percent-encoding", + "pin-project-lite", + "rustls", + "rustls-pki-types", + "rustls-platform-verifier", + "serde", + "serde_json", + "sync_wrapper", + "tokio", + "tokio-rustls", + "tokio-util", + "tower", + "tower-http", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-streams", + "web-sys", +] + +[[package]] +name = "ring" +version = "0.17.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" +dependencies = [ + "cc", + "cfg-if", + "getrandom 0.2.17", + "libc", + "untrusted", + "windows-sys 0.52.0", +] + +[[package]] +name = "rusqlite" +version = "0.32.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7753b721174eb8ff87a9a0e799e2d7bc3749323e773db92e0984debb00019d6e" +dependencies = [ + "bitflags 2.13.1", + "fallible-iterator", + "fallible-streaming-iterator", + "hashlink", + "libsqlite3-sys", + "smallvec", +] + +[[package]] +name = "rustc-hash" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d" + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + +[[package]] +name = "rustix" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" +dependencies = [ + "bitflags 2.13.1", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.61.2", +] + +[[package]] +name = "rustls" +version = "0.23.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0283386ce02abc0151e1761d08802dfe86c173b0b494af5cbc086574e453da06" +dependencies = [ + "once_cell", + "ring", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls-native-certs" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dab5152771c58876a2146916e53e35057e1a4dfa2b9df0f0305b07f611fdea4d" +dependencies = [ + "openssl-probe", + "rustls-pki-types", + "schannel", + "security-framework", +] + +[[package]] +name = "rustls-pki-types" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f4925028c7eb5d1fcdaf196971378ed9d2c1c4efc7dc5d011256f76c99c0a96" +dependencies = [ + "zeroize", +] + +[[package]] +name = "rustls-platform-verifier" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d1e2536ce4f35f4846aa13bff16bd0ff40157cdb14cc056c7b14ba41233ba0" +dependencies = [ + "core-foundation", + "core-foundation-sys", + "jni 0.22.4", + "log", + "once_cell", + "rustls", + "rustls-native-certs", + "rustls-platform-verifier-android", + "rustls-webpki", + "security-framework", + "security-framework-sys", + "webpki-root-certs", + "windows-sys 0.61.2", +] + +[[package]] +name = "rustls-platform-verifier-android" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f" + +[[package]] +name = "rustls-webpki" +version = "0.103.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0527518605e68109d875e248ea259b6758801cf165e4b2c2733ae3b51f12535a" +dependencies = [ + "ring", + "rustls-pki-types", + "untrusted", +] + +[[package]] +name = "rustversion" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f" + +[[package]] +name = "ryu" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "schannel" +version = "0.1.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91c1b7e4904c873ef0710c1f407dde2e6287de2bebc1bbbf7d430bb7cbffd939" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "schemars" +version = "0.8.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fbf2ae1b8bc8e02df939598064d22402220cd5bbcca1c76f7d6a310974d5615" +dependencies = [ + "dyn-clone", + "indexmap 1.9.3", + "schemars_derive", + "serde", + "serde_json", + "url", + "uuid", +] + +[[package]] +name = "schemars" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd191f9397d57d581cddd31014772520aa448f65ef991055d7f61582c65165f" +dependencies = [ + "dyn-clone", + "ref-cast", + "serde", + "serde_json", +] + +[[package]] +name = "schemars" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "687274d293b6cdc6e73e0fee520bf2049650090d7164f87672d212a3c530cf4a" +dependencies = [ + "dyn-clone", + "ref-cast", + "serde", + "serde_json", +] + +[[package]] +name = "schemars_derive" +version = "0.8.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32e265784ad618884abaea0600a9adf15393368d840e0222d101a072f3f7534d" +dependencies = [ + "proc-macro2", + "quote", + "serde_derive_internals", + "syn 2.0.119", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "scroll" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ab8598aa408498679922eff7fa985c25d58a90771bd6be794434c5277eab1a6" +dependencies = [ + "scroll_derive", +] + +[[package]] +name = "scroll_derive" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1783eabc414609e28a5ba76aee5ddd52199f7107a0b24c2e9746a1ecc34a683d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "security-framework" +version = "3.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7f4bc775c73d9a02cde8bf7b2ec4c9d12743edf609006c7facc23998404cd1d" +dependencies = [ + "bitflags 2.13.1", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2691df843ecc5d231c0b14ece2acc3efb62c0a398c7e1d875f3983ce020e3" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "selectors" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5d9c0c92a92d33f08817311cf3f2c29a3538a8240e94a6a3c622ce652d7e00c" +dependencies = [ + "bitflags 2.13.1", + "cssparser", + "derive_more", + "log", + "new_debug_unreachable", + "phf", + "phf_codegen", + "precomputed-hash", + "rustc-hash", + "servo_arc", + "smallvec", +] + +[[package]] +name = "semver" +version = "1.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" +dependencies = [ + "serde", + "serde_core", +] + +[[package]] +name = "serde" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde-untagged" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9faf48a4a2d2693be24c6289dbe26552776eb7737074e6722891fadbe6c5058" +dependencies = [ + "erased-serde", + "serde", + "serde_core", + "typeid", +] + +[[package]] +name = "serde_core" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.3", +] + +[[package]] +name = "serde_derive_internals" +version = "0.29.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "serde_json" +version = "1.0.151" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c841b55ecdae098c80dcae9cf767f6f8a0c2cdb3416bbef72181df4d0fe73f14" +dependencies = [ + "itoa", + "memchr", + "serde", + "serde_core", + "zmij", +] + +[[package]] +name = "serde_repr" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d3b1629de253c70a0508c3899572da79ca359fdab27c7920ff00406df418906" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.3", +] + +[[package]] +name = "serde_spanned" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_spanned" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6662b5879511e06e8999a8a235d848113e942c9124f211511b16466ee2995f26" +dependencies = [ + "serde_core", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_with" +version = "3.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee78f1fbe43ac4a0e47aadb3dbd357b69eb0d3793e948624cd03dd2750ab1c0a" +dependencies = [ + "base64 0.22.1", + "bs58", + "chrono", + "hex", + "indexmap 1.9.3", + "indexmap 2.14.0", + "jiff", + "schemars 0.9.0", + "schemars 1.2.2", + "serde_core", + "serde_json", + "serde_with_macros", + "time", +] + +[[package]] +name = "serde_with_macros" +version = "3.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8705578779c2b6bd90d84d66eb2e206b708b1a4d7b9f17641b293545bf1c7e46" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "serialize-to-javascript" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04f3666a07a197cdb77cdf306c32be9b7f598d7060d50cfd4d5aa04bfd92f6c5" +dependencies = [ + "serde", + "serde_json", + "serialize-to-javascript-impl", +] + +[[package]] +name = "serialize-to-javascript-impl" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "772ee033c0916d670af7860b6e1ef7d658a4629a6d0b4c8c3e67f09b3765b75d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "servo_arc" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "170fb83ab34de17dc69aa7c67482b22218ddb85da56546f9bd6b929e32a05930" +dependencies = [ + "stable_deref_trait", +] + +[[package]] +name = "sha2" +version = "0.10.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "shlex" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" + +[[package]] +name = "simd-adler32" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a219298ac11a56ea9a6d2120044824d6f01aeb034955e7af7bc16858527deea" + +[[package]] +name = "simd_cesu8" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11031e251abf8611c80f460e19dbdeb54a66db918e49c65a7065b46ac7aec520" +dependencies = [ + "rustc_version", + "simdutf8", +] + +[[package]] +name = "simdutf8" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" + +[[package]] +name = "siphasher" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ee5873ec9cce0195efcb7a4e9507a04cd49aec9c83d0389df45b1ef7ba2e649" + +[[package]] +name = "slab" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" + +[[package]] +name = "smallvec" +version = "1.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ed6a63f02c8539c91a8685a86f4099661ba3da017932f6ebbea6de3f0fa7c90" + +[[package]] +name = "smawk" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8e2fb0f499abb4d162f2bedad68f5ef91a1682b5a03596ddb67efd37768d100" + +[[package]] +name = "socket2" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3d1e2c7f27f8d4cb10542a02c49005dbd6e93095799d6f3be745fae9f8fedd4" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "softbuffer" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aac18da81ebbf05109ab275b157c22a653bb3c12cf884450179942f81bcbf6c3" +dependencies = [ + "bytemuck", + "js-sys", + "ndk", + "objc2", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-foundation", + "objc2-quartz-core", + "raw-window-handle", + "redox_syscall", + "tracing", + "wasm-bindgen", + "web-sys", + "windows-sys 0.61.2", +] + +[[package]] +name = "soup3" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "471f924a40f31251afc77450e781cb26d55c0b650842efafc9c6cbd2f7cc4f9f" +dependencies = [ + "futures-channel", + "gio", + "glib", + "libc", + "soup3-sys", +] + +[[package]] +name = "soup3-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ebe8950a680a12f24f15ebe1bf70db7af98ad242d9db43596ad3108aab86c27" +dependencies = [ + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "string_cache" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a18596f8c785a729f2819c0f6a7eae6ebeebdfffbfe4214ae6b087f690e31901" +dependencies = [ + "new_debug_unreachable", + "parking_lot", + "phf_shared", + "precomputed-hash", +] + +[[package]] +name = "string_cache_codegen" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "585635e46db231059f76c5849798146164652513eb9e8ab2685939dd90f29b69" +dependencies = [ + "phf_generator", + "phf_shared", + "proc-macro2", + "quote", +] + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "swift-rs" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4057c98e2e852d51fdcfca832aac7b571f6b351ad159f9eda5db1655f8d0c4d7" +dependencies = [ + "base64 0.21.7", + "serde", + "serde_json", +] + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.119" +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" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "sync_wrapper" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" +dependencies = [ + "futures-core", +] + +[[package]] +name = "synstructure" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "system-deps" +version = "6.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3e535eb8dded36d55ec13eddacd30dec501792ff23a0b1682c38601b8cf2349" +dependencies = [ + "cfg-expr", + "heck 0.5.0", + "pkg-config", + "toml 0.8.2", + "version-compare", +] + +[[package]] +name = "tao" +version = "0.35.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1c93047acf68669466a34690ac58cca7010bd1b201e1ec86f1fd0a75d3dd4a9" +dependencies = [ + "bitflags 2.13.1", + "block2", + "core-foundation", + "core-graphics", + "crossbeam-channel", + "dbus", + "dispatch2", + "dlopen2", + "dpi", + "gdkwayland-sys", + "gdkx11-sys", + "gtk", + "jni 0.21.1", + "libc", + "log", + "ndk", + "ndk-sys", + "objc2", + "objc2-app-kit", + "objc2-foundation", + "objc2-ui-kit", + "once_cell", + "parking_lot", + "percent-encoding", + "raw-window-handle", + "tao-macros", + "unicode-segmentation", + "url", + "windows", + "windows-core 0.61.2", + "windows-version", + "x11-dl", +] + +[[package]] +name = "tao-macros" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f7eeb6d99155545da6150a1795945f16ac9c178deb2a5f2e74d776107bd5849" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "tar" +version = "0.4.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f6221d9a6003c78398e3b239969f352578258df48c8eb051caadae0015bc840" +dependencies = [ + "filetime", + "libc", + "xattr", +] + +[[package]] +name = "target-lexicon" +version = "0.12.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" + +[[package]] +name = "tauri" +version = "2.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "667b20e2726d572dea2de7370da16e188eb06008faf9a92fab7cdc46791190b5" +dependencies = [ + "anyhow", + "bytes", + "cookie", + "dirs", + "dunce", + "embed_plist", + "getrandom 0.3.4", + "glob", + "gtk", + "heck 0.5.0", + "http", + "jni 0.21.1", + "libc", + "log", + "mime", + "muda", + "objc2", + "objc2-app-kit", + "objc2-foundation", + "objc2-ui-kit", + "objc2-web-kit", + "percent-encoding", + "plist", + "raw-window-handle", + "reqwest 0.13.4", + "serde", + "serde_json", + "serde_repr", + "serialize-to-javascript", + "swift-rs", + "tauri-build", + "tauri-macros", + "tauri-runtime", + "tauri-runtime-wry", + "tauri-utils", + "thiserror 2.0.20", + "tokio", + "tray-icon", + "url", + "webkit2gtk", + "webview2-com", + "window-vibrancy", + "windows", +] + +[[package]] +name = "tauri-build" +version = "2.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc9ce40b16101cb6ea63d3e221567affd1c3a9205f95d7bc574941a10636b632" +dependencies = [ + "anyhow", + "cargo_toml", + "dirs", + "glob", + "heck 0.5.0", + "json-patch", + "schemars 0.8.22", + "semver", + "serde", + "serde_json", + "tauri-utils", + "tauri-winres", + "walkdir", +] + +[[package]] +name = "tauri-codegen" +version = "2.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08279169ff42f8fc45a1dbc9dcae888893ba95288142e5880c59b93a26d2cfc5" +dependencies = [ + "base64 0.22.1", + "brotli", + "ico", + "json-patch", + "plist", + "png 0.17.16", + "proc-macro2", + "quote", + "semver", + "serde", + "serde_json", + "sha2", + "syn 2.0.119", + "tauri-utils", + "thiserror 2.0.20", + "time", + "url", + "uuid", + "walkdir", +] + +[[package]] +name = "tauri-macros" +version = "2.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8b394794f399a421811d06966343e7933fcae92d59f5180b9388d1174497a45" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "syn 2.0.119", + "tauri-codegen", + "tauri-utils", +] + +[[package]] +name = "tauri-plugin" +version = "2.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74be5dd4bed9afbd145e5716b5fa2ec28cbc29c34ffa61c258c9273d896c8020" +dependencies = [ + "anyhow", + "glob", + "plist", + "schemars 0.8.22", + "serde", + "serde_json", + "tauri-utils", + "walkdir", +] + +[[package]] +name = "tauri-plugin-log" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6792296e6f389268016c77db21ebae1fc0568f2fccf88b1ec7e2ea71330afb4c" +dependencies = [ + "android_logger", + "fern", + "log", + "objc2", + "objc2-foundation", + "serde", + "serde_json", + "serde_repr", + "swift-rs", + "tauri", + "tauri-plugin", + "thiserror 2.0.20", + "time", +] + +[[package]] +name = "tauri-plugin-updater" +version = "2.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "806d9dac662c2e4594ff03c647a552f2c9bd544e7d0f683ec58f872f952ce4af" +dependencies = [ + "base64 0.22.1", + "dirs", + "flate2", + "futures-util", + "http", + "infer", + "log", + "minisign-verify", + "osakit", + "percent-encoding", + "reqwest 0.13.4", + "rustls", + "semver", + "serde", + "serde_json", + "tar", + "tauri", + "tauri-plugin", + "tempfile", + "thiserror 2.0.20", + "time", + "tokio", + "url", + "windows-sys 0.60.2", + "zip", +] + +[[package]] +name = "tauri-runtime" +version = "2.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0b4bc95aed361b0019067d189a1174a603d460d0f6c72606512d59fc9c12ec8" +dependencies = [ + "cookie", + "dpi", + "gtk", + "http", + "jni 0.21.1", + "objc2", + "objc2-ui-kit", + "objc2-web-kit", + "raw-window-handle", + "serde", + "serde_json", + "tauri-utils", + "thiserror 2.0.20", + "url", + "webkit2gtk", + "webview2-com", + "windows", +] + +[[package]] +name = "tauri-runtime-wry" +version = "2.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e6fac707727b7a2f48e4ded90976324267371073edbb415ffb73bb0458d203f" +dependencies = [ + "gtk", + "http", + "jni 0.21.1", + "log", + "objc2", + "objc2-app-kit", + "once_cell", + "percent-encoding", + "raw-window-handle", + "softbuffer", + "tao", + "tauri-runtime", + "tauri-utils", + "url", + "webkit2gtk", + "webview2-com", + "windows", + "wry", +] + +[[package]] +name = "tauri-utils" +version = "2.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e176a18e67764923c4f1ce66f25ae4abe5f688384d5eb1a0fa6c77f3d90f887" +dependencies = [ + "anyhow", + "brotli", + "cargo_metadata 0.19.2", + "ctor", + "dom_query", + "dunce", + "glob", + "http", + "infer", + "json-patch", + "log", + "memchr", + "phf", + "plist", + "proc-macro2", + "quote", + "regex", + "schemars 0.8.22", + "semver", + "serde", + "serde-untagged", + "serde_json", + "serde_with", + "swift-rs", + "thiserror 2.0.20", + "toml 1.1.4+spec-1.1.0", + "url", + "urlpattern", + "uuid", + "walkdir", +] + +[[package]] +name = "tauri-winres" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc65d45c68858bfe420dd29e834b5d15dbecf8a07a8a16cf4d532c7b1f69d4b6" +dependencies = [ + "dunce", + "embed-resource", + "toml 1.1.4+spec-1.1.0", +] + +[[package]] +name = "tempfile" +version = "3.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" +dependencies = [ + "fastrand", + "getrandom 0.4.3", + "once_cell", + "rustix", + "windows-sys 0.61.2", +] + +[[package]] +name = "tendril" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fed54709c5b3a53d09bb1c113ea4f5ceafd1e772ddcb0030a82e1d56c087b08" +dependencies = [ + "new_debug_unreachable", +] + +[[package]] +name = "textwrap" +version = "0.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c13547615a44dc9c452a8a534638acdf07120d4b6847c8178705da06306a3057" +dependencies = [ + "smawk", +] + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec86235f5fcc2a73650310756d2ac5b138a5780bbbdfae3eeccec992c435ba4f" +dependencies = [ + "thiserror-impl 2.0.20", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc04cd3e1236dd4a98afca4569f2deb3f120e5422a4023be2cb683f8486292af" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.3", +] + +[[package]] +name = "thoughtsync-core" +version = "0.1.0" +dependencies = [ + "chrono", + "log", + "openssl-sys", + "reqwest 0.12.28", + "rusqlite", + "serde", + "serde_json", + "sha2", + "uuid", +] + +[[package]] +name = "thoughtsync-desktop" +version = "0.1.0" +dependencies = [ + "log", + "serde", + "serde_json", + "tauri", + "tauri-build", + "tauri-plugin-log", + "tauri-plugin-updater", + "thoughtsync-core", +] + +[[package]] +name = "thoughtsync-ffi" +version = "0.1.0" +dependencies = [ + "log", + "serde_json", + "thiserror 2.0.20", + "thoughtsync-core", + "tokio", + "uniffi", +] + +[[package]] +name = "thoughtsync-uniffi-bindgen" +version = "0.1.0" +dependencies = [ + "uniffi", +] + +[[package]] +name = "time" +version = "0.3.55" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdb87b95ec50ddfa440816d227a17b2ccbdda963a316a727fda0fc4334f7d134" +dependencies = [ + "deranged", + "libc", + "num-conv", + "num_threads", + "powerfmt", + "serde_core", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1c906769ad99c88eaa54e728060edef082f8e358ff32030cb7c7d315e81109" + +[[package]] +name = "time-macros" +version = "0.2.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e689342a48d2ea927c87ea50cabf8594854bf940e9310208848d680d668ed85" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tinystr" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1e27c91459209c2986af3dcf603a5a74a4368754ce37414f59acc971167f643" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tinyvec" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb4ebadaa0af04fab11ae01eb5f9fdb5f9c5b875506e210e71c07873528baa7f" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "202caea871b69668250d242070849eb495be178ed697a3e98aebce5bc81a0bed" +dependencies = [ + "bytes", + "libc", + "mio", + "pin-project-lite", + "socket2", + "windows-sys 0.61.2", +] + +[[package]] +name = "tokio-native-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +dependencies = [ + "native-tls", + "tokio", +] + +[[package]] +name = "tokio-rustls" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61" +dependencies = [ + "rustls", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "494815d09bf52b5548659851081238f0ca39ff638363907596da739561c62c52" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "toml" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d" +dependencies = [ + "serde", + "serde_spanned 0.6.9", + "toml_datetime 0.6.3", + "toml_edit 0.20.2", +] + +[[package]] +name = "toml" +version = "0.9.12+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf92845e79fc2e2def6a5d828f0801e29a2f8acc037becc5ab08595c7d5e9863" +dependencies = [ + "indexmap 2.14.0", + "serde_core", + "serde_spanned 1.1.1", + "toml_datetime 0.7.5+spec-1.1.0", + "toml_parser", + "toml_writer", + "winnow 0.7.15", +] + +[[package]] +name = "toml" +version = "1.1.4+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3aace63f4bbcdfc2c965b059de67119c89c4017a70d633be6c104910f67056f5" +dependencies = [ + "indexmap 2.14.0", + "serde_core", + "serde_spanned 1.1.1", + "toml_datetime 1.1.1+spec-1.1.0", + "toml_parser", + "toml_writer", + "winnow 1.0.4", +] + +[[package]] +name = "toml_datetime" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_datetime" +version = "0.7.5+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92e1cfed4a3038bc5a127e35a2d360f145e1f4b971b551a2ba5fd7aedf7e1347" +dependencies = [ + "serde_core", +] + +[[package]] +name = "toml_datetime" +version = "1.1.1+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3165f65f62e28e0115a00b2ebdd37eb6f3b641855f9d636d3cd4103767159ad7" +dependencies = [ + "serde_core", +] + +[[package]] +name = "toml_edit" +version = "0.19.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +dependencies = [ + "indexmap 2.14.0", + "toml_datetime 0.6.3", + "winnow 0.5.40", +] + +[[package]] +name = "toml_edit" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" +dependencies = [ + "indexmap 2.14.0", + "serde", + "serde_spanned 0.6.9", + "toml_datetime 0.6.3", + "winnow 0.5.40", +] + +[[package]] +name = "toml_edit" +version = "0.25.13+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6975367e4d2ef766d86af01ffad14b622fecc8d4357a998fbc4deb6e9bacaf9b" +dependencies = [ + "indexmap 2.14.0", + "toml_datetime 1.1.1+spec-1.1.0", + "toml_parser", + "winnow 1.0.4", +] + +[[package]] +name = "toml_parser" +version = "1.1.3+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d38ac1cf9b95face32296c0a3ede1fdc270627c9d9c02a7274dd6d960dc4d56" +dependencies = [ + "winnow 1.0.4", +] + +[[package]] +name = "toml_writer" +version = "1.1.2+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d56353a2a665ad0f41a421187180aab746c8c325620617ad883a99a1cbe66d2" + +[[package]] +name = "tower" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper", + "tokio", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-http" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cfcf7e2740e6fc6d4d688b4ef00650406bb94adf4731e43c096c3a19fe40840" +dependencies = [ + "bitflags 2.13.1", + "bytes", + "futures-util", + "http", + "http-body", + "pin-project-lite", + "tower", + "tower-layer", + "tower-service", + "url", +] + +[[package]] +name = "tower-layer" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + +[[package]] +name = "tracing" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" +dependencies = [ + "pin-project-lite", + "tracing-core", +] + +[[package]] +name = "tracing-core" +version = "0.1.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" +dependencies = [ + "once_cell", +] + +[[package]] +name = "tray-icon" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "045979e3f037cd18ad1cb2a419dfda133c5c29c9f3453370079f2255d46c257e" +dependencies = [ + "crossbeam-channel", + "dirs", + "libappindicator", + "muda", + "objc2", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-foundation", + "once_cell", + "png 0.18.1", + "serde", + "thiserror 2.0.20", + "windows-sys 0.61.2", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "typeid" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c" + +[[package]] +name = "typenum" +version = "1.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20" + +[[package]] +name = "unic-char-property" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8c57a407d9b6fa02b4795eb81c5b6652060a15a7903ea981f3d723e6c0be221" +dependencies = [ + "unic-char-range", +] + +[[package]] +name = "unic-char-range" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0398022d5f700414f6b899e10b8348231abf9173fa93144cbc1a43b9793c1fbc" + +[[package]] +name = "unic-common" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80d7ff825a6a654ee85a63e80f92f054f904f21e7d12da4e22f9834a4aaa35bc" + +[[package]] +name = "unic-ucd-ident" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e230a37c0381caa9219d67cf063aa3a375ffed5bf541a452db16e744bdab6987" +dependencies = [ + "unic-char-property", + "unic-char-range", + "unic-ucd-version", +] + +[[package]] +name = "unic-ucd-version" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96bd2f2237fe450fcd0a1d2f5f4e91711124f7857ba2e964247776ebeeb7b0c4" +dependencies = [ + "unic-common", +] + +[[package]] +name = "unicode-ident" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" + +[[package]] +name = "unicode-segmentation" +version = "1.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6f5d3c3b1bf09027a88a6bc961fc00497d651009560b5463668dc81b0fa87a8" + +[[package]] +name = "uniffi" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a782a48d72cfd7a2d65cfc7c691dbf5375c43104b3c195f7eccc716dcc3540c8" +dependencies = [ + "anyhow", + "camino", + "cargo_metadata 0.23.1", + "clap", + "uniffi_bindgen", + "uniffi_core", + "uniffi_macros", + "uniffi_pipeline", +] + +[[package]] +name = "uniffi_bindgen" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "533b0312c73e3b54eb78a4b257ceae390962dd4767995778309a74644643f9ac" +dependencies = [ + "anyhow", + "askama", + "camino", + "cargo_metadata 0.23.1", + "fs-err", + "glob", + "goblin", + "heck 0.5.0", + "indexmap 2.14.0", + "once_cell", + "serde", + "tempfile", + "textwrap", + "toml 1.1.4+spec-1.1.0", + "uniffi_internal_macros", + "uniffi_meta", + "uniffi_pipeline", + "uniffi_udl", +] + +[[package]] +name = "uniffi_core" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e32e261c5b0dfaba6488f536e71957dddd6b1a498ac7eb791bee56b60a086be" +dependencies = [ + "anyhow", + "async-compat", + "bytes", + "once_cell", + "static_assertions", +] + +[[package]] +name = "uniffi_internal_macros" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84ae78069a5e6772ef694fd5bdb628532c88d2c2f0e7142bf6a384636eadb1af" +dependencies = [ + "anyhow", + "indexmap 2.14.0", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "uniffi_macros" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "330be6770532e86320df31f54c70bb0be67588594e8e77fa56e9083a3fed5d0d" +dependencies = [ + "camino", + "fs-err", + "once_cell", + "proc-macro2", + "quote", + "serde", + "syn 2.0.119", + "toml 1.1.4+spec-1.1.0", + "uniffi_meta", +] + +[[package]] +name = "uniffi_meta" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78de021f5547e56ab16c665a49d67d4fd3d31e77422f7739a2e9359d328cd9e7" +dependencies = [ + "anyhow", + "siphasher", + "uniffi_internal_macros", + "uniffi_pipeline", +] + +[[package]] +name = "uniffi_pipeline" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f8201bb1907ed8a42d80e11cbc25c8a033e7a31c3cff1d911f56eedb81d4948" +dependencies = [ + "anyhow", + "heck 0.5.0", + "indexmap 2.14.0", + "tempfile", + "uniffi_internal_macros", +] + +[[package]] +name = "uniffi_udl" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6e57996bc58009cc29bf04845d627ae313c2547b87171c1c349d6c51a1656c0" +dependencies = [ + "anyhow", + "textwrap", + "uniffi_meta", + "weedle2", +] + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "url" +version = "2.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", + "serde", + "serde_derive", +] + +[[package]] +name = "urlpattern" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70acd30e3aa1450bc2eece896ce2ad0d178e9c079493819301573dae3c37ba6d" +dependencies = [ + "regex", + "serde", + "unic-ucd-ident", + "url", +] + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] +name = "uuid" +version = "1.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2cefc03fd367c0c6d4305de1b312cf00248c4114f4a0418ce6a6af769e3b0bd9" +dependencies = [ + "getrandom 0.4.3", + "js-sys", + "serde_core", + "wasm-bindgen", +] + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "version-compare" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03c2856837ef78f57382f06b2b8563a2f512f7185d732608fd9176cb3b8edf0e" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "vswhom" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be979b7f07507105799e854203b470ff7c78a1639e330a58f183b5fea574608b" +dependencies = [ + "libc", + "vswhom-sys", +] + +[[package]] +name = "vswhom-sys" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb067e4cbd1ff067d1df46c9194b5de0e98efd2810bbc95c5d5e5f25a3231150" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasip2" +version = "1.0.4+wasi-0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67efb37e106e55ce722a510d6b5f9c17f083e5fc79afc2badeb12cc313d9487" +dependencies = [ + "wit-bindgen", +] + +[[package]] +name = "wasm-bindgen" +version = "0.2.127" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b70935747edd64d89de3efa29d73789b806c15798f8e7dca4d8ac356b50ce70" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.77" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b7777d5cc23d0e91404e53ce2d5e8ec7acae3026b16233dba62cd3246457950" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.127" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77775f8f3f7217702089053b94958f8f54061a3f663417df76e19cbdcca29bc1" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.127" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e11d33f857dc2fb11b8bc75aee111aa9cbeb12cd9f25efd3d4c2a3dd4e235284" +dependencies = [ + "bumpalo", + "proc-macro2", + "quote", + "syn 2.0.119", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.127" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ef64dbcc55df09c7e5a46182d181c2cfa3e925f3da937ea764728b4bbb9dcbf" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "wasm-streams" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d1ec4f6517c9e11ae630e200b2b65d193279042e28edd4a2cda233e46670bbb" +dependencies = [ + "futures-util", + "js-sys", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "web-sys" +version = "0.3.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c435338968042f4f59a557f690a253676d47ce13ceb55d70100e7facf6620a30" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web_atoms" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba8b815c1b593dc0baf78dd0f4fc8fdb2de53198fb1163738093e9a311c33fb3" +dependencies = [ + "phf", + "phf_codegen", + "string_cache", + "string_cache_codegen", +] + +[[package]] +name = "webkit2gtk" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1027150013530fb2eaf806408df88461ae4815a45c541c8975e61d6f2fc4793" +dependencies = [ + "bitflags 1.3.2", + "cairo-rs", + "gdk", + "gdk-sys", + "gio", + "gio-sys", + "glib", + "glib-sys", + "gobject-sys", + "gtk", + "gtk-sys", + "javascriptcore-rs", + "libc", + "once_cell", + "soup3", + "webkit2gtk-sys", +] + +[[package]] +name = "webkit2gtk-sys" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "916a5f65c2ef0dfe12fff695960a2ec3d4565359fdbb2e9943c974e06c734ea5" +dependencies = [ + "bitflags 1.3.2", + "cairo-sys-rs", + "gdk-sys", + "gio-sys", + "glib-sys", + "gobject-sys", + "gtk-sys", + "javascriptcore-rs-sys", + "libc", + "pkg-config", + "soup3-sys", + "system-deps", +] + +[[package]] +name = "webpki-root-certs" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b96554aa2acc8ccdb7e1c9a58a7a68dd5d13bccc69cd124cb09406db612a1c9b" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "webview2-com" +version = "0.38.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7130243a7a5b33c54a444e54842e6a9e133de08b5ad7b5861cd8ed9a6a5bc96a" +dependencies = [ + "webview2-com-macros", + "webview2-com-sys", + "windows", + "windows-core 0.61.2", + "windows-implement", + "windows-interface", +] + +[[package]] +name = "webview2-com-macros" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a921c1b6914c367b2b823cd4cde6f96beec77d30a939c8199bb377cf9b9b54" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "webview2-com-sys" +version = "0.38.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "381336cfffd772377d291702245447a5251a2ffa5bad679c99e61bc48bacbf9c" +dependencies = [ + "thiserror 2.0.20", + "windows", + "windows-core 0.61.2", +] + +[[package]] +name = "weedle2" +version = "5.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "998d2c24ec099a87daf9467808859f9d82b61f1d9c9701251aea037f514eae0e" +dependencies = [ + "nom", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "window-vibrancy" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9bec5a31f3f9362f2258fd0e9c9dd61a9ca432e7306cc78c444258f0dce9a9c" +dependencies = [ + "objc2", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-foundation", + "raw-window-handle", + "windows-sys 0.59.0", + "windows-version", +] + +[[package]] +name = "windows" +version = "0.61.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9babd3a767a4c1aef6900409f85f5d53ce2544ccdfaa86dad48c91782c6d6893" +dependencies = [ + "windows-collections", + "windows-core 0.61.2", + "windows-future", + "windows-link 0.1.3", + "windows-numerics", +] + +[[package]] +name = "windows-collections" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3beeceb5e5cfd9eb1d76b381630e82c4241ccd0d27f1a39ed41b2760b255c5e8" +dependencies = [ + "windows-core 0.61.2", +] + +[[package]] +name = "windows-core" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-link 0.1.3", + "windows-result 0.3.4", + "windows-strings 0.4.2", +] + +[[package]] +name = "windows-core" +version = "0.62.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-link 0.2.1", + "windows-result 0.4.1", + "windows-strings 0.5.1", +] + +[[package]] +name = "windows-future" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e" +dependencies = [ + "windows-core 0.61.2", + "windows-link 0.1.3", + "windows-threading", +] + +[[package]] +name = "windows-implement" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "windows-interface" +version = "0.59.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "windows-link" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-numerics" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1" +dependencies = [ + "windows-core 0.61.2", + "windows-link 0.1.3", +] + +[[package]] +name = "windows-result" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" +dependencies = [ + "windows-link 0.1.3", +] + +[[package]] +name = "windows-result" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" +dependencies = [ + "windows-link 0.2.1", +] + +[[package]] +name = "windows-strings" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" +dependencies = [ + "windows-link 0.1.3", +] + +[[package]] +name = "windows-strings" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" +dependencies = [ + "windows-link 0.2.1", +] + +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets 0.53.5", +] + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link 0.2.1", +] + +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm 0.52.6", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows-targets" +version = "0.53.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" +dependencies = [ + "windows-link 0.2.1", + "windows_aarch64_gnullvm 0.53.1", + "windows_aarch64_msvc 0.53.1", + "windows_i686_gnu 0.53.1", + "windows_i686_gnullvm 0.53.1", + "windows_i686_msvc 0.53.1", + "windows_x86_64_gnu 0.53.1", + "windows_x86_64_gnullvm 0.53.1", + "windows_x86_64_msvc 0.53.1", +] + +[[package]] +name = "windows-threading" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b66463ad2e0ea3bbf808b7f1d371311c80e115c0b71d60efc142cafbcfb057a6" +dependencies = [ + "windows-link 0.1.3", +] + +[[package]] +name = "windows-version" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4060a1da109b9d0326b7262c8e12c84df67cc0dbc9e33cf49e01ccc2eb63631" +dependencies = [ + "windows-link 0.2.1", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" + +[[package]] +name = "windows_i686_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" + +[[package]] +name = "windows_i686_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_i686_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" + +[[package]] +name = "winnow" +version = "0.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", +] + +[[package]] +name = "winnow" +version = "0.7.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df79d97927682d2fd8adb29682d1140b343be4ac0f08fd68b7765d9c059d3945" + +[[package]] +name = "winnow" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b97319f7b8343df12cc98938e5c3eb436064524c8d2b4e30a1d3a36eecdf81" +dependencies = [ + "memchr", +] + +[[package]] +name = "winreg" +version = "0.55.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb5a765337c50e9ec252c2069be9bf91c7df47afb103b642ba3a53bf8101be97" +dependencies = [ + "cfg-if", + "windows-sys 0.59.0", +] + +[[package]] +name = "wit-bindgen" +version = "0.57.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" + +[[package]] +name = "writeable" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ad82d2a33cdc9674dc7465672f271e096168fcdbe0f799d9e6db8c5892679dc" + +[[package]] +name = "wry" +version = "0.55.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "186f9871daa55fd9c016578b810d149de58367113db7fb72b462d2323ce19514" +dependencies = [ + "base64 0.22.1", + "block2", + "cookie", + "crossbeam-channel", + "dirs", + "dom_query", + "dpi", + "dunce", + "gdkx11", + "gtk", + "http", + "javascriptcore-rs", + "jni 0.21.1", + "libc", + "ndk", + "objc2", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-foundation", + "objc2-ui-kit", + "objc2-web-kit", + "once_cell", + "percent-encoding", + "raw-window-handle", + "sha2", + "soup3", + "tao-macros", + "thiserror 2.0.20", + "url", + "webkit2gtk", + "webkit2gtk-sys", + "webview2-com", + "windows", + "windows-core 0.61.2", + "windows-version", + "x11-dl", +] + +[[package]] +name = "x11" +version = "2.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "502da5464ccd04011667b11c435cb992822c2c0dbde1770c988480d312a0db2e" +dependencies = [ + "libc", + "pkg-config", +] + +[[package]] +name = "x11-dl" +version = "2.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38735924fedd5314a6e548792904ed8c6de6636285cb9fec04d5b1db85c1516f" +dependencies = [ + "libc", + "once_cell", + "pkg-config", +] + +[[package]] +name = "xattr" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32e45ad4206f6d2479085147f02bc2ef834ac85886624a23575ae137c8aa8156" +dependencies = [ + "libc", + "rustix", +] + +[[package]] +name = "yoke" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "709fe23a0424b6a435d82152b1bd3fdfb0833487d5fa90d05d42762a9891fef5" +dependencies = [ + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", + "synstructure", +] + +[[package]] +name = "zerocopy" +version = "0.8.56" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "556764e583adb45a9f8d413c2a147fa7e8d821e48e12b14fd560b607998b75eb" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.56" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2ab42fc20575779bd240faa45f94a74256f755c0fa9e89f0ede20d91d0cdfc1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "zerofrom" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", + "synstructure", +] + +[[package]] +name = "zeroize" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13c156562582aa81c60cb29407084cdb54c4164760106ab78e6c5b0858cf64e" + +[[package]] +name = "zerotrie" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ea269c3bd32f0a32c321907a2ae912ba6f4649bb0fc764a15627e99a7095a3f" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94b5c6b5976d66c1d703c4fd17d3f5e43c8cedaacf604961b171adc7130896d8" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f212a141d820099d57ffafb9569be9617a6f27d3dc881fbee8fb56642f917a9" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.3", +] + +[[package]] +name = "zip" +version = "4.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "caa8cd6af31c3b31c6631b8f483848b91589021b28fffe50adada48d4f4d2ed1" +dependencies = [ + "arbitrary", + "crc32fast", + "indexmap 2.14.0", + "memchr", +] + +[[package]] +name = "zmij" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b" diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..01c7023 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,26 @@ +# Rust workspace. The framework-free client core, and the two shims that wrap it: +# the Tauri desktop app and the uniffi bindings the native Android client loads. +# Neither shim owns the core — that is the reason it is a crate at all rather than a +# module inside the desktop app (Scribe note 2730). +[workspace] +resolver = "2" +members = ["core", "desktop/src-tauri", "android/ffi", "android/bindgen"] + +# Shared pins, so two consumers of the core cannot drift onto different versions of +# the same dependency and resolve differently. +[workspace.dependencies] +serde = { version = "1", features = ["derive"] } +serde_json = "1" +log = "0.4" + +# Tauri's default release profile: smaller, faster shipped binaries. +# +# At the WORKSPACE root, not in the desktop member: cargo ignores profiles declared +# by a non-root package, so leaving it there would silently drop lto/strip/opt-level +# from every release build with only a warning to say so. +[profile.release] +codegen-units = 1 +lto = true +opt-level = "s" +panic = "abort" +strip = true diff --git a/Dockerfile b/Dockerfile index 625bc85..2ffe9ce 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,6 +24,19 @@ COPY --from=build-frontend /build/dist/ src/thoughtsync/static/ COPY alembic.ini . COPY alembic/ alembic/ +# The Android client this server hands out. CI fetches the newest published build +# into ./client immediately before this runs (ci.yml), so every image tag — :dev, +# :latest and : alike — ships a client, and a `docker compose pull` +# delivers a new one with no file copying by hand. +# +# Fetched by the JOB rather than here on purpose: the release is private, and a +# token used inside a build ends up in the build context or a layer. +# +# The directory is tracked (client/.keep) so this COPY cannot fail on a tree where +# that step never ran. An image with no APK is a supported state — the server +# advertises nothing and the web UI hides the download (client_dist.py). +COPY client/ src/thoughtsync/client/ + ENV PYTHONPATH=/app/src ARG BUILD_VERSION=dev diff --git a/android/.editorconfig b/android/.editorconfig new file mode 100644 index 0000000..e8a9eab --- /dev/null +++ b/android/.editorconfig @@ -0,0 +1,15 @@ +root = true + +[*.{kt,kts}] +# ktlint's standard function-naming rule doesn't know about Compose, where +# PascalCase @Composable functions are the universal convention — every +# mainstream Compose codebase would fail it. This is ktlint's own supported +# exemption, and it mirrors the equivalent detekt override in config/detekt.yml. +ktlint_function_naming_ignore_when_annotated_with = Composable + +# 120 rather than ktlint's looser default: this is a phone UI with deeply nested +# Compose calls, and a hard-ish ceiling is what keeps the nesting from becoming +# unreadable rather than merely long. +max_line_length = 120 +indent_size = 4 +insert_final_newline = true diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts new file mode 100644 index 0000000..4d86859 --- /dev/null +++ b/android/app/build.gradle.kts @@ -0,0 +1,292 @@ +import java.io.File +import javax.inject.Inject + +plugins { + alias(libs.plugins.android.application) + alias(libs.plugins.compose.compiler) +} + +// The Cargo workspace root — two levels up from android/app. +val workspaceRoot: Directory = layout.projectDirectory.dir("../..") + +// The ABIs a release APK carries. arm64 is essentially every real device; armv7 +// covers older 32-bit hardware; the two x86 targets are what emulators run on, and +// dropping them would make the app untestable on a desktop emulator (the reason +// x86_64 was added to the old Tauri lane in task 1864). +val androidAbis = listOf("arm64-v8a", "armeabi-v7a", "x86", "x86_64") + +/** + * Cross-compile `thoughtsync-ffi` for each Android ABI and drop the resulting + * `.so` into jniLibs, where AGP packages it. + * + * `ExecOperations` injected rather than `project.exec`: the latter was REMOVED in + * Gradle 9, and reaching for `project` at execution time is also what breaks the + * configuration cache this build has enabled. + */ +abstract class CargoNdkBuild : DefaultTask() { + @get:Inject + abstract val execOps: ExecOperations + + @get:InputFiles + abstract val rustSources: ConfigurableFileCollection + + @get:Input + abstract val abis: ListProperty + + @get:Input + abstract val cargoProfile: Property + + @get:Internal + abstract val workspaceDir: DirectoryProperty + + @get:OutputDirectory + abstract val jniLibsDir: DirectoryProperty + + @TaskAction + fun build() { + val args = mutableListOf("ndk") + abis.get().forEach { abi -> + args += "-t" + args += abi + } + args += listOf("-o", jniLibsDir.get().asFile.absolutePath, "build", "-p", "thoughtsync-ffi") + // --locked so an Android build cannot silently re-resolve the workspace + // lockfile the desktop lanes are gated on. + args += "--locked" + if (cargoProfile.get() == "release") args += "--release" + + execOps.exec { + commandLine(listOf("cargo") + args) + workingDir = workspaceDir.get().asFile + } + } +} + +/** + * Generate the Kotlin bindings FROM the freshly built `.so`. + * + * `--library` mode reads uniffi's metadata straight out of the compiled artifact, + * so the bindings can never describe a different version of the Rust than the one + * being packaged — which is the failure the whole in-workspace generator setup + * exists to prevent. + */ +abstract class UniffiBindgen : DefaultTask() { + @get:Inject + abstract val execOps: ExecOperations + + @get:InputFile + abstract val libraryFile: RegularFileProperty + + @get:Internal + abstract val workspaceDir: DirectoryProperty + + @get:OutputDirectory + abstract val outputDir: DirectoryProperty + + @TaskAction + fun generate() { + val out = outputDir.get().asFile + out.deleteRecursively() + out.mkdirs() + execOps.exec { + commandLine( + "cargo", + "run", + "--locked", + "-p", + "thoughtsync-uniffi-bindgen", + "--", + "generate", + "--library", + libraryFile.get().asFile.absolutePath, + "--language", + "kotlin", + "--out-dir", + out.absolutePath, + ) + workingDir = workspaceDir.get().asFile + } + } +} + +// Only the Rust that actually affects the .so. Deliberately NOT the workspace +// directory: that would make Gradle hash target/, which is gigabytes. +val rustInputs = + files( + workspaceRoot.dir("core/src"), + workspaceRoot.dir("android/ffi/src"), + workspaceRoot.file("core/Cargo.toml"), + workspaceRoot.file("android/ffi/Cargo.toml"), + workspaceRoot.file("Cargo.toml"), + workspaceRoot.file("Cargo.lock"), + ) + +/** + * Which Cargo profile the `.so` is built with. + * + * A property rather than a debug/release task PAIR, deliberately. This runner has + * no working Gradle or Cargo cache (`reserveCache failed` on every run), so a cold + * cross-compile of four ABIs costs about four minutes — and a lane that both + * type-checks and packages would pay that twice if the two used different + * profiles. `android.yml` picks one profile and uses it for every Gradle call in + * the run. + * + * CI currently passes `debug` even for a release APK, which is not where this + * should end up: an unoptimised store and sync engine is a real difference on a + * phone, not a theoretical one. The blocker is that the workspace's release + * profile sets `strip = true`, which removes the symbols uniffi reads its + * interface metadata from — `generateUniffiBindings` then fails with "No UniFFI + * metadata found" (run 4077). Fixing it means either an Android-specific profile + * that keeps symbols or generating the bindings from a separate unstripped + * build, and neither is worth holding signed APKs up for. Scribe #2810. + */ +val rustProfile = + (project.findProperty("THOUGHTSYNC_CARGO_PROFILE") as String?)?.takeIf { it.isNotBlank() } + ?: "debug" + +val jniLibsOut = layout.buildDirectory.dir("rustJniLibs") +val bindingsOut = layout.buildDirectory.dir("generated/uniffi") + +val cargoNdk = + tasks.register("cargoNdk") { + description = "Cross-compile thoughtsync-ffi for the Android ABIs." + rustSources.from(rustInputs) + abis.set(androidAbis) + cargoProfile.set(rustProfile) + workspaceDir.set(workspaceRoot) + jniLibsDir.set(jniLibsOut) + } + +val generateBindings = + tasks.register("generateUniffiBindings") { + description = "Generate the Kotlin bindings from the compiled .so." + dependsOn(cargoNdk) + // arm64 is arbitrary — every ABI carries the same uniffi metadata, and + // reading one is cheaper than reading four. + libraryFile.set(jniLibsOut.map { it.file("arm64-v8a/libthoughtsync_ffi.so") }) + workspaceDir.set(workspaceRoot) + outputDir.set(bindingsOut) + } + +android { + namespace = "com.fabledsword.thoughtsync" + compileSdk = 36 + + defaultConfig { + applicationId = "com.fabledsword.thoughtsync" + // 26 (Android 8, 2017) matches Minstrel and clears the NDK's floor with + // room to spare. + minSdk = 26 + targetSdk = 36 + // Injected by CI from the git tag + commit count for a release; "dev" + // locally so the About screen reads honestly rather than claiming 1.0. + val nameOverride = + (project.findProperty("THOUGHTSYNC_VERSION_NAME") as String?)?.takeIf { it.isNotBlank() } + val codeOverride = + (project.findProperty("THOUGHTSYNC_VERSION_CODE") as String?)?.toIntOrNull() + versionCode = codeOverride ?: 1 + versionName = nameOverride ?: "dev" + + // Package ONLY the ABIs we build for. + // + // Without this the APK also carries armeabi, mips and mips64 — dead + // architectures Android dropped years ago, which arrive because JNA's + // .aar still ships a libjnidispatch.so for each. They can never be + // loaded on any device this app supports, so they are pure payload. + ndk { + abiFilters += androidAbis + } + } + + // The signing key reaches this build only through the environment: CI decodes + // it from a secret into a file and points ANDROID_KEYSTORE_FILE at that path. + // It is never in the repo and never in this file. Generated by the operator + // and never seen by an agent session, because an Android signing key cannot be + // rotated without the original — v3 lineage needs it — so a leaked or lost one + // means every install has to be removed and replaced by hand. + val keystoreFile = System.getenv("ANDROID_KEYSTORE_FILE")?.takeIf { it.isNotBlank() } + val keystorePassword = System.getenv("ANDROID_KEYSTORE_PASSWORD")?.takeIf { it.isNotBlank() } + + signingConfigs { + if (keystoreFile != null && keystorePassword != null) { + create("release") { + storeFile = File(keystoreFile) + storePassword = keystorePassword + // Hardcoded, and NOT a secret: the alias is fixed for the life of + // this app and is written into the certificate every install + // already carries. Hiding it would buy nothing and stop this file + // describing its own signing setup. + keyAlias = "thoughtsync" + // PKCS12 cannot hold a key password distinct from the store + // password — keytool refuses to set one — so this is the same + // value by necessity rather than by shortcut. + keyPassword = keystorePassword + } + } + } + + buildTypes { + release { + isMinifyEnabled = false + proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") + // Null when no keystore reached this build, which leaves the APK + // unsigned and therefore uninstallable. `android.yml` builds debug in + // that case rather than producing an artifact nobody can put on a + // phone. + signingConfig = signingConfigs.findByName("release") + } + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } + + buildFeatures { + compose = true + } + + packaging { + resources.excludes += "/META-INF/{AL2.0,LGPL2.1}" + } +} + +/** + * Register the `.so` and the generated bindings as GENERATED sources. + * + * NOT `sourceSets { ... srcDir(task) }`: AGP 9 rejects a Provider there outright, + * because it cannot tell whether the directory holds generated (read-only) or + * hand-written (read-write) files — a distinction the IDE needs. The Variant API + * is the supported route and, unlike a bare path, `addGeneratedSourceDirectory` + * carries the task dependency, so Kotlin cannot compile before the bindings + * exist and the APK cannot package a stale `.so`. + */ +androidComponents { + onVariants { variant -> + variant.sources.kotlin?.addGeneratedSourceDirectory(generateBindings, UniffiBindgen::outputDir) + variant.sources.jniLibs?.addGeneratedSourceDirectory(cargoNdk, CargoNdkBuild::jniLibsDir) + } +} + +dependencies { + implementation(libs.androidx.core.ktx) + implementation(libs.androidx.activity.compose) + implementation(libs.androidx.lifecycle.viewmodel.compose) + implementation(libs.androidx.lifecycle.runtime.compose) + implementation(libs.kotlinx.coroutines.android) + implementation(libs.androidx.work.runtime) + + // Required by the uniffi bindings — see the catalog note on the @aar + // classifier; the plain jar builds fine and fails at runtime. + implementation(variantOf(libs.jna) { artifactType("aar") }) + + implementation(platform(libs.compose.bom)) + implementation(libs.compose.ui) + implementation(libs.compose.ui.graphics) + implementation(libs.compose.material3) + implementation(libs.compose.material.icons.core) + implementation(libs.compose.ui.tooling.preview) + debugImplementation(libs.compose.ui.tooling) + + testImplementation(libs.junit) +} diff --git a/android/app/proguard-rules.pro b/android/app/proguard-rules.pro new file mode 100644 index 0000000..1721620 --- /dev/null +++ b/android/app/proguard-rules.pro @@ -0,0 +1,7 @@ +# JNA reaches the native library reflectively, so R8 must not rename or strip +# either it or the uniffi bindings that ride on it. Without these a minified +# build fails at runtime with UnsatisfiedLinkError — and only in release, which +# is the worst possible time to learn it. +-keep class com.sun.jna.** { *; } +-keepclassmembers class * extends com.sun.jna.** { public *; } +-keep class com.fabledsword.thoughtsync.core.** { *; } diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..d80d757 --- /dev/null +++ b/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,139 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/android/app/src/main/java/com/fabledsword/thoughtsync/AppUpdate.kt b/android/app/src/main/java/com/fabledsword/thoughtsync/AppUpdate.kt new file mode 100644 index 0000000..3a64305 --- /dev/null +++ b/android/app/src/main/java/com/fabledsword/thoughtsync/AppUpdate.kt @@ -0,0 +1,151 @@ +package com.fabledsword.thoughtsync + +import android.content.Context +import android.content.Intent +import android.content.IntentSender +import android.content.pm.PackageInstaller +import android.net.Uri +import android.os.Build +import android.provider.Settings +import android.util.Log +import java.io.File + +/** + * Replacing this app with a newer build of itself. + * + * ## A PackageInstaller session, not an install intent + * + * The obvious route — `ACTION_VIEW` on the APK with + * `application/vnd.android.package-archive` — is the one on-device install + * heuristics are tuned against, and it is what produces the "bypassing Android + * security" warning the operator saw on Minstrel (Scribe note 2437). It also never + * tells the OS that this app is the legitimate updater of its own package, and it + * returns nothing: a failed install is indistinguishable from a person dismissing + * the dialog. + * + * A session says who is doing what. On Android 12+ it can also declare that no user + * action is required, which — paired with `UPDATE_PACKAGES_WITHOUT_USER_ACTION` — + * removes the confirmation dialog entirely on the UPDATE path. Not on a first + * install: the OS will not let an app quietly put a NEW package on a device, which + * is right. + * + * Two things from that same research that are NOT done here, deliberately: + * `setRequestUpdateOwnership` was chased and turned out to be a red herring, and + * `REQUEST_INSTALL_PACKAGES` is not the differentiator either — Mihon declares it + * too. The mechanism was the whole difference. + * + * ## The outcome comes back + * + * `commit` takes an `IntentSender`; the system reports the result to + * [UpdateReceiver], which is why a failure can be shown rather than guessed at. + */ +object AppUpdate { + private const val TAG = "ThoughtSyncUpdate" + + /** This build's versionCode — what the server's is compared against. */ + fun installedVersionCode(context: Context): Long = + runCatching { + context.packageManager.getPackageInfo(context.packageName, 0).longVersionCode + }.getOrDefault(0L) + + /** + * Whether this app may install packages at all. + * + * A separate grant from anything in the manifest, and one only the person can + * give. Checked before offering an update rather than after downloading 55 MiB. + */ + fun canInstall(context: Context): Boolean = context.packageManager.canRequestPackageInstalls() + + /** The settings page where that grant lives, scoped to this app. */ + fun installPermissionSettings(context: Context): Intent = + Intent(Settings.ACTION_MANAGE_UNKNOWN_APP_SOURCES) + .setData(Uri.fromParts("package", context.packageName, null)) + .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) + + /** Where a download goes: app-private, so no storage permission is involved. */ + fun downloadTarget(context: Context): File = File(context.cacheDir, "update.apk") + + /** + * Hand the APK to the system installer. + * + * Streamed into the session rather than passed as a path or a content URI — + * the session takes bytes, which is also why no FileProvider is needed here. + * + * Returns the failure to show, or null when the install was handed over + * successfully. "Handed over" is the honest word: the real outcome arrives + * later at [UpdateReceiver], because a commit that the system accepts can still + * fail afterwards. + */ + fun install( + context: Context, + apk: File, + ): String? { + val installer = context.packageManager.packageInstaller + var sessionId = -1 + return try { + val params = + PackageInstaller.SessionParams(PackageInstaller.SessionParams.MODE_FULL_INSTALL) + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { + // Only honoured on an UPDATE of an app signed with the same key — + // exactly our case, and the reason the signing work had to land + // first. Android ignores it for anything else rather than failing, + // so there is no need to guard on which it is. + params.setRequireUserAction(PackageInstaller.SessionParams.USER_ACTION_NOT_REQUIRED) + } + + sessionId = installer.createSession(params) + installer.openSession(sessionId).use { session -> + writeApk(session, apk) + session.commit(statusSender(context)) + } + null + } catch (e: Exception) { + // Broad on purpose: createSession throws IOException, openWrite throws, + // and the framework raises SecurityException for a revoked grant. All of + // them mean one thing to the person — it did not install — and none of + // them should take the app down. + Log.w(TAG, "could not start the install session", e) + if (sessionId != -1) runCatching { installer.abandonSession(sessionId) } + e.message ?: "The update could not be installed." + } + } + + /** + * Stream the APK into the session. + * + * Its own function only because the two nested `use` blocks read badly inline — + * and detekt agreed, which is fair: a stream inside a session inside a try is + * three things to hold at once. + */ + private fun writeApk( + session: PackageInstaller.Session, + apk: File, + ) { + session.openWrite(WRITE_NAME, 0, apk.length()).use { out -> + apk.inputStream().use { it.copyTo(out) } + // Before close: the session must have the bytes on disk, not sitting in + // a buffer, or commit can be handed a short file. + session.fsync(out) + } + } + + private fun statusSender(context: Context): IntentSender { + val intent = + Intent(context, UpdateReceiver::class.java).setAction(UpdateReceiver.ACTION_INSTALLED) + // MUTABLE, and this is the one place it is correct: the system fills the + // result extras in before delivering it. An immutable one would arrive with + // no status at all. + val flags = + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { + android.app.PendingIntent.FLAG_UPDATE_CURRENT or + android.app.PendingIntent.FLAG_MUTABLE + } else { + android.app.PendingIntent.FLAG_UPDATE_CURRENT + } + return android.app.PendingIntent + .getBroadcast(context, 0, intent, flags) + .intentSender + } + + private const val WRITE_NAME = "thoughtsync-update" +} diff --git a/android/app/src/main/java/com/fabledsword/thoughtsync/MainActivity.kt b/android/app/src/main/java/com/fabledsword/thoughtsync/MainActivity.kt new file mode 100644 index 0000000..f88d0f8 --- /dev/null +++ b/android/app/src/main/java/com/fabledsword/thoughtsync/MainActivity.kt @@ -0,0 +1,375 @@ +package com.fabledsword.thoughtsync + +import android.Manifest +import android.content.Intent +import android.os.Build +import android.os.Bundle +import androidx.activity.ComponentActivity +import androidx.activity.compose.BackHandler +import androidx.activity.compose.rememberLauncherForActivityResult +import androidx.activity.compose.setContent +import androidx.activity.enableEdgeToEdge +import androidx.activity.result.contract.ActivityResultContracts +import androidx.compose.runtime.Composable +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.MutableState +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.rememberCoroutineScope +import androidx.compose.runtime.saveable.rememberSaveable +import androidx.compose.runtime.setValue +import androidx.compose.ui.platform.LocalContext +import androidx.compose.ui.res.stringResource +import androidx.lifecycle.viewmodel.compose.viewModel +import com.fabledsword.thoughtsync.core.ThoughtSync +import com.fabledsword.thoughtsync.ui.BoardScreen +import com.fabledsword.thoughtsync.ui.BoardSync +import com.fabledsword.thoughtsync.ui.BoardViewModel +import com.fabledsword.thoughtsync.ui.ComposeSheet +import com.fabledsword.thoughtsync.ui.ForegroundTransitions +import com.fabledsword.thoughtsync.ui.NoteEditorScreen +import com.fabledsword.thoughtsync.ui.StoreUnavailableScreen +import com.fabledsword.thoughtsync.ui.SyncScreen +import com.fabledsword.thoughtsync.ui.SyncState +import com.fabledsword.thoughtsync.ui.SyncViewModel +import com.fabledsword.thoughtsync.ui.ThoughtSyncTheme +import com.fabledsword.thoughtsync.ui.UpdateViewModel +import com.fabledsword.thoughtsync.ui.olderThan +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.launch +import kotlinx.coroutines.withContext + +class MainActivity : ComponentActivity() { + /** + * The note a reminder notification asked for, waiting to be opened. + * + * Held on the Activity rather than passed to `setContent` once, because a tap + * on a notification while the app is already running arrives at [onNewIntent], + * not [onCreate] — the composition is long since built by then and the only + * way in is a piece of state it is already reading. + */ + private val requestedNote = mutableStateOf(null) + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + enableEdgeToEdge() + + val app = application as ThoughtSyncApplication + requestedNote.value = takeRequestedNote(intent) + + setContent { + ThoughtSyncTheme { + val core = app.core + if (core == null) { + // The store never opened. There is no board to show and no + // action that would help, so say what happened plainly rather + // than render an empty board that looks like data loss. + StoreUnavailableScreen(reason = app.openFailure) + } else { + App(core, requestedNote) + } + } + } + } + + override fun onNewIntent(intent: Intent) { + super.onNewIntent(intent) + setIntent(intent) + requestedNote.value = takeRequestedNote(intent) + } + + /** + * Read the note a notification asked for, and CONSUME it. + * + * The removal is the point. The Activity keeps the intent it was launched + * with, so without this, rotating the phone would replay it — reopening a note + * the person had tapped through and then closed, over and over, with no way to + * tell where it kept coming from. + */ + private fun takeRequestedNote(intent: Intent?): String? { + val id = intent?.getStringExtra(Reminders.EXTRA_NOTE_ID) ?: return null + intent.removeExtra(Reminders.EXTRA_NOTE_ID) + return id + } +} + +/** Which screen is up. Exactly one at a time. */ +private enum class Screen { BOARD, EDITOR, SYNC } + +/** + * The whole app, once the store is open. + * + * One screen composed at a time, never stacked: the editor and the sync screen + * both cover the display completely, so keeping the board's two-column grid + * measuring and recomposing underneath one would be pure waste. + * + * Still no navigation library. Three destinations, each entered from exactly one + * place and left by back — a nav graph would be ceremony around an enum, and the + * state that actually matters (which note is open, whether this device is linked) + * already lives in view models. + */ +@Composable +private fun App( + core: ThoughtSync, + requestedNote: MutableState, +) { + val context = LocalContext.current + val board: BoardViewModel = + viewModel( + factory = + BoardViewModel.factory(core) { + // Any store write can have moved the next reminder. Called on + // the IO dispatcher by the view model, which is where it has to + // be — this reads every note carrying a reminder. + Reminders.refresh(context, core) + }, + ) + + // Consumed, not just read: without clearing it, every later recomposition + // would reopen the same note and make the editor impossible to leave. + LaunchedEffect(requestedNote.value) { + requestedNote.value?.let { + board.openNoteById(it) + requestedNote.value = null + } + } + + ReminderAlarms(core) + // A pull can rewrite every note the board is holding, so a sync that changed + // anything tells it to reload. Wired here, at the one place that owns both. + val sync: SyncViewModel = + viewModel(factory = SyncViewModel.factory(core, onStoreChanged = board::refresh)) + + // Sheet and screen visibility are view STATE, not view-model state: they are + // about what is on the display, and nothing in the store cares. + // + // Saveable, though: `remember` alone meant rotating the phone closed whatever + // was open and took the half-written note in the capture sheet with it. The + // editor never had that problem because the note it is on lives in a view + // model; these two are the only screen state that did not. + var composing by rememberSaveable { mutableStateOf(false) } + var showingSync by rememberSaveable { mutableStateOf(false) } + + val update: UpdateViewModel = viewModel(factory = UpdateViewModel.factory(core, context)) + val settings = remember(context) { SyncSettings(context) } + var automatic by remember { mutableStateOf(settings.automatic) } + + AutomaticSync(state = sync.state, enabled = automatic, onSync = sync::syncQuietly) + + val editing = board.state.editing + val screen = + when { + showingSync -> Screen.SYNC + editing != null -> Screen.EDITOR + else -> Screen.BOARD + } + + when (screen) { + Screen.SYNC -> + SyncScreen( + state = sync.state, + onClose = { showingSync = false }, + onProbe = sync::probe, + onClearProbe = sync::clearProbe, + onLink = sync::link, + onSyncNow = sync::syncNow, + onUnlink = sync::unlink, + onDismissRevokeNotice = sync::dismissRevokeNotice, + automatic = automatic, + onAutomaticChange = { + automatic = it + settings.automatic = it + }, + update = update.state, + onCheckUpdate = update::check, + onInstallUpdate = update::downloadAndInstall, + onDismissUpdateError = update::dismissError, + onInstallOutcome = update::consumeInstallOutcome, + ) + + Screen.EDITOR -> + NoteEditorScreen( + // Non-null by construction: `screen` is EDITOR only when it is. + note = requireNotNull(editing) { "the editor screen needs a note" }, + labels = board.state.labels, + saving = board.state.saving, + error = board.state.error, + // The one seam between the editor and the store. Exhaustive at the + // other end, so a new action cannot be added without being handled. + onAction = { board.onEditorAction(editing, it) }, + ) + + Screen.BOARD -> { + BoardScreen( + state = board.state, + onOpen = board::open, + onOpenNote = board::openNote, + sync = + BoardSync( + summary = syncSummary(sync), + error = sync.state.syncError, + refreshing = sync.state.syncing, + // Only a linked device has anywhere to pull FROM. The + // board never learns this itself — one owner for the fact. + canRefresh = sync.state.linked, + onRefresh = sync::syncNow, + onDismissError = sync::dismissSyncError, + ), + onOpenSync = { showingSync = true }, + onSearch = board::search, + onCompose = { composing = true }, + onDismissError = board::dismissError, + ) + + if (composing) { + ComposeSheet( + saving = board.state.saving, + onDismiss = { composing = false }, + onSave = { kind, title, content -> + board.create(kind, title, content) + composing = false + }, + ) + } + } + } + + // The sync screen has no back handler of its own, so one lives here. The + // editor keeps its own, because it has to save the open note before leaving. + BackHandler(enabled = showingSync) { showingSync = false } +} + +/** + * Keeping the alarm current, and asking to be allowed to ring it. + * + * The refresh runs on every return to the foreground rather than once at launch: + * a reminder can have been set on the desktop and pulled in while this app was + * backgrounded, and the alarm is derived from the store, not from what the UI last + * saw. It is cheap and idempotent by construction — see [Reminders.refresh]. + * + * The permission is asked for on the first launch where a reminder actually + * exists. Android gives an app essentially one chance at this dialog, so spending + * it at first launch on an empty board — before the person has any idea what + * notifications this app would send — is spending it on nothing. + */ +@Composable +private fun ReminderAlarms(core: ThoughtSync) { + val context = LocalContext.current + val scope = rememberCoroutineScope() + // Off the main thread: this reads every note that has a reminder, and a phone + // holding a few hundred would drop frames doing it during a resume. + val refresh = { scope.launch(Dispatchers.IO) { Reminders.refresh(context, core) } } + + val prompt = + rememberLauncherForActivityResult(ActivityResultContracts.RequestPermission()) { + // Whatever the answer, re-derive: if it was yes, the reminders that + // could not be shown a moment ago can be shown now. + refresh() + } + + ForegroundTransitions(onForeground = { refresh() }, onBackground = {}) + + LaunchedEffect(Unit) { + // TIRAMISU is where POST_NOTIFICATIONS became a runtime permission. Below + // it, notifications are granted at install and there is nothing to ask. + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU) return@LaunchedEffect + val due = withContext(Dispatchers.IO) { Reminders.promptToNotifyDue(context, core) } + if (due) { + Reminders.markPromptShown(context) + prompt.launch(Manifest.permission.POST_NOTIFICATIONS) + } + } +} + +/** + * Syncing without being asked. + * + * Three moments, and they are not the same job: + * + * - **Coming to the front.** Someone opening the app expects what they are + * looking at to be true. Rate-limited by [STALE_MINUTES] so flicking between + * two apps is not a request for fresh notes. + * - **Going away with unsent work.** Handed to WorkManager rather than run + * inline, because the process is about to stop being a priority and a sync + * started here would be killed halfway. + * - **Every fifteen minutes.** The background heartbeat, so a phone in a pocket + * is roughly current before it is picked up. + * + * Being unlinked or having the switch off makes all three no-ops, and cancels the + * scheduled work rather than merely skipping it. + */ +@Composable +private fun AutomaticSync( + state: SyncState, + enabled: Boolean, + onSync: () -> Unit, +) { + val context = LocalContext.current + + // DECLARED as a function of two facts rather than toggled from the places + // that change them. There are four routes to "should not be syncing on its + // own" — never linked, just unlinked, switch off, switch off then unlink — + // and a call at each is four chances to leave a phone quietly syncing after + // it was told to stop. + LaunchedEffect(state.linked, enabled) { + if (state.linked && enabled) SyncSchedule.enable(context) else SyncSchedule.disable(context) + } + + var wanted by remember { mutableStateOf(false) } + ForegroundTransitions( + onForeground = { wanted = true }, + onBackground = { + // Unsent work follows the person out of the app. Without this, a note + // written on a phone that then goes into a pocket for the night does + // not reach the desktop until the app is opened again by hand. + if (enabled && state.linked && state.pending) SyncSchedule.pushSoon(context) + }, + ) + + // Keyed on `loading` so the decision waits for the stored link to be READ. At + // first composition `linked` is still false because nothing has looked in the + // database yet, and acting on that would skip the sync on every cold start. + LaunchedEffect(wanted, state.loading) { + if (!wanted || state.loading) return@LaunchedEffect + // Consumed here, so this fires exactly once per trip to the foreground + // however many times the effect restarts. Writing a key from inside the + // effect does restart it — but there is no suspension point between here + // and the call below, so the block runs to completion before the + // recomposition that would cancel it can be scheduled. + wanted = false + val worthIt = state.pending || olderThan(state.status?.lastSyncAt, STALE_MINUTES) + if (enabled && state.linked && worthIt) onSync() + } +} + +/** + * How stale the last sync has to be before opening the app triggers another. + * + * Not zero. Stepping out to copy a link and stepping back is not a request for + * fresh notes, and syncing on every app switch spends someone's mobile data to + * tell them what they are already looking at. Five minutes is short enough that + * coming back to the phone after doing something else gets current data, and + * long enough that flicking between two apps does not. + * + * Unsent local changes bypass this entirely — those go out at the first chance. + */ +private const val STALE_MINUTES = 5L + +/** + * One line of sync state for the drawer, or null when there is nothing to say. + * + * Deliberately silent while the status is still loading and when the device is + * simply unlinked-and-idle — an "Off" badge on a local-first app would frame its + * normal resting state as something switched off. + */ +@Composable +private fun syncSummary(sync: SyncViewModel): String? { + val state = sync.state + return when { + state.loading -> null + !state.linked -> null + state.pending -> stringResource(R.string.sync_badge_unsent) + else -> stringResource(R.string.sync_badge_on) + } +} diff --git a/android/app/src/main/java/com/fabledsword/thoughtsync/ReminderNotification.kt b/android/app/src/main/java/com/fabledsword/thoughtsync/ReminderNotification.kt new file mode 100644 index 0000000..e904209 --- /dev/null +++ b/android/app/src/main/java/com/fabledsword/thoughtsync/ReminderNotification.kt @@ -0,0 +1,121 @@ +package com.fabledsword.thoughtsync + +import android.app.NotificationChannel +import android.app.NotificationManager +import android.app.PendingIntent +import android.content.Context +import android.content.Intent +import android.util.Log +import androidx.core.app.NotificationCompat +import androidx.core.app.NotificationManagerCompat +import com.fabledsword.thoughtsync.core.Note + +/** + * What a due reminder looks like in the shade. + * + * Split from [Reminders] because the two answer different questions and change for + * different reasons: that one decides WHEN something should be said, this one + * decides how it is said and what can be done about it without opening the app. + */ +internal object ReminderNotification { + fun ensureChannel(context: Context) { + val channel = + NotificationChannel( + CHANNEL, + context.getString(R.string.reminder_channel), + // HIGH so a reminder can interrupt. Someone who asked to be + // reminded at a time has already said this may interrupt them; + // DEFAULT would leave it silent in the shade until next unlock. + NotificationManager.IMPORTANCE_HIGH, + ).apply { description = context.getString(R.string.reminder_channel_description) } + context + .getSystemService(NotificationManager::class.java) + ?.createNotificationChannel(channel) + } + + /** Post one reminder. Returns whether it actually reached the shade. */ + fun show( + context: Context, + note: Note, + ): Boolean { + val manager = NotificationManagerCompat.from(context) + // Not marked as announced when this is false, so a reminder is not silently + // burned by being "delivered" to a device that cannot show it — turning + // notifications on later still surfaces it. + if (!manager.areNotificationsEnabled()) return false + + val body = note.body.trim().takeIf { it.isNotEmpty() && it != note.displayTitle } + val builder = + NotificationCompat + .Builder(context, CHANNEL) + .setSmallIcon(R.drawable.ic_notification) + .setContentTitle(note.displayTitle) + .setCategory(NotificationCompat.CATEGORY_REMINDER) + .setPriority(NotificationCompat.PRIORITY_HIGH) + .setAutoCancel(true) + .setContentIntent(openIntent(context, note)) + .addAction( + 0, + context.getString(R.string.reminder_done), + action(context, note, ReminderReceiver.ACTION_DONE), + ).addAction( + 0, + context.getString(R.string.reminder_snooze_hour), + action(context, note, ReminderReceiver.ACTION_SNOOZE), + ) + + if (body != null) { + builder.setContentText(body).setStyle(NotificationCompat.BigTextStyle().bigText(body)) + } + + return runCatching { + manager.notify(note.id.hashCode(), builder.build()) + true + }.getOrElse { + // POST_NOTIFICATIONS can be revoked between the check and the post. + Log.w(TAG, "could not post reminder", it) + false + } + } + + /** Take a reminder off the shade, once it has been acted on. */ + fun dismiss( + context: Context, + noteId: String, + ) = NotificationManagerCompat.from(context).cancel(noteId.hashCode()) + + private fun openIntent( + context: Context, + note: Note, + ): PendingIntent = + PendingIntent.getActivity( + context, + note.id.hashCode(), + Intent(context, MainActivity::class.java) + .setAction(Intent.ACTION_VIEW) + .putExtra(Reminders.EXTRA_NOTE_ID, note.id) + // Reuse the running task rather than stacking a second copy of the + // app on top of itself; MainActivity picks the id up in onNewIntent. + .addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP or Intent.FLAG_ACTIVITY_CLEAR_TOP), + PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE, + ) + + private fun action( + context: Context, + note: Note, + what: String, + ): PendingIntent = + PendingIntent.getBroadcast( + context, + // Distinct per note AND per action, or the two would share one + // PendingIntent and Snooze would quietly perform Done. + (note.id + what).hashCode(), + Intent(context, ReminderReceiver::class.java) + .setAction(what) + .putExtra(Reminders.EXTRA_NOTE_ID, note.id), + PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE, + ) + + private const val CHANNEL = "reminders" + private const val TAG = "ThoughtSyncReminders" +} diff --git a/android/app/src/main/java/com/fabledsword/thoughtsync/ReminderReceiver.kt b/android/app/src/main/java/com/fabledsword/thoughtsync/ReminderReceiver.kt new file mode 100644 index 0000000..4a3d151 --- /dev/null +++ b/android/app/src/main/java/com/fabledsword/thoughtsync/ReminderReceiver.kt @@ -0,0 +1,72 @@ +package com.fabledsword.thoughtsync + +import android.content.BroadcastReceiver +import android.content.Context +import android.content.Intent +import android.util.Log +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.launch + +/** + * Everything that happens to a reminder while the app is not on screen. + * + * Four arrivals, one ending: whatever came in, the reminder picture is recomputed + * and the next alarm is set. That is deliberate — it means no path here has to + * remember to reschedule, and the one that fires an alarm cannot leave the device + * with no alarm pending. + * + * - **[ACTION_DUE]** — the alarm went off. Announce what is due. + * - **[ACTION_DONE] / [ACTION_SNOOZE]** — a notification button. Write it to the + * store, drop the notification. + * - **`BOOT_COMPLETED`** — alarms do not survive a restart, so every reminder on + * the device would silently stop existing without this. + * - **`MY_PACKAGE_REPLACED`** — an app update cancels them the same way. This + * device installs by APK from its own server, so updates are routine. + * + * ## Threading + * + * `onReceive` runs on the main thread and the store is blocking SQLite, so the + * work goes to [Dispatchers.IO] under [goAsync]. Without `goAsync` the process + * becomes killable the moment `onReceive` returns, which for a reminder firing at + * 3am is precisely when nothing is holding it up. + */ +class ReminderReceiver : BroadcastReceiver() { + override fun onReceive( + context: Context, + intent: Intent, + ) { + val core = (context.applicationContext as? ThoughtSyncApplication)?.core ?: return + val action = intent.action + val noteId = intent.getStringExtra(Reminders.EXTRA_NOTE_ID) + val app = context.applicationContext + + val pending = goAsync() + CoroutineScope(Dispatchers.IO).launch { + try { + when (action) { + ACTION_DONE -> noteId?.let { Reminders.complete(app, core, it) } + ACTION_SNOOZE -> noteId?.let { Reminders.snooze(app, core, it) } + // The alarm and the two system broadcasts all want the same + // thing, which is simply: look at the store and act on it. + else -> Unit + } + Reminders.refresh(app, core) + } catch (e: Exception) { + // Broad on purpose. Nobody is present, so an escaping exception is + // a crash report for something the person never initiated — and + // every path in here has already logged its own failure. + Log.w(TAG, "reminder broadcast failed: $action", e) + } finally { + pending.finish() + } + } + } + + companion object { + const val ACTION_DUE = "com.fabledsword.thoughtsync.REMINDER_DUE" + const val ACTION_DONE = "com.fabledsword.thoughtsync.REMINDER_DONE" + const val ACTION_SNOOZE = "com.fabledsword.thoughtsync.REMINDER_SNOOZE" + private const val TAG = "ThoughtSyncReminders" + } +} diff --git a/android/app/src/main/java/com/fabledsword/thoughtsync/Reminders.kt b/android/app/src/main/java/com/fabledsword/thoughtsync/Reminders.kt new file mode 100644 index 0000000..34686c8 --- /dev/null +++ b/android/app/src/main/java/com/fabledsword/thoughtsync/Reminders.kt @@ -0,0 +1,245 @@ +package com.fabledsword.thoughtsync + +import android.app.AlarmManager +import android.app.PendingIntent +import android.content.Context +import android.content.Intent +import android.os.Build +import android.util.Log +import androidx.core.app.NotificationManagerCompat +import com.fabledsword.thoughtsync.core.Note +import com.fabledsword.thoughtsync.core.ThoughtSync +import java.time.OffsetDateTime + +/** + * Getting a reminder in front of someone at the time they asked for. + * + * ## One alarm, not one per reminder + * + * Only the EARLIEST future reminder is ever scheduled. When it fires, everything + * now due is announced and the next one is scheduled. A hundred reminders cost one + * alarm, and there is no bookkeeping to get wrong when a note is edited on another + * device and arrives by sync — [refresh] recomputes the whole picture from the + * store every time. + * + * ## AlarmManager, not WorkManager + * + * The background sync runs on WorkManager and is right to: nobody minds whether it + * happens at 3:05 or 3:19. A reminder minded very much. WorkManager's periodic + * floor is fifteen minutes and it batches work into maintenance windows, so + * "remind me at 09:00" would routinely arrive at 09:14 — which is not a reminder, + * it is a rebuke. + * + * Exactness is asked for and not depended on: on Android 12+ it is a permission + * the person can refuse, and refusing drops this to an inexact alarm rather than + * to nothing. A reminder a few minutes late still beats no reminder, and pestering + * someone into a settings screen before the feature works at all is the coercion + * this product does not do. + */ +object Reminders { + const val EXTRA_NOTE_ID = "note_id" + + /** + * How long after its time a missed reminder is still worth announcing. + * + * The web uses fifteen minutes, because a tab that is open has been checking + * every forty-five seconds and anything older than that was almost certainly + * already seen. A phone can be switched off all night, so the equivalent + * question here — "could this plausibly not have been seen yet?" — has a much + * longer answer. Beyond a day it stops being a reminder and starts being + * archaeology; the note is still on the board, still marked overdue in red. + */ + private const val MISSED_WINDOW_MS = 24L * 60 * 60 * 1000 + + private const val SNOOZE_MINUTES = 60L + private const val TAG = "ThoughtSyncReminders" + + /** + * Announce what is due, then schedule the next one. + * + * Safe to call as often as anything might have changed — after an edit, after + * a sync, at launch, at boot. It reads the whole reminder set each time and + * derives everything from it, so there is no incremental state to drift. + */ + fun refresh( + context: Context, + core: ThoughtSync, + ) { + ReminderNotification.ensureChannel(context) + val notes = + runCatching { core.reminderNotes() } + .onFailure { Log.w(TAG, "could not read reminders", it) } + .getOrElse { return } + + val now = System.currentTimeMillis() + val announced = Announced(context) + // Intersecting with what still exists prunes the record in the same step: + // a reminder that was completed, snoozed to a new time or deleted drops out + // on its own, so this set cannot grow without bound. + val live = notes.mapNotNull { key(it) }.toSet() + val seen = announced.keys().intersect(live).toMutableSet() + + val due = notes.filter { at(it)?.let { ms -> ms <= now } == true } + if (!announced.primed) { + // First run on this device. Adopt everything already overdue SILENTLY: + // the storm case is linking a server and pulling months of history, and + // a hundred notifications the moment someone signs in is a good way to + // have them turn the feature off before it has ever been useful. + due.forEach { note -> key(note)?.let { seen += it } } + } else { + due.forEach { note -> + val k = key(note) ?: return@forEach + val overdueBy = now - (at(note) ?: return@forEach) + if (k !in seen && overdueBy <= MISSED_WINDOW_MS && ReminderNotification.show(context, note)) { + seen += k + } + } + } + + announced.write(seen) + scheduleNext(context, notes, now) + } + + /** + * Whether it is worth putting Android's notification prompt in front of someone. + * + * True only when there is a reminder that could actually fire and we have not + * asked before. Asking at launch on an empty board would be a dialog with no + * visible cause, which is how people learn to dismiss dialogs unread; asking + * again after a refusal is nagging, and the Reminders view carries a standing + * notice for anyone who changes their mind. + */ + fun promptToNotifyDue( + context: Context, + core: ThoughtSync, + ): Boolean = + !Announced(context).askedToNotify && + !NotificationManagerCompat.from(context).areNotificationsEnabled() && + runCatching { core.reminderNotes().isNotEmpty() }.getOrDefault(false) + + /** Remember that Android's prompt has been shown, whatever the answer was. */ + fun markPromptShown(context: Context) = Announced(context).markAsked() + + /** Clear the reminder, as the notification's Done action. */ + fun complete( + context: Context, + core: ThoughtSync, + noteId: String, + ) { + runCatching { core.completeReminder(noteId) } + .onFailure { Log.w(TAG, "could not complete reminder", it) } + ReminderNotification.dismiss(context, noteId) + } + + /** Push the reminder an hour out, as the notification's Snooze action. */ + fun snooze( + context: Context, + core: ThoughtSync, + noteId: String, + ) { + runCatching { core.snoozeReminder(noteId, SNOOZE_MINUTES) } + .onFailure { Log.w(TAG, "could not snooze reminder", it) } + ReminderNotification.dismiss(context, noteId) + } + + // ─────────────────────────────── scheduling ─────────────────────────────── + + private fun scheduleNext( + context: Context, + notes: List, + now: Long, + ) { + val alarms = context.getSystemService(AlarmManager::class.java) ?: return + val fire = + PendingIntent.getBroadcast( + context, + 0, + Intent(context, ReminderReceiver::class.java).setAction(ReminderReceiver.ACTION_DUE), + PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE, + ) + + val next = notes.mapNotNull { at(it) }.filter { it > now }.minOrNull() + if (next == null) { + alarms.cancel(fire) + return + } + + // RTC_WAKEUP: reminders are wall-clock times, and the point is to wake a + // sleeping phone. ELAPSED_REALTIME would drift against the clock the person + // actually set the reminder against. + runCatching { + if (canBeExact(alarms)) { + alarms.setExactAndAllowWhileIdle(AlarmManager.RTC_WAKEUP, next, fire) + } else { + alarms.setAndAllowWhileIdle(AlarmManager.RTC_WAKEUP, next, fire) + } + }.onFailure { + // setExact can still throw if the permission was revoked between the + // check and the call. Falling back beats losing the reminder entirely. + Log.w(TAG, "exact alarm refused, falling back to inexact", it) + runCatching { alarms.setAndAllowWhileIdle(AlarmManager.RTC_WAKEUP, next, fire) } + } + } + + /** + * Whether this device will let us fire at the exact minute. + * + * Below Android 12 there was no permission and exact alarms always worked. + * From 12 it is grantable and from 13 it is denied by default, so this is a + * question with a real answer rather than a formality. + */ + fun canBeExact(alarms: AlarmManager): Boolean = + Build.VERSION.SDK_INT < Build.VERSION_CODES.S || alarms.canScheduleExactAlarms() + + // ────────────────────────────── bookkeeping ────────────────────────────── + + /** Epoch millis of a note's reminder, or null if it has none we can read. */ + private fun at(note: Note): Long? = + note.remindAt?.let { + runCatching { OffsetDateTime.parse(it).toInstant().toEpochMilli() }.getOrNull() + } + + /** + * Identity of one OCCURRENCE, not of the note. + * + * The time is part of it so that snoozing — which rewrites `remind_at` — is a + * new thing to announce rather than one already dealt with. Same key the web + * store uses, for the same reason. + */ + private fun key(note: Note): String? = note.remindAt?.let { "${note.id}@$it" } +} + +/** Which reminder occurrences have already been put in front of someone. */ +private class Announced( + context: Context, +) { + private val prefs = + context.applicationContext.getSharedPreferences(FILE, Context.MODE_PRIVATE) + + /** False only before the very first [Reminders.refresh] on this install. */ + val primed: Boolean get() = prefs.getBoolean(KEY_PRIMED, false) + + // Copied: the set from getStringSet must not be mutated, and the docs are + // explicit that doing so corrupts what is stored. + fun keys(): Set = prefs.getStringSet(KEY_SEEN, emptySet())?.toSet().orEmpty() + + fun write(keys: Set) { + prefs + .edit() + .putStringSet(KEY_SEEN, keys) + .putBoolean(KEY_PRIMED, true) + .apply() + } + + /** Survives a restart, so the prompt is a one-off rather than once per launch. */ + val askedToNotify: Boolean get() = prefs.getBoolean(KEY_ASKED, false) + + fun markAsked() = prefs.edit().putBoolean(KEY_ASKED, true).apply() + + private companion object { + const val FILE = "thoughtsync-reminders" + const val KEY_SEEN = "announced" + const val KEY_PRIMED = "primed" + const val KEY_ASKED = "asked_to_notify" + } +} diff --git a/android/app/src/main/java/com/fabledsword/thoughtsync/SyncSchedule.kt b/android/app/src/main/java/com/fabledsword/thoughtsync/SyncSchedule.kt new file mode 100644 index 0000000..1bc5456 --- /dev/null +++ b/android/app/src/main/java/com/fabledsword/thoughtsync/SyncSchedule.kt @@ -0,0 +1,94 @@ +package com.fabledsword.thoughtsync + +import android.content.Context +import androidx.work.BackoffPolicy +import androidx.work.Constraints +import androidx.work.ExistingPeriodicWorkPolicy +import androidx.work.ExistingWorkPolicy +import androidx.work.NetworkType +import androidx.work.OneTimeWorkRequestBuilder +import androidx.work.PeriodicWorkRequestBuilder +import androidx.work.WorkManager +import java.util.concurrent.TimeUnit + +/** + * When the system should sync on its own. + * + * All of the policy lives here rather than being spread across the call sites, + * because the interesting question is not "how do I enqueue work" but "how often + * is often enough" — and that answer should be readable in one place. + * + * Two jobs, deliberately different: + * + * - **[enable]** is the heartbeat. Fifteen minutes is not a preference, it is + * WorkManager's floor for periodic work; asking for less silently gets you + * fifteen anyway. It keeps a phone that is sitting in a pocket roughly current + * so that opening the app is not a wait. + * - **[pushSoon]** is for the moment a person walks away from a note they just + * wrote. Waiting up to fifteen minutes to hand that to the server is the + * difference between "my notes are everywhere" and "my notes are on whichever + * device I used last", which is the whole point of the product. + * + * Both require a network. Without that constraint every run on a phone with no + * signal would wake the process, open SQLite, fail a connection and burn the + * retry budget for nothing. + */ +object SyncSchedule { + /** Every 15 minutes while linked. */ + fun enable(context: Context) { + val request = + PeriodicWorkRequestBuilder(PERIOD_MINUTES, TimeUnit.MINUTES) + .setConstraints(networkRequired()) + .setBackoffCriteria(BackoffPolicy.EXPONENTIAL, BACKOFF_SECONDS, TimeUnit.SECONDS) + .build() + + // UPDATE, not KEEP: this is called on every launch, and KEEP would ignore + // a changed interval forever on any device that had ever enqueued the old + // one. UPDATE applies the change WITHOUT resetting the next run, so + // opening the app repeatedly cannot push the sync further away each time. + WorkManager + .getInstance(context) + .enqueueUniquePeriodicWork(PERIODIC, ExistingPeriodicWorkPolicy.UPDATE, request) + } + + /** Stop syncing on our own: unlinked, or the person turned it off. */ + fun disable(context: Context) { + WorkManager.getInstance(context).apply { + cancelUniqueWork(PERIODIC) + cancelUniqueWork(PUSH) + } + } + + /** + * Get whatever is unsent off this device, as soon as there is a network. + * + * Enqueued when the app goes to the background holding unsent changes, so a + * note survives being written on a phone that is then put away for the night. + */ + fun pushSoon(context: Context) { + val request = + OneTimeWorkRequestBuilder() + .setConstraints(networkRequired()) + .setBackoffCriteria(BackoffPolicy.EXPONENTIAL, BACKOFF_SECONDS, TimeUnit.SECONDS) + .build() + + // REPLACE rather than KEEP: if an earlier attempt is sitting in a long + // backoff, the person has just given us a reason to try again sooner. + WorkManager + .getInstance(context) + .enqueueUniqueWork(PUSH, ExistingWorkPolicy.REPLACE, request) + } + + private fun networkRequired(): Constraints = + Constraints + .Builder() + .setRequiredNetworkType(NetworkType.CONNECTED) + .build() + + private const val PERIODIC = "thoughtsync-periodic-sync" + private const val PUSH = "thoughtsync-push-pending" + + /** WorkManager's own minimum for periodic work. Asking for less gets this. */ + private const val PERIOD_MINUTES = 15L + private const val BACKOFF_SECONDS = 30L +} diff --git a/android/app/src/main/java/com/fabledsword/thoughtsync/SyncSettings.kt b/android/app/src/main/java/com/fabledsword/thoughtsync/SyncSettings.kt new file mode 100644 index 0000000..bc7abf6 --- /dev/null +++ b/android/app/src/main/java/com/fabledsword/thoughtsync/SyncSettings.kt @@ -0,0 +1,44 @@ +package com.fabledsword.thoughtsync + +import android.content.Context + +/** + * Whether this device syncs on its own, and nothing else. + * + * Device-local on purpose. Every other piece of sync state — the server, the + * token, the cursor — lives in the core's SQLite file because it describes the + * PAIRING and has to survive a reinstall to the same account. This describes + * how one phone behaves, and a person who turns it off on their handset is not + * asking their laptop to stop. + * + * `SharedPreferences` rather than the store because the background worker reads + * it on a process the system started, where reaching for the core would mean + * depending on the store having opened successfully to answer a question that + * has nothing to do with the store. + */ +class SyncSettings( + context: Context, +) { + // applicationContext: this outlives any Activity, and holding one here would + // leak the whole window when the phone rotates. + private val prefs = + context.applicationContext.getSharedPreferences(FILE, Context.MODE_PRIVATE) + + /** + * Defaults to ON. + * + * Linking a server IS the consent — a person who paired this device and then + * had to find a second switch before anything moved would reasonably call + * that broken. Turning it off leaves manual sync working exactly as before. + */ + var automatic: Boolean + get() = prefs.getBoolean(KEY_AUTOMATIC, true) + set(value) { + prefs.edit().putBoolean(KEY_AUTOMATIC, value).apply() + } + + private companion object { + const val FILE = "thoughtsync-sync" + const val KEY_AUTOMATIC = "automatic" + } +} diff --git a/android/app/src/main/java/com/fabledsword/thoughtsync/SyncWorker.kt b/android/app/src/main/java/com/fabledsword/thoughtsync/SyncWorker.kt new file mode 100644 index 0000000..e788f0e --- /dev/null +++ b/android/app/src/main/java/com/fabledsword/thoughtsync/SyncWorker.kt @@ -0,0 +1,72 @@ +package com.fabledsword.thoughtsync + +import android.content.Context +import android.util.Log +import androidx.work.CoroutineWorker +import androidx.work.WorkerParameters + +/** + * One sync cycle, run by the system rather than by a person. + * + * WorkManager may start the process to run this, which means [ThoughtSyncApplication.onCreate] + * has already opened the store by the time [doWork] is called — the same handle + * the UI uses, so there is never a second SQLite connection racing the first. + * + * The automatic-sync switch is checked here as well as at scheduling time. That + * does NOT avoid opening the store — `onCreate` has already done it by the time + * any Worker runs — it avoids the network call and the writes. + * + * ## Why the outcome is thrown away + * + * A run that nobody asked for must not become a notification, a banner, or + * anything else that interrupts. If it pulled changes, the board reloads next + * time it is looked at; if it pushed them, they are gone from the outbox. The + * one thing the person can act on — "there are unsent notes" — is already told + * by the drawer badge, from `has_pending`, which does not care how the attempt + * was made. + */ +class SyncWorker( + context: Context, + params: WorkerParameters, +) : CoroutineWorker(context, params) { + override suspend fun doWork(): Result { + val core = (applicationContext as? ThoughtSyncApplication)?.core + + // Both of these are "nothing to do", not "something went wrong", so both + // report success and let the run retire quietly: + // * automatic sync was switched off after this was enqueued — the + // schedule is cancelled then, but a run already handed to the system + // can still land; + // * the store never opened, which no retry fixes this launch and which + // the UI is already reporting to whoever is looking. + if (!SyncSettings(applicationContext).automatic || core == null) return Result.success() + + return try { + // Unlinked since this was enqueued. Not a failure — retrying would + // burn the backoff schedule on a device that has no server. + if (core.syncStatus().linked) { + val outcome = core.syncNow() + Log.i(TAG, "background sync at ${outcome.status.lastSyncAt}") + // A pull can have brought in a reminder set on another device, or + // moved one this phone already knew about. The alarm is derived + // from the store, so it has to be re-derived whenever the store + // changed underneath it — otherwise a reminder made at a desk + // never rings on the phone until the app is next opened. + Reminders.refresh(applicationContext, core) + } + Result.success() + } catch (e: Exception) { + // Deliberately broad, and deliberately `retry` rather than `failure`: + // almost everything that goes wrong here is a flat tyre — no route to + // the server, a laptop asleep, a token being rotated. Retry hands it + // to WorkManager's exponential backoff; `failure` would drop the run + // for good and strand the notes until someone opens the app by hand. + Log.w(TAG, "background sync failed, will retry", e) + Result.retry() + } + } + + private companion object { + const val TAG = "ThoughtSyncWorker" + } +} diff --git a/android/app/src/main/java/com/fabledsword/thoughtsync/ThoughtSyncApplication.kt b/android/app/src/main/java/com/fabledsword/thoughtsync/ThoughtSyncApplication.kt new file mode 100644 index 0000000..1303297 --- /dev/null +++ b/android/app/src/main/java/com/fabledsword/thoughtsync/ThoughtSyncApplication.kt @@ -0,0 +1,49 @@ +package com.fabledsword.thoughtsync + +import android.app.Application +import android.util.Log +import com.fabledsword.thoughtsync.core.ThoughtSync + +/** + * Opens the shared Rust core once, for the process lifetime. + * + * The store is a single SQLite file behind a mutex, so one handle is both + * sufficient and correct — a second would be two connections racing for the same + * lock. This mirrors how the desktop manages it as Tauri app state. + * + * [filesDir] is app-private storage: readable by this app and nothing else, + * removed on uninstall, and never on external media. The core does not guess at + * platform paths; Android is the only thing that knows where this is. + */ +class ThoughtSyncApplication : Application() { + /** + * Null only if the store could not be opened — a corrupt or unwritable + * database. The UI reports that honestly rather than crashing on first + * touch, because a user whose notes won't open needs a message, not a + * stack trace. + */ + var core: ThoughtSync? = null + private set + + var openFailure: String? = null + private set + + override fun onCreate() { + super.onCreate() + try { + val handle = ThoughtSync(filesDir.absolutePath) + core = handle + Log.i(TAG, "local store ready — ${handle.summary()}") + } catch (e: Exception) { + // Deliberately broad: whatever went wrong, the app still has to + // start and say so. Narrowing this would mean an unanticipated + // failure mode takes the process down at launch instead. + openFailure = e.message ?: e.toString() + Log.e(TAG, "could not open the local store", e) + } + } + + private companion object { + const val TAG = "ThoughtSync" + } +} diff --git a/android/app/src/main/java/com/fabledsword/thoughtsync/UpdateOutcome.kt b/android/app/src/main/java/com/fabledsword/thoughtsync/UpdateOutcome.kt new file mode 100644 index 0000000..b027884 --- /dev/null +++ b/android/app/src/main/java/com/fabledsword/thoughtsync/UpdateOutcome.kt @@ -0,0 +1,37 @@ +package com.fabledsword.thoughtsync + +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.setValue + +/** + * The last thing the system said about an install, waiting to be shown. + * + * A process-wide holder because the two ends cannot reach each other any other + * way: [UpdateReceiver] is constructed by the system, and the view model that + * wants the answer is owned by the composition. The alternative — a bound service + * or a broadcast the UI also listens for — is more machinery for one nullable + * string. + * + * Safe as snapshot state: `onReceive` runs on the main thread, which is where + * Compose expects its state to be written. + */ +object UpdateOutcome { + /** `error == null` means it went through, or the person declined. */ + data class Result( + val error: String?, + ) + + /** Null until the system has said something about an install we committed. */ + var latest: Result? by mutableStateOf(null) + private set + + fun report(error: String?) { + latest = Result(error) + } + + /** Called once the UI has shown it, so a later install starts from silence. */ + fun clear() { + latest = null + } +} diff --git a/android/app/src/main/java/com/fabledsword/thoughtsync/UpdateReceiver.kt b/android/app/src/main/java/com/fabledsword/thoughtsync/UpdateReceiver.kt new file mode 100644 index 0000000..63e2c1c --- /dev/null +++ b/android/app/src/main/java/com/fabledsword/thoughtsync/UpdateReceiver.kt @@ -0,0 +1,77 @@ +package com.fabledsword.thoughtsync + +import android.content.BroadcastReceiver +import android.content.Context +import android.content.Intent +import android.content.pm.PackageInstaller +import android.util.Log + +/** + * What the system says about an install we committed. + * + * Without this the app would `commit` and learn nothing — a failed install would + * look exactly like a person deciding not to go ahead, and the update card would + * sit there claiming an update is available with no explanation of why nothing + * happened. That was the specific complaint recorded against Minstrel's first + * attempt (Scribe #2438). + * + * The result is written to [UpdateOutcome] rather than notified: the app is on + * screen when this fires — someone just tapped Update — so the place to say it is + * the card they are looking at. + */ +class UpdateReceiver : BroadcastReceiver() { + override fun onReceive( + context: Context, + intent: Intent, + ) { + if (intent.action != ACTION_INSTALLED) return + + val status = intent.getIntExtra(PackageInstaller.EXTRA_STATUS, Int.MIN_VALUE) + val message = intent.getStringExtra(PackageInstaller.EXTRA_STATUS_MESSAGE) + + when (status) { + PackageInstaller.STATUS_PENDING_USER_ACTION -> { + // Android wants a confirmation. This is the ORDINARY path below API + // 31, and the path on 31+ whenever the OS declines to skip the + // dialog — which it may, and is entitled to. + val confirm = + @Suppress("DEPRECATION") + intent.getParcelableExtra(Intent.EXTRA_INTENT) + if (confirm == null) { + UpdateOutcome.report("Android asked for confirmation but sent no way to give it.") + return + } + // NEW_TASK because a receiver has no activity of its own to start + // from. The app is in the foreground, so this surfaces immediately. + confirm.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) + runCatching { context.startActivity(confirm) } + .onFailure { + Log.w(TAG, "could not show the install confirmation", it) + UpdateOutcome.report("Android's install confirmation could not be shown.") + } + } + + PackageInstaller.STATUS_SUCCESS -> { + // Rarely seen: a successful self-update replaces this process, so + // the app is usually gone before it can act on this. + Log.i(TAG, "update installed") + UpdateOutcome.report(null) + } + + PackageInstaller.STATUS_FAILURE_ABORTED -> + // Someone declined. Not an error, and saying "install failed" for a + // deliberate choice is how an app sounds broken when it is not. + UpdateOutcome.report(null) + + else -> { + Log.w(TAG, "install failed: status=$status message=$message") + UpdateOutcome.report(message ?: "The update did not install.") + } + } + } + + companion object { + const val ACTION_INSTALLED = "com.fabledsword.thoughtsync.UPDATE_INSTALLED" + private const val TAG = "ThoughtSyncUpdate" + } +} diff --git a/android/app/src/main/java/com/fabledsword/thoughtsync/ui/BoardScreen.kt b/android/app/src/main/java/com/fabledsword/thoughtsync/ui/BoardScreen.kt new file mode 100644 index 0000000..a20c4b3 --- /dev/null +++ b/android/app/src/main/java/com/fabledsword/thoughtsync/ui/BoardScreen.kt @@ -0,0 +1,434 @@ +package com.fabledsword.thoughtsync.ui + +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.PaddingValues +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.lazy.LazyColumn +import androidx.compose.foundation.lazy.staggeredgrid.LazyVerticalStaggeredGrid +import androidx.compose.foundation.lazy.staggeredgrid.StaggeredGridCells +import androidx.compose.foundation.lazy.staggeredgrid.items +import androidx.compose.foundation.rememberScrollState +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.foundation.text.KeyboardActions +import androidx.compose.foundation.text.KeyboardOptions +import androidx.compose.foundation.verticalScroll +import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.filled.Add +import androidx.compose.material.icons.filled.Close +import androidx.compose.material.icons.filled.Menu +import androidx.compose.material.icons.filled.Search +import androidx.compose.material3.CircularProgressIndicator +import androidx.compose.material3.DrawerValue +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.material3.FloatingActionButton +import androidx.compose.material3.HorizontalDivider +import androidx.compose.material3.Icon +import androidx.compose.material3.IconButton +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.ModalDrawerSheet +import androidx.compose.material3.ModalNavigationDrawer +import androidx.compose.material3.NavigationDrawerItem +import androidx.compose.material3.Scaffold +import androidx.compose.material3.Surface +import androidx.compose.material3.Text +import androidx.compose.material3.pulltorefresh.PullToRefreshDefaults +import androidx.compose.material3.pulltorefresh.pullToRefresh +import androidx.compose.material3.pulltorefresh.rememberPullToRefreshState +import androidx.compose.material3.rememberDrawerState +import androidx.compose.runtime.Composable +import androidx.compose.runtime.rememberCoroutineScope +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.text.input.ImeAction +import androidx.compose.ui.unit.dp +import com.fabledsword.thoughtsync.R +import com.fabledsword.thoughtsync.core.Label +import com.fabledsword.thoughtsync.core.Note +import kotlinx.coroutines.launch + +@Composable +fun BoardScreen( + state: BoardState, + onOpen: (Destination) -> Unit, + onOpenNote: (Note) -> Unit, + sync: BoardSync, + onOpenSync: () -> Unit, + onSearch: (String) -> Unit, + onCompose: () -> Unit, + onDismissError: () -> Unit, +) { + val drawerState = rememberDrawerState(DrawerValue.Closed) + val scope = rememberCoroutineScope() + + ModalNavigationDrawer( + drawerState = drawerState, + drawerContent = { + NavigationDrawer( + current = state.destination, + labels = state.labels, + syncSummary = sync.summary, + onOpen = { + onOpen(it) + scope.launch { drawerState.close() } + }, + onOpenSync = { + onOpenSync() + scope.launch { drawerState.close() } + }, + ) + }, + ) { + Scaffold( + floatingActionButton = { + // The + is the ONLY way in, by design: one obvious target rather + // than a capture bar and a button competing for the same job. + FloatingActionButton( + onClick = onCompose, + containerColor = MaterialTheme.colorScheme.primary, + contentColor = MaterialTheme.colorScheme.onPrimary, + ) { + Icon(Icons.Filled.Add, contentDescription = stringResource(R.string.compose_open)) + } + }, + ) { padding -> + Column(modifier = Modifier.fillMaxSize().padding(padding)) { + SearchBar( + query = state.query, + onQueryChange = onSearch, + onMenu = { scope.launch { drawerState.open() } }, + ) + + state.error?.let { message -> + ErrorBanner(message = message, onDismiss = onDismissError) + } + // Stacked rather than one-or-the-other. A store failure and a sync + // failure are different facts about different halves of the app; + // hiding either behind the other would report the wrong problem. + sync.error?.let { message -> + ErrorBanner(message = message, onDismiss = sync.onDismissError) + } + + // Only where someone is already thinking about reminders. On the + // main board it would nag people who have never set one. + if (state.destination == Destination.Reminders) ReminderNotice() + + val pull = rememberPullToRefreshState() + Box( + modifier = + Modifier + .fillMaxSize() + .pullToRefresh( + isRefreshing = sync.refreshing, + state = pull, + // INERT on a device with no server, rather than + // spinning and finding nothing: there is no remote + // to fetch from, and a gesture that always comes + // back empty teaches people it is broken. + enabled = sync.canRefresh && !state.loading, + onRefresh = sync.onRefresh, + ), + ) { + when { + state.loading -> LoadingBoard() + state.notes.isEmpty() -> EmptyBoard(state) + else -> NoteBoard(notes = state.notes, onOpenNote = onOpenNote) + } + // `PullToRefreshBox` would be less code, but it takes no + // `enabled`, so the modifier and the indicator are wired by + // hand to keep the gate above. + PullToRefreshDefaults.Indicator( + state = pull, + isRefreshing = sync.refreshing, + modifier = Modifier.align(Alignment.TopCenter), + ) + } + } + } + } +} + +/** + * Everything the board knows about sync, which is deliberately not much. + * + * A holder rather than six loose parameters, for the reason `EditorAction` + * exists: [summary] and [error] are both `String?` and both about sync, so as + * positional arguments they could be swapped with nothing to catch it. Named + * fields make that unsayable. + * + * Passed in rather than read from [BoardState]. Sync has its own view model, and + * giving the board a second copy of "is this device linked" would be two sources + * of truth for one fact. + */ +data class BoardSync( + /** One line for the drawer badge, or null when there is nothing worth saying. */ + val summary: String?, + /** The last sync failure, still unacknowledged. */ + val error: String?, + /** A sync is in flight — drives the indicator, whoever started it. */ + val refreshing: Boolean, + /** Whether there is a server to refresh FROM. False means the gesture is off. */ + val canRefresh: Boolean, + val onRefresh: () -> Unit, + val onDismissError: () -> Unit, +) + +/** + * A search field IS the top bar, following the phone convention rather than the + * desktop's title-plus-sidebar. + * + * On a phone, finding a note you already wrote is the most common thing after + * writing one, and burying it behind an icon costs a tap every time. The drawer + * lives inside it on the left, which is where every Android user reaches for + * navigation. + */ +@OptIn(ExperimentalMaterial3Api::class) +@Composable +private fun SearchBar( + query: String, + onQueryChange: (String) -> Unit, + onMenu: () -> Unit, +) { + Surface( + // No `statusBarsPadding()` here. The Scaffold this sits in already applies + // the system-bar insets to its content padding, so adding them again put + // the whole status bar's height of empty space above the search field — + // roughly a centimetre of nothing at the top of the first screen anyone + // sees. Insets get consumed once, by whichever component owns the edge. + modifier = + Modifier + .fillMaxWidth() + .padding(horizontal = GUTTER, vertical = 8.dp), + shape = RoundedCornerShape(SEARCH_RADIUS), + color = MaterialTheme.colorScheme.surfaceVariant, + tonalElevation = 0.dp, + ) { + Row(verticalAlignment = Alignment.CenterVertically) { + IconButton(onClick = onMenu) { + Icon(Icons.Filled.Menu, contentDescription = stringResource(R.string.nav_open)) + } + PlainTextField( + value = query, + onValueChange = onQueryChange, + modifier = Modifier.weight(1f), + hint = R.string.search_hint, + singleLine = true, + // The search key is decorative here: results already land as you + // type, so pressing it should dismiss the keyboard and change + // nothing, which is what an empty handler does. + keyboardOptions = KeyboardOptions(imeAction = ImeAction.Search), + keyboardActions = KeyboardActions(onSearch = {}), + ) + if (query.isNotEmpty()) { + IconButton(onClick = { onQueryChange("") }) { + Icon(Icons.Filled.Close, contentDescription = stringResource(R.string.search_clear)) + } + } else { + Icon( + Icons.Filled.Search, + contentDescription = null, + modifier = Modifier.padding(end = 12.dp), + tint = MaterialTheme.colorScheme.onSurfaceVariant, + ) + } + } + } +} + +@Composable +private fun NavigationDrawer( + current: Destination, + labels: List