core: stabilize facade API surface, feature taxonomy, and public-api CI gate#122
Merged
core: stabilize facade API surface, feature taxonomy, and public-api CI gate#122
Conversation
Introduce a canonical feature taxonomy (core-*, protocol-*, extras-*) and migrate legacy feature aliases for compatibility. Refactor the rustapi-rs facade to expose stable namespaces (core, protocol, extras) and provide backward-compatible root aliases; update Cargo.toml features accordingly. Add CONTRACT.md to document the public contract and SemVer/MSRV/deprecation policies. Add committed public API snapshots (api/public/*) and a GitHub Actions workflow plus script to detect snapshot drift and require a `breaking` or `feature` PR label. Update templates, CLI, tests, and docs to use the new feature names. Make several internal API adjustments: seal the Handler trait, adjust module visibility/exports in rustapi-core, and update procedural macros to resolve internal crate paths via the facade's __private exports. Remove RELEASES.md and apply related README/architecture documentation tweaks.
Add .github/BRANCH_PROTECTION.md with UI and API instructions for protecting main and requiring Public API checks. Update CHANGELOG and CONTRACT to document facade-first CORE stabilization, public API governance (snapshots/CI), feature taxonomy and deprecation/migration timeline. Silence unused-symbol warnings by adding #[allow(dead_code)] to several rustapi-core helpers and path validation types/functions, and conditionally gate sqlx-related imports in rustapi-extras with feature cfgs. Refresh docs and examples to the new feature naming scheme (extras-*, protocol-*, core-*) and update performance wording to reflect the renamed simd-json feature.
Add a .gitattributes rule to treat api/public/*.txt as text with LF endings. Normalize the EOLs for rustapi-rs.all-features.txt and rustapi-rs.default.txt (appearing as binary diffs due to line-ending changes).
Add .github/scripts/*.sh to .gitattributes to enforce LF normalization for shell scripts. Enhance public_api_label_gate.sh to collect labels from PR_LABELS or, if missing, from the GitHub event payload (using jq), normalize labels to lowercase, and print detected labels before checking for required "breaking" or "feature" labels.
github-actions bot
pushed a commit
that referenced
this pull request
Feb 13, 2026
…-facade-api core: stabilize facade API surface, feature taxonomy, and public-api CI gate 5671f0d
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.
Introduce a canonical feature taxonomy (core-, protocol-, extras-) and migrate legacy feature aliases for compatibility. Refactor the rustapi-rs facade to expose stable namespaces (core, protocol, extras) and provide backward-compatible root aliases; update Cargo.toml features accordingly. Add CONTRACT.md to document the public contract and SemVer/MSRV/deprecation policies. Add committed public API snapshots (api/public/) and a GitHub Actions workflow plus script to detect snapshot drift and require a
breakingorfeaturePR label. Update templates, CLI, tests, and docs to use the new feature names. Make several internal API adjustments: seal the Handler trait, adjust module visibility/exports in rustapi-core, and update procedural macros to resolve internal crate paths via the facade's __private exports. Remove RELEASES.md and apply related README/architecture documentation tweaks.Description
Please include a summary of the changes and the related issue. Please also include relevant motivation and context.
Type of Change
Checklist
Testing
Please describe the tests that you ran to verify your changes:
Additional Notes
This pull request introduces a new public API compatibility contract for the RustAPI workspace, enforces stricter SemVer and feature flag taxonomy, and implements automated CI checks to ensure any changes to the public API are properly labeled as breaking or feature additions. It also updates the CLI, templates, and documentation to align with the new feature taxonomy, and improves macro hygiene for internal path resolution. Below are the most important changes:
Public API Compatibility & CI Enforcement
CONTRACT.mdto define the public API compatibility contract, SemVer policy, MSRV, deprecation rules, feature flag taxonomy, and internal leakage rules for the RustAPI workspace..github/workflows/public-api.yml) and a shell script (.github/scripts/public_api_label_gate.sh) to check for changes in public API snapshot files and enforce that such PRs are labeled asbreakingorfeature. [1] [2]Feature Flag Taxonomy & CLI Alignment
extras-*andprotocol-*feature naming conventions instead of legacy names likejwt,cors, orws. This affects both the CLI logic and generatedCargo.toml/config comments. [1] [2] [3] [4] [5] [6] [7] [8]README.mdexplaining the new namespaces (core-*,protocol-*,extras-*) and meta features.Macro & Internal Path Hygiene
crates/rustapi-macrosby dynamically resolving paths to internal crates (e.g.,rustapi-core,rustapi-openapi) to avoid leaking internal paths in public APIs and to support both direct and re-exported usage. [1] [2] [3] [4] [5]Internal API Visibility & Cleanups
rustapi-core(auto_route,auto_schema,json,path_params,path_validation) private or crate-private to prevent accidental public exposure of internal APIs. [1] [2]PathParamsfrom the crate root for public consumption.Handlertrait inrustapi-coreto prevent external implementations, further locking down the public API.Documentation & Release Notes
RELEASES.mdin favor of the new contract and taxonomy documentation.These changes collectively ensure that the public API surface is well-defined, changes are properly tracked and reviewed, and the feature flag system is consistent and future-proof.