Run a deep code review across the manifold-csg crates
日本語の概要は準備中です。原文の説明を表示しています。
Publish crates to crates.io with pre-flight checks
インストールする前に、エージェントに与えられる指示の中身を確認できます。
Publish our 4 crates to crates.io with pre-flight validation. The workspace
has two canonical crates (manifold-csg-sys, manifold-csg) and two thin
facade re-exports (manifold3d-sys, manifold3d) under the same version
numbers. Facades always ship in lockstep with their canonical counterparts
via = version pins.
--dry-run: run all checks but don't actually publishRun all checks before publishing. Stop on first failure.
git status
Must be on main with no uncommitted changes. Refuse to publish from a feature branch.
cargo test --features nalgebra
cargo clippy --all-targets --all-features -- -D warnings
Version bumps happen at publish time, not in feature PRs. Read CLAUDE.md for the versioning scheme, then:
# crates.io rejects curl's default User-Agent; it wants one that identifies the caller
UA="manifold-csg-publish (+https://github.com/$(gh api user --jq .login))"
curl -sS -A "$UA" https://crates.io/api/v1/crates/manifold-csg | python3 -c "import json,sys; print(json.load(sys.stdin)['crate']['max_version'])"
curl -sS -A "$UA" https://crates.io/api/v1/crates/manifold-csg-sys | python3 -c "import json,sys; print(json.load(sys.stdin)['crate']['max_version'])"
Without the -A, crates.io returns an error body and the ['crate'] lookup dies with a KeyError, which reads like a network blip, not a blocked request. If it fails anyway, the sparse index needs no User-Agent: curl -sS https://index.crates.io/ma/ni/manifold-csg (one JSON object per line, last is newest).
If the in-repo version is already ahead of the published version, it's pre-bumped — DO NOT bump again. Subsequent feature PRs ride into the pre-bumped version. (Pitfall: assuming the workspace version is the published version. They diverge whenever a PR includes its own bump, which CLAUDE.md says PRs "usually should" do.)manifold-csg-sys: bump the patch component (e.g., 3.4.102 → 3.4.103) whenever the upstream contents differ from the last publish — pinned commit changed, carry-patches added/removed, or FFI declarations changed. If the upstream major.minor changed (new manifold3d release), update major.minor accordingly.manifold-csg (workspace version): bump patch for additive changes, minor for breaking changes (pre-1.0, minor bumps can break).manifold3d-sys version must match the new manifold-csg-sys version exactly (= pin).manifold3d inherits the workspace version, so bumps automatically. Its manifold-csg dependency = pin must be updated to the new workspace version.manifold-csg's manifold-csg-sys dependency version to match. Update manifold3d-sys's manifold-csg-sys = pin and manifold3d's manifold-csg = pin.For each patch in crates/manifold-csg-sys/patches/:
gh api)crates/manifold-csg/CHANGELOG.md must have an entry for the version being published. It ships inside the tarball, so it is the only release note a vendored consumer ever sees. See CLAUDE.md for what belongs in it, especially the rule about flagging silent behavioral changes.
If the entry is missing, add it in the same PR as the version bump (step 3). Do not publish without it.
Tagging and the GitHub Release happen after publishing, in Post-publish.
Run a dry run for each crate in publish order:
cargo publish --dry-run -p manifold-csg-sys
cargo publish --dry-run -p manifold3d-sys
cargo publish --dry-run -p manifold-csg
cargo publish --dry-run -p manifold3d
Facade dry runs will fail if their canonical counterparts aren't already on crates.io at the expected version — this is expected for first publish and version bumps. The real dry-run validation for facades happens after their canonical is published.
For each crate, check:
cargo package --list -p <crate> — verify no secrets, build artifacts, or unnecessary files are includedLICENSE-APACHE and LICENSE-MIT must be presentDOCS_RS=1 cargo doc --no-deps --features nalgebra \
-p manifold-csg-sys -p manifold-csg -p manifold3d-sys -p manifold3d
Must build without errors. docs.rs runs with --network=none, so build.rs must detect DOCS_RS and skip the C clone/build.
Before first publish or any version where the public API changed:
pub items in manifold-csg — are any provisional or likely to change?Vec<f64> vs a newtype)0.x.y), minor bumps (0.1.0 → 0.2.0) can contain breaking changes, but patch bumps (0.1.0 → 0.1.1) must be backwards-compatible. Post-1.0, breaking changes require a major bump.cargo doc --features nalgebra --no-deps
Must build without warnings. Spot-check that crate-level docs render correctly.
Only after all checks pass. Always get explicit user confirmation before running cargo publish.
Dependencies must reach crates.io before their dependents:
manifold-csg-sys (no internal deps)manifold3d-sys (facade of manifold-csg-sys)manifold-csg (depends on manifold-csg-sys)manifold3d (facade of manifold-csg)Between each publish, crates.io may take a moment to index the new version. If the next publish fails with "no matching package", wait and retry.
cargo publish -p manifold-csg-sys
cargo publish -p manifold3d-sys
cargo publish -p manifold-csg
cargo publish -p manifold3d
A publish is not finished when cargo publish returns. Users watching the repo see the Releases page, not crates.io, so skipping the release step means the feature looks unshipped no matter what is on crates.io. This has actually happened here: v0.3.1 through v0.3.3 were published and tagged but had no GitHub Release for two months, and the reporter on #49 asked for a "release bump" for a feature that had been live since 0.3.1.
1. Tag. Use the manifold-csg version number; facades share the workspace version.
git tag -a v<version> -m "Release <version>"
git push origin v<version>
The tag must be annotated (-a). A GitHub Release inherits its created_at from the annotated tag's tagger date, and the Releases page sorts on created_at. A lightweight tag loses that.
2. GitHub Release. Write the notes to a file first, then create it. Get user confirmation before creating, since this is an externally visible write.
gh release create v<version> --verify-tag --latest --title v<version> --notes-file <file>
--verify-tag fails if the tag does not exist rather than silently creating one.--latest explicitly. When backfilling several releases, the older ones need --latest=false so the newest keeps the marker.--generate-notes. Source them from the CHANGELOG entry and the merged PR bodies. Cover: what changed and whether it is additive or breaking, a usage snippet for anything with a non-obvious entry point (env vars, build levers), and credit by @handle to anyone who filed the issue or sent the fix.### Additions, ### Fixes, ### Raw sys (...), ### Credit, then the compare link).3. Verify.
git tag against gh release list. Any tag missing a release is a backfill to cut.= pin in Cargo.toml enforces this)まだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Run a deep code review across the manifold-csg crates
日本語の概要は準備中です。原文の説明を表示しています。
Push a branch and open a PR with pre-flight checks
日本語の概要は準備中です。原文の説明を表示しています。
Run a deep code review across the manifold-csg crates
日本語の概要は準備中です。原文の説明を表示しています。
Bump the manifold3d pin, add FFI + safe wrappers for new upstream C API functions, bump versions, open a PR
日本語の概要は準備中です。原文の説明を表示しています。