feat(release): publish reusable library crates to crates.io#45
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Makes scry's reusable work body publishable to crates.io, mirroring
pulseengine/synth(itself modelled onpulseengine/sigil). Publishes the pure library crates; the Wasm-component crates continue to ship as signed.wasmrelease assets — the witness precedent (publish the libraries, ship the component).Published set (leaf-first)
scry-interval,scry-taint,scry-octagon,scry-provenance→scry-analyze-core.These are the genuinely reusable APIs (pure
#![no_std]libraries). Internal path deps now carryversion = "1.9.0"socargo publishrewrites them to the crates.io coordinate (crates.io rejects path-only deps). Thescry-*names are free on crates.io.Not published (
publish = false)wasm-lattice,scry-analyzer—cdylibWasm components whose WIT bindings are generated by the Bazelrust_wasm_component_bindgenrule (no cargo source) and which only build forwasm32-wasip2. A hostcargo publishcannot build them, and acargo addconsumer cannot use a cdylib component. Making them publishable would require switching towit_bindgen::generate!+ replacing the Bazel rule and re-validating the//:scrycomposition — moderate risk to the shipped product, and witness deliberately does not publish its component crate either. They ship as signed.wasmassets (already done inrelease.yml).scry-host-tests,scry-mcdc— test / MC-DC harnesses (already unpublished).Mechanism
.github/workflows/publish-to-crates-io.yml— fires on everyv*tag alongsiderelease.yml; asserts tag == workspace version; runs the helper with the org-wideCRATES_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.version0.1.0→1.9.0, aligning the crate version with thev1.xrelease-tag line /SCRY_VERSION(your call). A future release bump moves the tag, this version, and the path-depversionfields in lockstep. The first crates.io publish lands on the next release tag (v1.9.0already exists, pointing at the pre-bump commit).Verification
cargo packagesucceeds for all 4 leaf crates at1.9.0.scripts/publish.rscompiles (rustc --edition 2024).scry-analyze-corebuilds;scry-mcdc(separate workspace) builds againstanalyze-core@1.9.0; fmt / clippy /rivet validateclean.scry-analyze-corecan't becargo packaged locally — the chicken-and-egg where its path-dep versions aren't on the registry yet; this is expected and why CI usespublish, not--dry-run.)Note on auth
Assumes the org-wide
CRATES_IO_TOKENsecret is inherited by this repo (as in synth). No publish happens until av*tag fires the workflow.🤖 Generated with Claude Code