Skip to content

feat(release): publish reusable library crates to crates.io#45

Merged
avrabe merged 1 commit into
mainfrom
feat-crates-io-publishing
Jun 14, 2026
Merged

feat(release): publish reusable library crates to crates.io#45
avrabe merged 1 commit into
mainfrom
feat-crates-io-publishing

Conversation

@avrabe

@avrabe avrabe commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Summary

Makes scry's reusable work body publishable to crates.io, mirroring pulseengine/synth (itself modelled on pulseengine/sigil). Publishes the pure library crates; the Wasm-component crates continue to ship as signed .wasm release assets — the witness precedent (publish the libraries, ship the component).

Published set (leaf-first)

scry-interval, scry-taint, scry-octagon, scry-provenancescry-analyze-core.

These are the genuinely reusable APIs (pure #![no_std] libraries). Internal path deps now carry version = "1.9.0" so cargo publish rewrites them to the crates.io coordinate (crates.io rejects path-only deps). The scry-* names are free on crates.io.

Not published (publish = false)

  • wasm-lattice, scry-analyzercdylib Wasm components whose WIT bindings are generated by the Bazel rust_wasm_component_bindgen rule (no cargo source) and which only build for wasm32-wasip2. A host cargo publish cannot build them, and a cargo add consumer cannot use a cdylib component. Making them publishable would require switching to wit_bindgen::generate! + replacing the Bazel rule and re-validating the //:scry composition — moderate risk to the shipped product, and witness deliberately does not publish its component crate either. They ship as signed .wasm assets (already done in release.yml).
  • scry-host-tests, scry-mcdc — test / MC-DC harnesses (already unpublished).

Mechanism

  • .github/workflows/publish-to-crates-io.yml — fires on every v* tag alongside release.yml; asserts tag == workspace version; runs the helper with the org-wide CRATES_IO_TOKEN.
  • scripts/publish.rs — leaf-first dependency-ordered publisher with a 10-attempt / 40s retry loop for crates.io index propagation + an already-published skip check.

Version alignment

workspace.package.version 0.1.01.9.0, aligning the crate version with the v1.x release-tag line / SCRY_VERSION (your call). A future release bump moves the tag, this version, and the path-dep version fields in lockstep. The first crates.io publish lands on the next release tag (v1.9.0 already exists, pointing at the pre-bump commit).

Verification

  • cargo package succeeds for all 4 leaf crates at 1.9.0.
  • scripts/publish.rs compiles (rustc --edition 2024).
  • scry-analyze-core builds; scry-mcdc (separate workspace) builds against analyze-core@1.9.0; fmt / clippy / rivet validate clean.
  • (scry-analyze-core can't be cargo packaged locally — the chicken-and-egg where its path-dep versions aren't on the registry yet; this is expected and why CI uses publish, not --dry-run.)

Note on auth

Assumes the org-wide CRATES_IO_TOKEN secret is inherited by this repo (as in synth). No publish happens until a v* tag fires the workflow.

🤖 Generated with Claude Code

Mirror pulseengine/synth's publishing setup so scry's reusable work body lands
on crates.io. Publishes the pure library crates; the Wasm-component crates ship
as signed .wasm release assets (the witness precedent).

- .github/workflows/publish-to-crates-io.yml: fires on every v* tag alongside
  release.yml, asserts tag == workspace version, runs scripts/publish.rs with
  the org-wide CRATES_IO_TOKEN.
- scripts/publish.rs: leaf-first dependency-ordered publisher (scry-interval,
  scry-taint, scry-octagon, scry-provenance → scry-analyze-core) with a
  10-attempt / 40s retry loop for crates.io index propagation + an
  already-published skip check. Ported from synth (itself from sigil).
- Internal path deps in scry-analyze-core now carry version = "1.9.0" so
  cargo publish rewrites them to the crates.io coordinate (crates.io rejects
  path-only deps).
- publish = false on wasm-lattice and scry-analyzer: cdylib Wasm components
  with Bazel-generated WIT bindings (no cargo source), wasm32-wasip2-only —
  a host cargo publish can't build them and a cargo add consumer can't use a
  cdylib component. The reusable APIs are the pure crates; the components ship
  as signed .wasm assets.
- workspace.package.version 0.1.0 -> 1.9.0 to align the crate version with the
  v1.x release-tag line / SCRY_VERSION. Future release bumps move the tag, this
  version, and the path-dep versions in lockstep. First crates.io publish lands
  on the next release tag.
- workspace.package metadata enriched (homepage, keywords, categories).

Verified: cargo package succeeds for the 4 leaf crates at 1.9.0; publish.rs
compiles (rustc --edition 2024); analyze-core builds; scry-mcdc (separate
workspace) builds against analyze-core@1.9.0; fmt/clippy/rivet clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@avrabe avrabe merged commit 7f11406 into main Jun 14, 2026
9 checks passed
@avrabe avrabe deleted the feat-crates-io-publishing branch June 14, 2026 19:05
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