Turn crate-template into a reusable crates.io crate publishing template - #1
Conversation
Co-authored-by: MikeGrier <220633264+MikeGrier@users.noreply.github.com>
Co-authored-by: MikeGrier <220633264+MikeGrier@users.noreply.github.com>
crate-template into a reusable crates.io crate publishing template
|
The "smoke.rs" test seems like it is kind of specific still. It's not a bad idea to call out the need for basic tests but Mojibake as a top level concern in the comments? |
|
@copilot-swe-agent[bot] , can you read my last comment and act on it |
Co-authored-by: MikeGrier <220633264+MikeGrier@users.noreply.github.com>
Addressed in 9077670. The integration smoke test is now generic and only verifies that the crate builds in an integration-test context, without depending on the placeholder |
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
There was a problem hiding this comment.
Pull request overview
This PR reworks the repository into a reusable template for creating and publishing a crates.io Rust crate, including a placeholder workspace member, documentation scaffolding, and generalized GitHub Actions automation (CI, release-please, publishing, CodeQL, Dependabot).
Changes:
- Adds a single-member Cargo workspace with a placeholder crate (
crates/your-crate-name) plus minimal library code and tests. - Introduces/updates automation for CI, release-please, and tag-based crates.io publishing (including a workspace-metadata-driven publish step).
- Replaces project-specific docs/artifacts with template-oriented guidance and placeholders (README/DEVELOPMENT/CHECKLIST/PLANS/DESIGN-NOTES).
Reviewed changes
Copilot reviewed 23 out of 25 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/check-encoding.ps1 | Adds a PowerShell UTF-8/mojibake checker used by CI. |
| release-please-config.json | Adds template release-please configuration for versioning. |
| README.md | Rewrites root README as template usage/release instructions. |
| PLANS.md | Adds placeholder for short-lived implementation plans. |
| LICENSE | Adds MIT license text for the template repository. |
| DEVELOPMENT.md | Adds contributor command and release setup guidance. |
| DESIGN-NOTES.md | Adds placeholder for durable design decisions. |
| crates/your-crate-name/tests/smoke.rs | Adds minimal integration test to ensure crate links/compiles. |
| crates/your-crate-name/src/lib.rs | Adds placeholder API and a unit test. |
| crates/your-crate-name/README.md | Adds placeholder crate README. |
| crates/your-crate-name/Cargo.toml | Adds placeholder crate manifest inheriting workspace metadata. |
| CHECKLIST.md | Adds template specialization checklist. |
| CHANGELOG.md | Adds initial changelog for template contents. |
| Cargo.toml | Adds workspace root manifest with template metadata and release profile. |
| Cargo.lock | Adds lockfile for the placeholder workspace member. |
| .release-please-manifest.json | Adds release-please manifest for version tracking. |
| .gitignore | Adds Rust/template-focused ignore rules. |
| .github/workflows/release-please.yml | Adds release-please workflow plus Cargo.lock update on release PRs. |
| .github/workflows/publish-crate.yml | Adds tag-triggered crates.io publish workflow using workspace metadata. |
| .github/workflows/codeql.yml | Adds CodeQL workflow for Actions and Rust. |
| .github/workflows/ci.yml | Adds CI workflow running encoding check, build/test, fmt, clippy, and MSRV. |
| .github/dependabot.yml | Adds Dependabot updates for Actions and Cargo. |
| .github/copilot-instructions.md | Updates Copilot instructions for a generic crate template repo. |
| .github/actions/workspace-version/action.yml | Adds composite action to read workspace.package version from Cargo.toml. |
| .gitattributes | Adds line-ending normalization and binary file attributes. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| function Test-IsTextFile([string]$file) { | ||
| $ext = [System.IO.Path]::GetExtension($file).ToLowerInvariant() | ||
| if ($ext -and $TextExtensions -contains $ext) { return $true } | ||
| # Files with no extension that look like text (LICENSE, README, etc.). | ||
| $name = [System.IO.Path]::GetFileName($file) | ||
| if (-not $ext -and $name -match '^(LICENSE|README|CHANGELOG|AUTHORS|NOTICE|MAINTAINERS|CODEOWNERS)') { | ||
| return $true | ||
| } | ||
| return $false | ||
| } |
| @@ -0,0 +1,87 @@ | |||
| # Copyright (c) 2026 Mike Grier. All rights reserved. | |||
| # Normalize line endings: Git stores LF, checks out platform-native by default. | ||
| * text=auto eol=lf |
| @@ -0,0 +1,44 @@ | |||
| # Copilot Instructions | |||
|
|
|||
| Use LF line endings. | |||
This PR replaces the placeholder repository state with a reusable Rust crate template derived from
globazog-rs, while removing project-specific crate implementation and planning artifacts. The result keeps the automation and repository scaffolding needed to bootstrap a publishable crates.io crate with minimal follow-up edits.Workspace template
crates/your-crate-nameRelease and publishing automation
release-please, CodeQL, Dependabot, CI, and encoding checksglobazogto a template package nameDocumentation and planning scaffolding
README.md,DEVELOPMENT.md,CHECKLIST.md,PLANS.md, andDESIGN-NOTES.mdas template-oriented guidanceDESIGN-NOTES.mdas a placeholder for future project design decisionsglobazog-specific contentCopilot and repository hygiene
Example placeholder crate shape:
Original prompt