Skip to content

build: make the workspace publishable on crates.io as hypercolor - #346

Merged
hyperb1iss merged 3 commits into
mainfrom
nova/crates-io-publish
Oct 3, 2026
Merged

hyperb1iss merged 3 commits into
mainfrom
nova/crates-io-publish

Conversation

@hyperb1iss

@hyperb1iss hyperb1iss commented Oct 3, 2026 •

Copy link
Copy Markdown
Owner

What this changes

The workspace can now be published to crates.io, with the CLI as the hypercolor package so that cargo install hypercolor installs the hypercolor binary. Nothing is published by this PR.

  • The CLI package is renamed. crates/hypercolor-cli now publishes as hypercolor. Its library keeps the name hypercolor_cli, so every existing import and every extension crate built on run_with_extensions still compiles. Every -p hypercolor-cli in the justfile, CI and installer scripts now names hypercolor.
  • Bundled data now lives inside the crates that embed it. The detector table for openrgb-host and the built-in attachment templates for core used to be read from data/, outside both crates. Packaged on its own, openrgb-host failed to compile. Core still compiled, but with an empty attachment catalog, because its build script skipped the missing folder without a word. Both data sets now sit inside their crates, and core's build script fails if the templates are missing.
  • The manifests are publishable. Every internal path dependency carries a version, and set-version.ts stamps those versions on each release. Three crates stay off crates.io:
Crate Why it stays unpublished
hypercolor-daemon Embeds protocol/websocket-v1.descriptions.json from outside the crate
hypercolor-app Its Tauri manifest bundles the web UI and installer scripts from outside the crate
hypercolor-windows-helper Only the signed build the installer ships should ever run elevated

Nothing that gets published depends on these three. The CLI's dev-dependency on the daemon is path-only, so cargo strips it from the published manifest.

Why

None of our Rust crates are on crates.io, and the hypercolor name is still unclaimed there. That puts cargo install hypercolor, docs.rs pages and lib.rs listings out of reach. Publishing needed the rename, versioned internal dependencies, and crates that compile from their own tarballs.

