Skip to main content

export-api

Generate api.md artifacts for changed Rust crates after code generation or source edits.

소스 정보

저장소
Azure/azure-sdk-for-rust
최근 소스 활동
2026년 9월 24일 21:39
감지된 SKILL.md 언어
영어
스타
886
포크
377

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
export-api
description
Generate api.md artifacts for changed Rust crates after code generation or source edits.
# Export API artifacts Run this after regenerating sources or changing Rust code that can affect a crate's public API. ## Default workflow 1. Collect changed non-deleted files from Git. By default, use both staged and unstaged local changes: ```bash { git diff --staged --name-only --diff-filter=d; git diff --name-only --diff-filter=d; git ls-files --others --exclude-standard -- 'sdk'; } | sort -u ``` 2. If the user wants branch-based detection instead, diff against the merge base with `main`: ```bash base="$(git merge-base main HEAD)" git diff --name-only --diff-filter=d "$base"...HEAD | sort -u ``` This branch-based mode only considers tracked branch changes; use the default local-change mode when untracked files should also trigger API regeneration. 3. Assume service crates live under `sdk/<service-directory>/<crate-name>`. For each changed file under `sdk/`, derive the candidate crate directory from the first three path segments and keep it only when `<crate-directory>/Cargo.toml` exists. 4. For each affected crate, run the explicit generator command from the repository root: ```bash cargo run --manifest-path eng/tools/generate_api/Cargo.toml -- \ --manifest-path <crate>/Cargo.toml ``` ## Optional outputs - Pass `--review` to also generate `api.metadata.yml`, `api.md.map`, and `api.documentation.patch`. ## No changed crates If no changed files map to a crate directory under `sdk/<service-directory>/<crate-name>`, stop and report that no crate API artifacts need regeneration. ## Validation After generation, check the resulting `api.md` files in `git diff` and report which crates were updated.
GitHub에서 보기