ワンクリックで
update-upstream
Bump the manifold3d pin, add FFI + safe wrappers for new upstream C API functions, bump versions, open a PR
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Bump the manifold3d pin, add FFI + safe wrappers for new upstream C API functions, bump versions, open a PR
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Run a deep code review across the manifold-csg crates
Publish crates to crates.io with pre-flight checks
Run a deep code review across the manifold-csg crates
Push a branch and open a PR with pre-flight checks
| name | update-upstream |
| description | Bump the manifold3d pin, add FFI + safe wrappers for new upstream C API functions, bump versions, open a PR |
| user-invocable | true |
Guided workflow for picking up upstream manifold3d changes: bump the pin, audit carry-patches, bind new C API, add safe wrappers, bump versions, open a PR. The user still makes API shape decisions for new wrappers; this skill handles the mechanical parts.
v3.5.0, abc123def)Work through these in order. Stop and surface any decision to the user.
git status # must be clean on main
git checkout main && git pull
git checkout -b update-upstream-<ref>
gh api repos/elalish/manifold/git/refs/heads/master --jq '.object.sha'MANIFOLD_VERSION in crates/manifold-csg-sys/build.rs), the target, and a one-line commit summary of what's between them: gh api repos/elalish/manifold/compare/<current>...<target> --jq '{ahead_by: .ahead_by, commits: [.commits[] | {sha: .sha[0:8], message: (.commit.message | split("\n")[0])}]}'wasm-cxx-shim supports it. Look at the latest shim release's MANIFOLD_GIT_TAG default (in the helper at cmake/WasmCxxShimManifold.cmake, or in the release notes). If the target SHA is past the shim's tested pin, flag it: either pick a target the shim already supports, or be ready to cfg-gate any new C API on not(all(target_arch = "wasm32", target_os = "unknown")) (the wasm-uu lane will fall back to the shim's tested pin via wasm_cxx_shim_add_manifold()'s default). Mismatch without gating produces wasm-uu link failures — see CLAUDE.md "Versioning" section.Edit MANIFOLD_VERSION in crates/manifold-csg-sys/build.rs. The constant accepts tags, branches, or commit SHAs — prefer SHAs for reproducibility (commit on master) or tags for tagged releases.
Then update the Nix offline lane to match: run nix flake update and commit the new flake.lock. The nix-offline CI lane links nixpkgs' prebuilt manifold via MANIFOLD_CSG_LIB_DIR, so the locked nixpkgs must resolve to a manifold matching the new pin (or the lane links an ABI-mismatched library). If nixpkgs hasn't caught up to the new upstream version yet, note it for the user - the lane may fail until nixpkgs ships it.
For each patch in crates/manifold-csg-sys/patches/:
gh api repos/elalish/manifold/pulls/<N>).cargo clean -p manifold-csg-sys && cargo build -p manifold-csg-sys. If any patch fails to apply, stop and surface the conflict — the user needs to either update the patch or drop it.cargo clean -p manifold-csg-sys
cargo test --features nalgebra
Any test failure stops the flow. Common causes: upstream changed behavior (e.g., numerical differences from deterministic math changes), signature changes (will show as compile errors), or carry-patch conflicts.
The built C header is at target/debug/build/manifold-csg-sys-*/out/manifold-src/bindings/c/include/manifold/manifoldc.h. Find it and extract every manifold_* function declaration, compare against pub fn manifold_* in crates/manifold-csg-sys/src/lib.rs.
Also look for new types (structs, enums, opaque handles) in bindings/c/include/manifold/types.h.
Report:
Show the list of new functions to the user. Ask which to bind in this PR. Some guidelines:
If the user says "bind everything new," proceed without individual approval.
In crates/manifold-csg-sys/src/lib.rs:
pub struct ManifoldXyzVec { _private: [u8; 0] }).#[repr(C)].// ── <Name> ── header).Match the upstream C header signature exactly. Use *const for read-only pointers where the C uses non-const but we can tell the function is read-only.
For each new function, write a safe wrapper method or free function in the appropriate crates/manifold-csg/src/ file. If the new functionality deserves its own module (like ray casting did), create it and register in lib.rs.
Follow existing patterns:
manifold_alloc_*, call the FFI, delete the allocation, return a new wrapper.[f64; 3] arrays for 3D vectors.unsafe block gets a // SAFETY: ... explaining the invariant.#[must_use] on pure transforms returning Self.New tests go in crates/manifold-csg/tests/integration.rs. Cover:
Run cargo test --features nalgebra and cargo clippy --all-targets --features nalgebra -- -D warnings.
Add rows for new wrappers. Update the summary if present (but prefer prose over hardcoded counts — see CLAUDE.md).
Per CLAUDE.md versioning policy:
manifold-csg-sys: patch bump (e.g., 3.4.103 → 3.4.104) since upstream contents changed. If the upstream major.minor changed (new manifold3d release), update major.minor accordingly.manifold-csg (workspace version): patch bump for additive changes, minor for breaking.manifold-csg's manifold-csg-sys dep: update to new sys version.manifold3d-sys and manifold3d share their canonical counterparts' versions via = pins; update those pins.One commit. Commit message explains:
Use /pr skill or gh pr create directly. Show the user the draft before posting — the feedback_no_public_posts rule applies.
If the user wants to publish after the PR merges, invoke /publish.