Verification

  • Added or updated tests
  • Added or updated docs (README, AGENTS.md, relevant spec, or guide)
  • just verify passes locally (Rust fmt + lint + test)
  • just deny passes (required for dependency or license changes)
  • just ui-test and just ui-build pass (required for crates/hypercolor-ui/)
  • just sdk-lint, just sdk-check, and just sdk-build pass (required for sdk/)
  • just python-verify passes (required for python/)
  • just compat-check passes (required for data/drivers/vendors/*.toml)
  • just docs-build passes (required for docs or README changes)
  • cd docs && zola check passes (required for docs link/content changes)
  • Packaging scripts were syntax-checked (required for scripts/ or packaging/)
  • just e2e-build passes with the normal Servo stack (required for daemon/UI/effect integration changes)
  • just e2e-build-cpu passes when validating the CPU smoke fallback
  • just e2e passes against the Servo stack (required for end-to-end behavior changes; starts daemon/browser)
  • Tested on real hardware, simulator, or e2e harness (describe below)

I ran targeted gates in place of the full just verify, and no dependency versions changed. The only doc edits are crate READMEs, specs and docs/development, none of which are in the Zola site.

  • Publish dry run: cargo publish --workspace --dry-run --locked on the committed tree packaged and verified 39 crates and exited 0, with no --allow-dirty. Verifying means each crate compiled from its own tarball, so this is the check that caught the out-of-crate reads. hypercolor is among the 39.
  • Build and lint: cargo check --workspace --locked, cargo fmt --all --check, and clippy with -D warnings on core, openrgb-host and hypercolor all pass.
  • Tests: core's attachment unit tests and its profile and registry suites, all of openrgb-host, the app packaging suite (54 tests), and the full cargo test -p hypercolor all pass.
  • Version stamping: stamping 0.7.0 rewrites all 45 internal requirements, and stamping back to 0.6.1 restores an identical diff.
  • Scripts: the four touched shell scripts pass bash -n and the justfile parses. PowerShell isn't installed here; each .ps1 edit is a single string literal.
  • Independent review: a separate agent reviewed the change and found four problems: the daemon and app packaging failures, the silent empty catalog, and a packaging-test needle that could not catch a revert. All four are fixed here. Its re-check passed, and it built the first two commits on their own from git archive exports.

Notes for reviewers

  • Downstream workspaces: a workspace that depends on this crate by path under the name hypercolor-cli needs package = "hypercolor" on that entry, and its use hypercolor_cli:: lines stay valid. The private hypercolor.lighting repo also has one -p hypercolor-cli in its managed-update e2e script and needs a lockfile refresh.
  • The first publish waits on a thinner CLI. Today hypercolor links hypercolor-core, so cargo install hypercolor would build 26 internal crates. On Linux it would also need the ALSA, PipeWire, libclang and libjpeg-turbo development headers that alsa-sys, pipewire-sys and turbojpeg-sys build against, and most machines would fail without them. The CLI only uses core's config path helpers and mDNS daemon discovery, so a follow-up moves those out and makes the CLI a thin API client before anything is published.
  • crates.io rate limits new names: a burst of 5, then one every 10 minutes, so the first publish of the thin set should be planned around that.
  • No CI gate for packaging yet: nothing in CI runs the verified dry run, so a new include_str! reaching outside a crate could slip back in. The publish workflow that comes with the first release should run it on every PR that touches a manifest or build.rs.
  • Why the protocol file didn't move: protocol/websocket-v1.descriptions.json stays put for now because all 17 in-flight branches edit it. Moving it into the daemon crate is the path to publishing the daemon later.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Updates

    • The terminal app is now built and installed as hypercolor, including through platform installers and release builds.
    • Built-in device templates are now packaged with the core app and checked during builds.
  • Documentation

    • Installation instructions and references to built-in templates now reflect the updated package and template locations.
    • Release guidance now covers version requirements across internal packages.

@coderabbitai

coderabbitai Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

🧰 Additional context used
📚 Code guidelines (1)
docs/design/72-cross-platform-boundary-review.md — configured

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6351fe07-754d-46e0-a766-3c68f067329f
📥 Commits

Reviewing files that changed from the base of the PR and between f4117b5 and 61661fe.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (90)
  • .github/workflows/ci.yml
  • .github/workflows/servo-cache-warm.yml
  • AGENTS.md
  • Cargo.toml
  • crates/hypercolor-app/Cargo.toml
  • crates/hypercolor-app/tests/packaging_tests.rs
  • crates/hypercolor-cli/Cargo.toml
  • crates/hypercolor-cli/README.md
  • crates/hypercolor-core/Cargo.toml
  • crates/hypercolor-core/attachments/corsair/corsair-1-4m-strip.toml
  • crates/hypercolor-core/attachments/corsair/corsair-250mm-strip.toml
  • crates/hypercolor-core/attachments/corsair/corsair-350mm-strip.toml
  • crates/hypercolor-core/attachments/corsair/corsair-450mm-strip.toml
  • crates/hypercolor-core/attachments/corsair/corsair-9000d-io-strip.toml
  • crates/hypercolor-core/attachments/corsair/corsair-9000d-logo-strip.toml
  • crates/hypercolor-core/attachments/corsair/corsair-gpu-water-block.toml
  • crates/hypercolor-core/attachments/corsair/corsair-hd-fan.toml
  • crates/hypercolor-core/attachments/corsair/corsair-internal-425mm-strip.toml
  • crates/hypercolor-core/attachments/corsair/corsair-internal-500mm-strip.toml
  • crates/hypercolor-core/attachments/corsair/corsair-internal-strip.toml
  • crates/hypercolor-core/attachments/corsair/corsair-lc100-panel.toml
  • crates/hypercolor-core/attachments/corsair/corsair-ll-fan.toml
  • crates/hypercolor-core/attachments/corsair/corsair-ls350.toml
  • crates/hypercolor-core/attachments/corsair/corsair-ls430.toml
  • crates/hypercolor-core/attachments/corsair/corsair-lt100-light-tower.toml
  • crates/hypercolor-core/attachments/corsair/corsair-ml-fan-8-led.toml
  • crates/hypercolor-core/attachments/corsair/corsair-ml-fan.toml
  • crates/hypercolor-core/attachments/corsair/corsair-ql-fan.toml
  • crates/hypercolor-core/attachments/corsair/corsair-sppro-fan.toml
  • crates/hypercolor-core/attachments/corsair/corsair-xd5-cpu-water-block.toml
  • crates/hypercolor-core/attachments/corsair/corsair-xd5-reservior.toml
  • crates/hypercolor-core/attachments/formulamod/formulamod-atx-backplate.toml
  • crates/hypercolor-core/attachments/generic/generic-argb-fan-12-leds.toml
  • crates/hypercolor-core/attachments/generic/generic-argb-fan-16-leds.toml
  • crates/hypercolor-core/attachments/generic/generic-argb-fan-6-leds.toml
  • crates/hypercolor-core/attachments/generic/generic-argb-fan-8-leds.toml
  • crates/hypercolor-core/attachments/generic/generic-matrix-16x16.toml
  • crates/hypercolor-core/attachments/generic/generic-matrix-8x8.toml
  • crates/hypercolor-core/attachments/generic/generic-strip-100-leds.toml
  • crates/hypercolor-core/attachments/generic/generic-strip-144-leds.toml
  • crates/hypercolor-core/attachments/generic/generic-strip-30-leds.toml
  • crates/hypercolor-core/attachments/generic/generic-strip-300-leds.toml
  • crates/hypercolor-core/attachments/generic/generic-strip-60-leds.toml
  • crates/hypercolor-core/attachments/lian-li/lian-li-al-unifan-fan.toml
  • crates/hypercolor-core/attachments/lian-li/lian-li-atx-strimer.toml
  • crates/hypercolor-core/attachments/lian-li/lian-li-galahad-aio.toml
  • crates/hypercolor-core/attachments/lian-li/lian-li-galahad-ii-aio.toml
  • crates/hypercolor-core/attachments/lian-li/lian-li-gpu-strimer-4x27.toml
  • crates/hypercolor-core/attachments/lian-li/lian-li-gpu-strimer-6x27.toml
  • crates/hypercolor-core/attachments/lian-li/lian-li-gpu-strimmer-plus.toml
  • crates/hypercolor-core/attachments/lian-li/lian-li-o11-dynamic-evo-front-case.toml
  • crates/hypercolor-core/attachments/lian-li/lian-li-o11-dynamic-evo-rgb-front-case.toml
  • crates/hypercolor-core/attachments/lian-li/lian-li-o11-dynamic-evo-xl-front-case.toml
  • crates/hypercolor-core/attachments/lian-li/lian-li-sl-infinity-140-fan.toml
  • crates/hypercolor-core/attachments/lian-li/lian-li-sl-infinity-140-inner-fan.toml
  • crates/hypercolor-core/attachments/lian-li/lian-li-sl-infinity-140-outter-fan.toml
  • crates/hypercolor-core/attachments/lian-li/lian-li-sl-infinity-fan.toml
  • crates/hypercolor-core/attachments/lian-li/lian-li-sl-infinity-inner-fan.toml
  • crates/hypercolor-core/attachments/lian-li/lian-li-sl-infinity-outter-fan.toml
  • crates/hypercolor-core/attachments/lian-li/lian-li-sl-unifan-fan.toml
  • crates/hypercolor-core/attachments/lian-li/lian-li-tl-fan.toml
  • crates/hypercolor-core/attachments/nollie/nollie-fan-gc120.toml
  • crates/hypercolor-core/attachments/nollie/nollie-fan-gc140.toml
  • crates/hypercolor-core/build.rs
  • crates/hypercolor-core/src/attachment/paths.rs
  • crates/hypercolor-daemon/Cargo.toml
  • crates/hypercolor-driver-builtin/Cargo.toml
  • crates/hypercolor-hal/Cargo.toml
  • crates/hypercolor-openrgb-host/README.md
  • crates/hypercolor-openrgb-host/data/detectors.toml
  • crates/hypercolor-openrgb-host/src/config_dir.rs
  • crates/hypercolor-tui/Cargo.toml
  • crates/hypercolor-windows-gpu-interop/Cargo.toml
  • crates/hypercolor-windows-helper/Cargo.toml
  • crates/hypercolor-windows-telemetry/Cargo.toml
  • docs/design/17-effect-authoring-dx.md
  • docs/development/RELEASING.md
  • docs/specs/19-lian-li-uni-hub-driver.md
  • docs/specs/45-nollie-protocol-driver.md
  • docs/specs/66-component-designer.md
  • docs/specs/80-lian-li-tl-lcd-wireless-driver.md
  • docs/specs/81-openrgb-fallback-productization.md
  • justfile
  • scripts/build-mac-installer.sh
  • scripts/build-windows-installer.ps1
  • scripts/dist.sh
  • scripts/install.sh
  • scripts/qualification/linux-user-guest/guest-proof.sh
  • scripts/set-version.ts
  • scripts/tests/cargo-cache-mode-tests.ps1

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The PR renames the CLI Cargo package, updates internal dependency versioning and publication metadata, and changes the locations used for bundled attachment templates and the OpenRGB detector table.

Changes

CLI package rename

Layer / File(s) Summary
CLI package identity
crates/hypercolor-cli/Cargo.toml, crates/hypercolor-cli/README.md, AGENTS.md
The Cargo package is now hypercolor; its library target remains explicitly named hypercolor_cli. The README and project description identify the package and library.
CLI build and test consumers
.github/workflows/ci.yml, .github/workflows/servo-cache-warm.yml, crates/hypercolor-app/tests/packaging_tests.rs, justfile, scripts/*, scripts/qualification/linux-user-guest/guest-proof.sh, scripts/tests/cargo-cache-mode-tests.ps1, docs/design/17-effect-authoring-dx.md
CI, local recipes, installer and release scripts, packaging tests, and an installation example use hypercolor instead of hypercolor-cli. The Windows workspace exclusion also changes to hypercolor.

Cargo release metadata

Layer / File(s) Summary
Dependency versions and publication settings
Cargo.toml, crates/*/Cargo.toml
Internal path dependencies declare version 0.6.1. The app, daemon, and Windows helper manifests set publish = false.
Internal dependency version stamping
scripts/set-version.ts, docs/development/RELEASING.md
The version-stamping script discovers manifests containing internal dependency requirements and includes them in stamping and verification. The release instructions now include those requirements.

Bundled data paths

Layer / File(s) Summary
Built-in attachment templates
crates/hypercolor-core/build.rs, crates/hypercolor-core/src/attachment/paths.rs, docs/specs/19-lian-li-uni-hub-driver.md, docs/specs/45-nollie-protocol-driver.md, docs/specs/66-component-designer.md, docs/specs/80-lian-li-tl-lcd-wireless-driver.md
Build-time loading and runtime path resolution use the core crate’s attachments directory. The build now requires that directory to exist and contain TOML files. Related path references and the path test are updated.
OpenRGB detector table
crates/hypercolor-openrgb-host/src/config_dir.rs, crates/hypercolor-openrgb-host/README.md, docs/specs/81-openrgb-fallback-productization.md
The embedded table and related documentation use data/detectors.toml in the OpenRGB host crate.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to 61661

The package rename, release metadata, and bundled-data paths appear aligned; the PR is mergeable after normal checks.

Security Architecture Review

Security architecture risk: 🔵 Low · up to 61661

The inspected changes preserve the CLI library identity, exclude installer-only packages from registry publication, and retain version verification before release tagging. No introduced security vulnerability was established. Publication controls and complete build-credential isolation remain unverified, so minimal risk cannot be concluded.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The supported exposure change concerns independently distributed crates and their build inputs. The inspected detector relocation does not introduce a runtime-controlled table source or change the detector prefixes embedded in the binary.

Trust Boundaries and Controls

  • observed — The inspected OpenRGB startup path rejects non-loopback endpoints, requires stopping the managed server before changing its endpoint, and obtains a server claim before writing detector configuration and spawning. These are existing controls, not newly introduced protections.

Resilience and Maintainability Implications

  • inferred — The release workflow’s verification gate contains inconsistent metadata within the working tree before release commit and tagging. This does not establish protection for manual publication paths or external registry automation.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 12 functions across 9 files. (26 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: preparing the workspace for crates.io publication under the hypercolor package name.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 12 functions across 9 files. (26 skipped: 26 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

hyperb1iss and others added 3 commits October 3, 2026 09:55
The crates.io name `hypercolor` is unclaimed, and `cargo install
hypercolor` should install the `hypercolor` binary. Rename the package
in crates/hypercolor-cli from hypercolor-cli to hypercolor; the
directory keeps its name.

The library target is pinned to `hypercolor_cli` so every
`use hypercolor_cli::` path stays valid, including extension crates
that build on `run_with_extensions`. A downstream workspace that names
the dependency `hypercolor-cli` needs `package = "hypercolor"` on that
entry and nothing else.

Every `-p hypercolor-cli` and `--exclude hypercolor-cli` in the
justfile, CI workflows, installer scripts and the guest proof now names
the new package. The packaging tests assert the new strings, one of
them newline-terminated so a revert to the old name cannot pass it as a
prefix. The crate README, which becomes the crates.io page, says the
CLI drives a separately running daemon.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
hypercolor-openrgb-host included data/openrgb/detectors.toml and
hypercolor-core's build script embedded data/attachments/builtin, both
from outside their crate directories. A crates.io tarball carries only
the crate, so openrgb-host failed to compile from its package and core
compiled with an empty attachment catalog: the build script skipped a
missing folder without a word.

Each file set now lives in the one crate that reads it:
crates/hypercolor-openrgb-host/data/detectors.toml and
crates/hypercolor-core/attachments/. No other code reads either path.
Core's build script now fails when the folder is missing or holds no
templates, so an empty catalog can no longer ship silently, and the
path test checks the folder exists. Specs that cite the old paths
follow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
crates.io resolves dependencies by version, so a path-only dependency
blocks `cargo publish`. Give every internal hypercolor dependency an
explicit version: the 33 entries in [workspace.dependencies] and the
12 direct path dependencies in core, daemon, driver-builtin, hal, tui,
windows-gpu-interop and windows-telemetry. Path-only dev-dependencies
stay as they are; cargo strips them from the published manifest.

set-version.ts now stamps those requirements alongside the workspace
version and verifies they agree, scanning the crate manifests in a
stable order so a new internal dependency is stamped without editing
the script. A stale requirement would otherwise publish a crate that
asks for the previous release of its siblings. RELEASING.md lists the
new stamp.

Three crates stay off crates.io. hypercolor-daemon embeds
protocol/websocket-v1.descriptions.json from outside the crate.
hypercolor-app's Tauri manifest bundles the web UI and installer
scripts from outside the crate. hypercolor-windows-helper only makes
sense as the signed build the installer ships. Nothing published
depends on any of them; the CLI's daemon dev-dependency is path-only
and stripped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@hyperb1iss
hyperb1iss force-pushed the nova/crates-io-publish branch from 0946fdc to 61661fe Compare October 3, 2026 16:55
@hyperb1iss
hyperb1iss merged commit f687e51 into main Oct 3, 2026
42 checks passed
@hyperb1iss
hyperb1iss deleted the nova/crates-io-publish branch October 3, 2026 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant