refactor(core): demote unused pub items to pub(crate)#42
Merged
Conversation
…rate)
Demotes items in draw-core that are not referenced by any workspace
consumer (draw-cli, draw-app, draw-webapp, draw-wasm, draw-py),
integration tests, or examples:
geometry.rs:
ARROWHEAD_LENGTH, ARROWHEAD_ANGLE, HACHURE_LINE_WIDTH (constants)
normalize_bounds, compute_arrowhead, generate_hachure_lines
ArrowheadPoints, HachureLine (helper structs + fields)
point.rs:
Bounds::from_points (used internally by hit_test/element only)
Intentionally kept pub despite being unused internally: Point::distance_to
and Bounds::intersects — these are natural public-surface helpers on
already-public structs; the compiler dead-code lint is satisfied by their
cfg(test) call sites and we'd rather keep a reasonable geometry vocabulary
available to external consumers than drop useful primitives.
Intentionally kept pub because they are used externally:
geometry::ConnectionPoint, connection_points, find_nearest_snap_point
(draw-wasm)
storage::storage_dir (draw-webapp)
all DEFAULT_* style constants (re-exported by draw-cli)
No behavior change; API-surface tightening only.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
lostmygithubaccount
added a commit
that referenced
this pull request
Apr 13, 2026
Bumps all Rust crates and the Python package from 0.2.1 to 0.3.0. This minor bump reflects one breaking change in the dkdc-draw-core public API surface (pub -> pub(crate) demotions in #42), accumulated with the non-breaking work from this cycle: - #35: arrow snap-to-shape connection points - #36: CONTRIBUTING.md + README badges - #37: integration tests for draw-core public API - #38: Rust + Python hello-world examples - #39: CHANGELOG.md scaffolding - #40: surgical clippy opt-ins workspace-wide - #41: sample gallery (5 drawings × json/svg/png) - #42: pub -> pub(crate) demotions (BREAKING) - #43: Python test coverage 5 -> 27 See CHANGELOG.md for the 0.3.0 section and migration notes for the demoted symbols. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Merged
4 tasks
lostmygithubaccount
added a commit
that referenced
this pull request
Apr 13, 2026
Bumps all Rust crates and the Python package from 0.2.1 to 0.3.0. This minor bump reflects one breaking change in the dkdc-draw-core public API surface (pub -> pub(crate) demotions in #42), accumulated with the non-breaking work from this cycle: - #35: arrow snap-to-shape connection points - #36: CONTRIBUTING.md + README badges - #37: integration tests for draw-core public API - #38: Rust + Python hello-world examples - #39: CHANGELOG.md scaffolding - #40: surgical clippy opt-ins workspace-wide - #41: sample gallery (5 drawings × json/svg/png) - #42: pub -> pub(crate) demotions (BREAKING) - #43: Python test coverage 5 -> 27 See CHANGELOG.md for the 0.3.0 section and migration notes for the demoted symbols. Co-authored-by: Claude Opus 4.6 (1M context) <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
Tightens the
draw-corepublic surface. Demotes items that no workspace consumer (draw-cli,draw-app,draw-webapp,draw-wasm,draw-py), integration test, or example references.Demoted to `pub(crate)`
geometry::ARROWHEAD_LENGTH,ARROWHEAD_ANGLE,HACHURE_LINE_WIDTHgeometry::normalize_bounds,compute_arrowhead,generate_hachure_linesgeometry::ArrowheadPoints,HachureLine(structs + fields)point::Bounds::from_points(used byhit_test,elementonly)Intentionally kept `pub`
Point::distance_to,Bounds::intersects— natural geometry-vocabulary helpers on already-public structs; unused in-workspace but plausibly useful to external consumers.geometry::ConnectionPoint,connection_points,find_nearest_snap_point— consumed bydraw-wasm(snap-to-shape arrow binding).storage::storage_dir— consumed bydraw-webapp.DEFAULT_*style constants — re-exported bydraw-clion crates.io.Note on semver
This tightens the public API, which under semver is a breaking change for any third-party crate using the demoted items directly. For a
0.x.ycrate the convention is to bump the minor (0.2.1 → 0.3.0) at the next release; the[Unreleased]section ofCHANGELOG.mdwill accumulate this change alongside clippy/gallery work until a version bump PR lands.Test plan
rg -l <symbol>across consumer crates + tests + examples for every demoted item: zero references.bin/checkgreen (rust + python + clippy + wasm-pack build all pass).🤖 Generated with Claude Code