Skip to content

Your Android phone and your Windows PC, working as one. Local-first, end-to-end encrypted, no account.

Prepare the repository for publishing

Bee13a20aaa6539
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
new file mode 100644
index 0000000..6ec29a4
--- /dev/null
+++ b/.github/CODEOWNERS
@@ -0,0 +1,2 @@
+# Default reviewers for every change.
+* @thtbee
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
new file mode 100644
index 0000000..191854a
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -0,0 +1,48 @@
+name: Bug report
+description: Something doesn't work as expected.
+labels: [bug]
+body:
+ - type: markdown
+ attributes:
+ value: |
+ Thanks for reporting. Nectarlink is in early development, so please check
+ the open issues first. Security problems go through SECURITY.md instead.
+ - type: textarea
+ id: what-happened
+ attributes:
+ label: What happened
+ description: What you did, what you expected, and what happened instead.
+ validations:
+ required: true
+ - type: textarea
+ id: steps
+ attributes:
+ label: Steps to reproduce
+ placeholder: |
+ 1. ...
+ 2. ...
+ validations:
+ required: true
+ - type: input
+ id: windows
+ attributes:
+ label: Windows version and build
+ placeholder: Windows 11 24H2 (26100.1234), x64
+ - type: input
+ id: phone
+ attributes:
+ label: Phone model and Android version
+ placeholder: Pixel 9, Android 16
+ - type: input
+ id: versions
+ attributes:
+ label: Nectarlink versions
+ description: Desktop app and Android app (commit hash if built from source).
+ - type: textarea
+ id: logs
+ attributes:
+ label: Logs
+ description: >
+ Desktop logs are in %LOCALAPPDATA%\Nectarlink\logs. Please remove anything
+ personal before attaching them.
+ render: text
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
new file mode 100644
index 0000000..272e9b5
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -0,0 +1,5 @@
+blank_issues_enabled: false
+contact_links:
+ - name: Security issue
+ url: https://github.com/thtbee/nectarlink/security/advisories/new
+ about: Report security problems privately, never in a public issue.
diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml
new file mode 100644
index 0000000..536b529
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/feature_request.yml
@@ -0,0 +1,25 @@
+name: Feature request
+description: Suggest an improvement or a new feature.
+labels: [enhancement]
+body:
+ - type: markdown
+ attributes:
+ value: |
+ Please check docs/PLAN.md first: many features are already planned.
+ - type: textarea
+ id: problem
+ attributes:
+ label: The problem
+ description: What are you trying to do, and what gets in the way today?
+ validations:
+ required: true
+ - type: textarea
+ id: proposal
+ attributes:
+ label: Proposal
+ description: How you would like it to work.
+ - type: textarea
+ id: alternatives
+ attributes:
+ label: Alternatives
+ description: Other ways to solve it, or how other apps handle it.
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 0000000..d3fcbaa
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,23 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
+version: 2
+updates:
+ - package-ecosystem: cargo
+ directory: /
+ schedule:
+ interval: weekly
+ groups:
+ rust:
+ patterns: ["*"]
+ update-types: [minor, patch]
+ - package-ecosystem: gradle
+ directory: /android
+ schedule:
+ interval: weekly
+ groups:
+ android:
+ patterns: ["*"]
+ update-types: [minor, patch]
+ - package-ecosystem: github-actions
+ directory: /
+ schedule:
+ interval: monthly
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
new file mode 100644
index 0000000..d1d65dc
--- /dev/null
+++ b/.github/pull_request_template.md
@@ -0,0 +1,14 @@
+## What and why
+
+<!-- What this change does and the problem it solves. Link the issue if there is one. -->
+
+## How it was tested
+
+<!-- Tests added or run, and manual checks (Windows build, phone model, Android version). -->
+
+## Checklist
+
+- [ ] `./scripts/check.ps1` passes (or the CI equivalent for the parts I changed)
+- [ ] User-facing strings are translatable, and new UI works with keyboard and screen readers
+- [ ] No personal content (notification text, messages, file names, keys) is logged
+- [ ] Commits are signed off (`git commit -s`), see [CONTRIBUTING.md](../CONTRIBUTING.md)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..843f207
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,137 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
+name: CI
+
+on:
+ push:
+ branches: [main]
+ pull_request:
+ workflow_dispatch:
+
+permissions:
+ contents: read
+
+concurrency:
+ group: ci-${{ github.ref }}
+ cancel-in-progress: ${{ github.event_name == 'pull_request' }}
+
+env:
+ CARGO_TERM_COLOR: always
+ QT_VERSION: "6.12.0"
+ # The crates that build without Qt or the Android NDK.
+ CORE_CRATES: -p nectarlink-protocol -p nectarlink-core -p nectarlink-ffi -p nectarlink-cli -p xtask
+
+jobs:
+ core:
+ name: Core (${{ matrix.os }})
+ runs-on: ${{ matrix.os }}
+ strategy:
+ fail-fast: false
+ matrix:
+ os: [ubuntu-latest, windows-latest]
+ steps:
+ - uses: actions/checkout@v7
+ - name: Install the pinned Rust toolchain
+ run: rustup show active-toolchain || rustup toolchain install
+ - uses: Swatinem/rust-cache@v2
+ - name: Format
+ if: runner.os == 'Linux'
+ run: cargo fmt --all --check
+ - name: Clippy
+ shell: bash
+ run: cargo clippy --locked $CORE_CRATES --all-targets -- -D warnings
+ - name: Tests
+ shell: bash
+ run: cargo test --locked $CORE_CRATES
+ - name: Generated files are up to date
+ if: runner.os == 'Linux'
+ run: cargo xtask tokens --check
+
+ desktop:
+ name: Windows app (x64)
+ runs-on: windows-latest
+ steps:
+ - uses: actions/checkout@v7
+ - name: Install the pinned Rust toolchain
+ run: rustup show active-toolchain || rustup toolchain install
+ - uses: Swatinem/rust-cache@v2
+ - name: Install Qt
+ uses: jurplel/install-qt-action@v4
+ with:
+ version: ${{ env.QT_VERSION }}
+ host: windows
+ target: desktop
+ arch: win64_msvc2022_64
+ cache: true
+ # Qt 6.12's repository layout needs a current aqtinstall.
+ aqtsource: git+https://github.com/miurahr/aqtinstall.git
+ - name: Clippy
+ run: cargo clippy --locked -p nectarlink-desktop -p s1-qt-rust --all-targets -- -D warnings
+ - name: Tests
+ run: cargo test --locked -p nectarlink-desktop
+ - name: Release build
+ run: cargo build --locked --release -p nectarlink-desktop
+
+ desktop-arm64:
+ name: Windows app (ARM64 cross build)
+ runs-on: windows-latest
+ steps:
+ - uses: actions/checkout@v7
+ - name: Install the pinned Rust toolchain and the ARM64 target
+ run: |
+ rustup show active-toolchain || rustup toolchain install
+ rustup target add aarch64-pc-windows-msvc
+ - uses: Swatinem/rust-cache@v2
+ - name: Install Qt (ARM64, with the x64 host tools)
+ uses: jurplel/install-qt-action@v4
+ with:
+ version: ${{ env.QT_VERSION }}
+ host: windows
+ target: desktop
+ arch: win64_msvc2022_arm64_cross_compiled
+ cache: true
+ aqtsource: git+https://github.com/miurahr/aqtinstall.git
+ - name: Build
+ shell: pwsh
+ run: |
+ $env:QMAKE = ./scripts/qmake-arm64.ps1 -QtRoot (Split-Path -Parent $env:QT_ROOT_DIR)
+ cargo build --locked --release --target aarch64-pc-windows-msvc -p nectarlink-desktop
+
+ android:
+ name: Android app
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v7
+ - name: Install the pinned Rust toolchain and the Android targets
+ run: |
+ rustup show active-toolchain || rustup toolchain install
+ rustup target add aarch64-linux-android x86_64-linux-android
+ - uses: Swatinem/rust-cache@v2
+ - name: Install cargo-ndk
+ run: cargo install --locked cargo-ndk
+ - uses: actions/setup-java@v6
+ with:
+ distribution: temurin
+ java-version: "21"
+ - uses: android-actions/setup-android@v4
+ with:
+ packages: "platforms;android-37 ndk;30.0.16248370"
+ - uses: gradle/actions/setup-gradle@v6
+ - name: Unit tests and debug build
+ working-directory: android
+ run: ./gradlew --no-daemon testDebugUnitTest assembleDebug
+ - uses: actions/upload-artifact@v7
+ with:
+ name: nectarlink-android-debug
+ path: android/app/build/outputs/apk/debug/*.apk
+ retention-days: 14
+
+ policy:
+ name: Licenses and dependencies
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v7
+ - name: License headers
+ shell: pwsh
+ run: ./scripts/check-headers.ps1
+ - name: Dependency policy (licenses, advisories, sources)
+ uses: EmbarkStudios/cargo-deny-action@v2
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index a110524..ca0bb1d 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -37,13 +37,22 @@ Your contribution is licensed under the license that covers the files you
change, as described in the top-level [LICENSE](LICENSE) file. For GPL-licensed
parts, this includes the [app-store exception](LICENSES/APP-STORE-EXCEPTION.md).
+## Building and checking
+
+The [README](README.md#building) lists the requirements and build commands.
+Before opening a pull request, run the same checks as CI:
+
+```powershell
+./scripts/check.ps1
+```
+
## Ground rules for code
These come from the plan and will grow into a full style guide:
- **Rust is the source of truth.** Business logic lives in Rust. QML only
describes screens, layout and animation.
-- **One bridge.** Only the `nectarlink-qt` crate talks to Qt.
+- **One bridge.** Only `desktop/app/src/bridge` (cxx-qt) connects Rust to Qt.
- **Privacy first.** Never log notification text, message content, file names
or keys. No telemetry.
- **All user-facing strings are translatable** (`qsTr` in QML, string
diff --git a/README.md b/README.md
index 43337ed..f51acdb 100644
--- a/README.md
+++ b/README.md
@@ -1,40 +1,209 @@
+<div align="center">
+
# Nectarlink
**Your Android phone and your Windows PC, working as one.**
-Nectarlink is one open-source app that replaces the pile of tools people juggle today: Phone Link, KDE Connect, scrcpy, LocalSend and the discontinued Intel Unison.
+One open-source app for notifications, messages, clipboard, files, screen mirroring
+and more between Android and Windows 11. Local-first, end-to-end encrypted,
+no account and no cloud.
-> Bees carry nectar back to the hive. Nectarlink carries everything between your phone and your PC.
+[![CI](https://github.com/thtbee/nectarlink/actions/workflows/ci.yml/badge.svg)](https://github.com/thtbee/nectarlink/actions/workflows/ci.yml)
+[![Apps: GPL-3.0-or-later](https://img.shields.io/badge/apps-GPL--3.0--or--later-blue)](LICENSE)
+[![Core: MPL-2.0](https://img.shields.io/badge/core-MPL--2.0-blue)](LICENSE)
-> **Status: pre-alpha, in active development.** Nothing is ready to install yet.
+</div>
-## What it will do
+> [!IMPORTANT]
+> **Nectarlink is in early development.** The foundations work end to end (pairing,
+> encrypted connections, live device status, find my device), but most features
+> are still ahead. There are no releases yet. See [Project status](#project-status).
-- **Notifications** on your PC with replies and actions, including OTP codes.
-- **Messages and calls**: SMS/MMS, one inbox for chat apps, call alerts and controls.
-- **Clipboard** synced both ways, with history and smart suggestions.
-- **Files and photos**: drag and drop, resumable transfers, your phone's storage inside Explorer, LocalSend compatibility.
-- **Mirroring and phone apps on your PC**: each app in its own window, with audio and keyboard/mouse. Nothing extra to install.
-- **Phone as webcam, touchpad, air mouse, Stream-Deck-style macro pad, voice recorder and voice keyboard** for your PC.
-- **Works everywhere**: Wi-Fi, USB, and optionally away from home. End-to-end encrypted, no account, no cloud.
-- **Power Levels**: everything works with normal permissions, and an optional one-time setup unlocks more on any Android phone (no root required).
+<p align="center">
+ <img src="docs/screenshots/desktop-graphite-home.png" alt="Nectarlink for Windows, home screen, Graphite theme" width="880">
+</p>
-The full plan, including research, features, architecture and roadmap, is in [docs/PLAN.md](docs/PLAN.md).
+## Why Nectarlink
-## Tech
+Connecting an Android phone to a Windows PC today usually means combining
+several tools, each covering one part of the job:
-- **Shared core:** Rust (networking via [iroh](https://iroh.computer), pairing, transfers, storage).
-- **Windows app:** Qt Quick (QML) UI on a Rust backend. Windows 11, x64 and ARM64.
-- **Android app:** Kotlin + Jetpack Compose (Material 3 Expressive).
+| Tool | What it covers | Where it falls short |
+|---|---|---|
+| Phone Link | Notifications, messages, calls, photos | Needs a Microsoft account; many features depend on the phone brand; little control over what syncs |
+| KDE Connect | Notifications, clipboard, files, remote input | The Windows version trails the Linux one; no screen mirroring |
+| scrcpy | Screen mirroring and control | Developer setup, command line, no other features |
+| LocalSend | File transfer | Files only |
+| Intel Unison | Phone integration | Discontinued |
-## License
+Nectarlink aims to replace all of them with a single app per platform that is
+fast, private and pleasant to use:
+
+- **Local-first.** Devices talk directly over your network. Nothing goes through
+ a server, and there is no account to create.
+- **Encrypted end to end.** Every connection is authenticated with the device keys
+ exchanged during pairing.
+- **Works with a normal phone.** Everything useful works with ordinary Android
+ permissions. An optional one-time setup ("Power Levels", no root) enables
+ more, such as background clipboard sync and app windows.
+- **Native on both sides.** A Windows 11 app built with Qt Quick and Rust, and an
+ Android app built with Jetpack Compose, sharing one Rust core.
+
+The full plan, including research, feature list, architecture and roadmap,
+is in [docs/PLAN.md](docs/PLAN.md).
+
+## Project status
+
+Nectarlink is completing **Phase 0: Foundations** of the
+[roadmap](docs/PLAN.md#8-roadmap). The pieces every feature builds on are in
+place and tested; the user-facing features of Phase 1 come next.
+
+**Working today**
+
+- **Pairing** by scanning a QR code shown on the PC (or opening its pairing link
+ with any camera app), or by picking a nearby PC and comparing a 6-digit code.
+ Both methods authenticate both devices; a wrong code pairs nothing.
+- **Encrypted connections** over the local network (QUIC through
+ [iroh](https://iroh.computer)), with automatic reconnection after restarts,
+ sleep and network changes.
+- **Live status** of each paired device: connection, round-trip time, battery,
+ power level.
+- **Find my device** in both directions. The phone rings on the alarm stream,
+ even in silent mode.
+- **Capability matrix**: both apps compute which features work for a pair of
+ devices and what would enable the rest, so the interface never offers
+ something that can't work.
+- **Windows app**: home and settings, two themes (Bloom and Graphite) in light
+ and dark, Mica, a custom title bar with Snap Layouts, and a tray icon. In the
+ background it uses about 10 MB of memory (as shown in Task Manager).
+- **Android app**: pairing, home and settings, Material You colors, a background
+ connection service, and an identity key protected by the Android Keystore.
+- **Command-line client** for development and testing (`nectarlink`).
+
+**Next (Phase 1)**: notifications with replies, clipboard, file transfer, media
+controls, and a Windows installer. Mirroring, messages, calls and the other
+features in the plan follow in later phases.
+
+## Screenshots
+
+The Windows app has two themes: **Graphite**, ink on paper, and **Bloom**, soft
+and colorful. Both come in light and dark.
+
+| Graphite | Bloom |
+|:---:|:---:|
+| <img src="docs/screenshots/desktop-graphite-home.png" alt="Home, Graphite theme"> | <img src="docs/screenshots/desktop-bloom-home.png" alt="Home, Bloom theme"> |
+| <img src="docs/screenshots/desktop-graphite-settings.png" alt="Settings, Graphite theme"> | <img src="docs/screenshots/desktop-bloom-settings.png" alt="Settings, Bloom theme"> |
+
+<p align="center">
+ <img src="docs/screenshots/desktop-pairing.png" alt="Pairing a phone by QR code" width="640"><br>
+ <sub>Pairing a phone: scan the code, or pair nearby with a 6-digit code.</sub>
+</p>
+
+<sub>Screenshots are from the current development build. The connected phone is
+simulated with the command-line client.</sub>
+
+## How it works
+
+```
+ Android app (Kotlin, Compose) Windows app (Qt Quick, Rust)
+ │ UniFFI │ cxx-qt
+ ▼ ▼
+ ┌─────────────────────┐ QUIC (iroh), ┌─────────────────────┐
+ │ nectarlink-core │◄────────────────►│ nectarlink-core │
+ │ pairing, sessions, │ end-to-end │ pairing, sessions, │
+ │ storage, features │ encrypted │ storage, features │
+ └─────────────────────┘ └─────────────────────┘
+```
+
+- **One core, two apps.** Protocol, pairing, sessions, the trust store and the
+ capability matrix live in Rust (`core/`) and run unchanged on both platforms.
+- **Identity.** Each device has an Ed25519 key, encrypted at rest with Windows
+ DPAPI or the Android Keystore. Devices are addressed by their public keys.
+- **Network.** Local network only by default: discovery over mDNS, direct QUIC
+ connections, no relay servers. Away-from-home connections are opt-in.
+- **Protocol.** Versioned and documented in [docs/protocol/v0.md](docs/protocol/v0.md):
+ length-prefixed CBOR messages on QUIC streams.
+
+## Repository layout
-- Desktop and Android apps: [GPL-3.0-or-later](LICENSES/GPL-3.0-or-later.txt), with an [app-store exception](LICENSES/APP-STORE-EXCEPTION.md).
-- Core libraries: [MPL-2.0](LICENSES/MPL-2.0.txt).
-- Protocol specification and documentation: [CC BY 4.0](LICENSES/CC-BY-4.0.txt).
+```
+core/
+ nectarlink-protocol/ Message types, framing, pairing cryptography (MPL-2.0)
+ nectarlink-core/ Identity, trust store, pairing, sessions, features (MPL-2.0)
+ nectarlink-ffi/ UniFFI bindings used by the Android app (MPL-2.0)
+ nectarlink-cli/ Command-line client for development and testing (GPL)
+desktop/app/ Windows app: Rust host, cxx-qt bridge, QML UI (GPL)
+android/ Android app: Kotlin and Jetpack Compose (GPL)
+tools/xtask/ Code generation (theme tokens) and checks
+spikes/ Technical experiments with their results
+scripts/ Build and check scripts
+docs/ Plan, decision records, protocol, design system (CC BY 4.0)
+```
-See [LICENSE](LICENSE) for which applies where. The Nectarlink name and logo are covered by the [trademark policy](TRADEMARKS.md).
+## Building
+
+Nectarlink is not ready for everyday use; these steps are for development.
+
+**Requirements**
+
+| Part | Needs |
+|---|---|
+| Core and CLI | [Rust](https://rustup.rs) (stable, pinned in `rust-toolchain.toml`) |
+| Windows app | Windows 11, Visual Studio 2022 Build Tools (C++), [Qt 6.12](https://www.qt.io/download-open-source) for MSVC 2022 x64 |
+| Android app | Android SDK (platform 37, NDK 30.0.16248370), JDK 17 or newer, `cargo-ndk` (see [android/README.md](android/README.md)) |
+
+**Core, CLI and tests**
+
+```sh
+cargo test -p nectarlink-protocol -p nectarlink-core -p nectarlink-ffi
+cargo run -p nectarlink-cli -- --help
+```
+
+**Windows app** (with Qt's `bin` folder on `PATH`, or `QMAKE` pointing to its `qmake`)
+
+```sh
+cargo run -p nectarlink-desktop
+```
+
+**Android app**
+
+```sh
+cd android
+./gradlew assembleDebug
+```
+
+**All checks** (formatting, lints, tests, license headers, generated files,
+dependency policy), as CI runs them:
+
+```powershell
+./scripts/check.ps1 # add -Android and -Arm64 for the full set
+```
+
+## Documentation
+
+- [Project plan](docs/PLAN.md): research, features, architecture, roadmap
+- [Protocol v0](docs/protocol/v0.md) and the [capability registry](docs/protocol/capabilities.md)
+- [Architecture decision records](docs/adr)
+- [Capability matrix](docs/architecture/capabilities.md) and the [core API](docs/architecture/core-api.md)
+- [Design system](docs/design/README.md)
+- [Qt + Rust feasibility results](spikes/s1-qt-rust/README.md)
## Contributing
-See [CONTRIBUTING.md](CONTRIBUTING.md). Contributions are accepted under the [Developer Certificate of Origin](DCO.txt), and everyone is expected to follow the [Code of Conduct](CODE_OF_CONDUCT.md). To report a security issue, please follow [SECURITY.md](SECURITY.md).
+Contributions are welcome. Please read [CONTRIBUTING.md](CONTRIBUTING.md) first;
+for anything larger than a small fix, open an issue to agree on the approach.
+Contributions are accepted under the [Developer Certificate of Origin](DCO.txt),
+and everyone is expected to follow the [Code of Conduct](CODE_OF_CONDUCT.md).
+
+To report a security issue, follow [SECURITY.md](SECURITY.md). Please don't
+open a public issue.
+
+## License
+
+- Windows and Android apps, CLI: [GPL-3.0-or-later](LICENSES/GPL-3.0-or-later.txt),
+ with an [app-store exception](LICENSES/APP-STORE-EXCEPTION.md)
+- Core libraries: [MPL-2.0](LICENSES/MPL-2.0.txt)
+- Protocol specification and documentation: [CC BY 4.0](LICENSES/CC-BY-4.0.txt)
+
+See [LICENSE](LICENSE) for which license applies where. The Nectarlink name and
+logo are covered by the [trademark policy](TRADEMARKS.md).
diff --git a/docs/architecture/core-api.md b/docs/architecture/core-api.md
index 7379b99..384fc86 100644
--- a/docs/architecture/core-api.md
+++ b/docs/architecture/core-api.md
@@ -2,7 +2,7 @@
This is the boundary between the shared Rust core and the two apps. The
desktop app calls it directly from Rust (and exposes it to QML through
-`nectarlink-qt`); the Android app calls it through UniFFI-generated Kotlin.
+the cxx-qt bridge in `desktop/app`); the Android app calls it through UniFFI-generated Kotlin.
Design rules:
@@ -119,7 +119,7 @@ platform surface grows feature by feature.
- `Node` runs on its own multi-threaded tokio runtime, created in `start`.
- Methods are safe to call from any thread.
-- **Desktop:** `nectarlink-qt` reads `events()` on a background task and hands
+- **Desktop:** the bridge (`desktop/app/src/core_host.rs`) reads `events()` on a background task and hands
each event to the Qt GUI thread through cxx-qt's thread queue. This is the
only place core events cross into Qt.
- **Android:** UniFFI exposes `events()` as a callback interface; the Kotlin
diff --git a/docs/screenshots/desktop-bloom-home.png b/docs/screenshots/desktop-bloom-home.png
new file mode 100644
index 0000000..f88da7b
Binary files /dev/null and b/docs/screenshots/desktop-bloom-home.png differ
diff --git a/docs/screenshots/desktop-bloom-settings.png b/docs/screenshots/desktop-bloom-settings.png
new file mode 100644
index 0000000..e1d69a9
Binary files /dev/null and b/docs/screenshots/desktop-bloom-settings.png differ
diff --git a/docs/screenshots/desktop-graphite-home.png b/docs/screenshots/desktop-graphite-home.png
new file mode 100644
index 0000000..41f035f
Binary files /dev/null and b/docs/screenshots/desktop-graphite-home.png differ
diff --git a/docs/screenshots/desktop-graphite-settings.png b/docs/screenshots/desktop-graphite-settings.png
new file mode 100644
index 0000000..80f8de9
Binary files /dev/null and b/docs/screenshots/desktop-graphite-settings.png differ
diff --git a/docs/screenshots/desktop-pairing.png b/docs/screenshots/desktop-pairing.png
new file mode 100644
index 0000000..cc3f799
Binary files /dev/null and b/docs/screenshots/desktop-pairing.png differ
diff --git a/scripts/check-headers.ps1 b/scripts/check-headers.ps1
new file mode 100644
index 0000000..c1ed469
--- /dev/null
+++ b/scripts/check-headers.ps1
@@ -0,0 +1,42 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
+<#
+.SYNOPSIS
+ Checks that every source file starts with an SPDX license header that
+ matches the license map in LICENSE. Exits non-zero on any problem.
+#>
+$ErrorActionPreference = "Stop"
+Push-Location (Split-Path -Parent $PSScriptRoot)
+
+# Which license a source file must declare (mirrors LICENSE).
+function Get-ExpectedLicense([string]$path) {
+ if ($path -like "core/nectarlink-cli/*") { return "GPL-3.0-or-later" }
+ if ($path -like "core/*") { return "MPL-2.0" }
+ return "GPL-3.0-or-later"
+}
+
+try {
+ $extensions = @(".rs", ".qml", ".cpp", ".h", ".hpp", ".ps1", ".sh", ".kt", ".kts")
+ $files = @(git ls-files --cached --others --exclude-standard) |
+ Where-Object { $extensions -contains [System.IO.Path]::GetExtension($_) } |
+ Where-Object { Test-Path $_ }
+ $problems = 0
+ foreach ($file in $files) {
+ $head = Get-Content $file -TotalCount 5 -ErrorAction SilentlyContinue
+ $line = $head | Where-Object { $_ -match "SPDX-License-Identifier:\s*(\S+)" } | Select-Object -First 1
+ if (-not $line) {
+ Write-Host " missing SPDX header: $file" -ForegroundColor Red
+ $problems++
+ continue
+ }
+ $null = $line -match "SPDX-License-Identifier:\s*(\S+)"
+ $expected = Get-ExpectedLicense $file
+ if ($Matches[1] -ne $expected) {
+ Write-Host " wrong license in $file ($($Matches[1]), expected $expected)" -ForegroundColor Red
+ $problems++
+ }
+ }
+ Write-Host " $($files.Count) files checked, $problems problem(s)"
+ exit [int]($problems -gt 0)
+} finally {
+ Pop-Location
+}
diff --git a/scripts/check.ps1 b/scripts/check.ps1
index 8686d40..fc641a5 100644
--- a/scripts/check.ps1
+++ b/scripts/check.ps1
@@ -55,45 +55,13 @@ function Invoke-Step {
$results.Add([pscustomobject]@{ Step = $Name; Ok = $ok; Seconds = [math]::Round($timer.Elapsed.TotalSeconds, 1) })
}
-# Which license a source file must declare (mirrors LICENSE).
-function Get-ExpectedLicense([string]$path) {
- if ($path -like "core/nectarlink-cli/*") { return "GPL-3.0-or-later" }
- if ($path -like "core/*") { return "MPL-2.0" }
- return "GPL-3.0-or-later"
-}
-
-function Test-SpdxHeaders {
- $extensions = @(".rs", ".qml", ".cpp", ".h", ".hpp", ".ps1", ".sh", ".kt", ".kts")
- $files = @(git ls-files --cached --others --exclude-standard) |
- Where-Object { $extensions -contains [System.IO.Path]::GetExtension($_) } |
- Where-Object { Test-Path $_ }
- $problems = 0
- foreach ($file in $files) {
- $head = Get-Content $file -TotalCount 5 -ErrorAction SilentlyContinue
- $line = $head | Where-Object { $_ -match "SPDX-License-Identifier:\s*(\S+)" } | Select-Object -First 1
- if (-not $line) {
- Write-Host " missing SPDX header: $file" -ForegroundColor Red
- $problems++
- continue
- }
- $null = $line -match "SPDX-License-Identifier:\s*(\S+)"
- $expected = Get-ExpectedLicense $file
- if ($Matches[1] -ne $expected) {
- Write-Host " wrong license in $file ($($Matches[1]), expected $expected)" -ForegroundColor Red
- $problems++
- }
- }
- Write-Host " $($files.Count) files checked, $problems problem(s)"
- $global:LASTEXITCODE = [int]($problems -gt 0)
-}
-
try {
Invoke-Step "Format" { cargo fmt --all --check }
Invoke-Step "Clippy" { cargo clippy --workspace --all-targets --locked -- -D warnings }
if (-not $Fast) {
Invoke-Step "Tests" { cargo test --workspace --locked }
}
- Invoke-Step "License headers" { Test-SpdxHeaders }
+ Invoke-Step "License headers" { & (Join-Path $PSScriptRoot "check-headers.ps1") }
Invoke-Step "Generated files" { cargo xtask tokens --check }
if (-not $Fast) {
Invoke-Step "Dependency policy" {
diff --git a/spikes/s1-qt-rust/README.md b/spikes/s1-qt-rust/README.md
index c60f41f..8558a32 100644
--- a/spikes/s1-qt-rust/README.md
+++ b/spikes/s1-qt-rust/README.md
@@ -23,7 +23,7 @@ ARM64: `$env:QMAKE = ./scripts/qmake-arm64.ps1` then
| ARM64 build | CI builds | Cross-builds from x64 into an ARM64 exe linking ARM64 Qt; not run yet (needs ARM64 hardware or a `windows-11-arm` CI runner) | ✅ build |
| Tray-only RAM | < 60 MB | After closing the main window: 64 MB working set, 52 MB private commit, **19.6 MB in Task Manager**. Never-opened floor: 34 / 23 MB. Core not included yet | ✅ |
-## Lessons (apply to the real `nectarlink-qt`)
+## Lessons (applied in the desktop app)
1. **Never queue one closure per core event.** It ballooned to 5.7 GB at 10k/s.
Use a coalescing pump: latest state in a shared slot, at most one queued
diff --git a/spikes/s1-qt-rust/src/bridge.rs b/spikes/s1-qt-rust/src/bridge.rs
index 4010bb8..9d7ccec 100644
--- a/spikes/s1-qt-rust/src/bridge.rs
+++ b/spikes/s1-qt-rust/src/bridge.rs
@@ -2,7 +2,7 @@
//! The Rust side of the proof: a QObject that QML binds to, fed from a
//! background thread the way `nectarlink-core` events will be. All updates
//! cross into Qt through `qt_thread().queue(...)`, the single pattern the
-//! real `nectarlink-qt` bridge will use.
+//! desktop app bridge uses.
use std::{
pin::Pin,