Skip to content

Turn crate-template into a reusable crates.io crate publishing template - #1

Merged
MikeGrier merged 4 commits into
mainfrom
copilot/remove-globazog-crate
Aug 16, 2026
Merged

Turn crate-template into a reusable crates.io crate publishing template#1
MikeGrier merged 4 commits into
mainfrom
copilot/remove-globazog-crate

Conversation

Copilot AI commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

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

    • Adds a generic Cargo workspace with a single placeholder crate at crates/your-crate-name
    • Replaces project-specific manifest metadata with explicit template placeholders for crate name, repository URLs, authorship, and docs.rs
    • Includes a minimal library + smoke test so the template is immediately buildable and easy to specialize
  • Release and publishing automation

    • Carries over release-please, CodeQL, Dependabot, CI, and encoding checks
    • Generalizes release config from globazog to a template package name
    • Updates the publish workflow to derive the crate name from workspace metadata instead of hardcoding project-specific values
  • Documentation and planning scaffolding

    • Rewrites README.md, DEVELOPMENT.md, CHECKLIST.md, PLANS.md, and DESIGN-NOTES.md as template-oriented guidance
    • Leaves DESIGN-NOTES.md as a placeholder for future project design decisions
    • Removes the completed project checklist and other globazog-specific content
  • Copilot and repository hygiene

    • Retains Copilot instructions, but rewrites them for a generic template repository rather than the original crate
    • Preserves line-ending and repository hygiene settings needed by the existing CI/tooling

Example placeholder crate shape:

/// Returns a greeting for the provided crate or project name.
#[must_use]
pub fn greeting(name: &str) -> String {
    format!("hello from {name}")
}
Original prompt

take the contents of the MikeGrier/globazob-rs repository's main branch, remove the actual globazog crate, and make it into a generic template repository for how to construct and publish crates that publish on crates.io.

so retain the copilot instructions and CI system, get rid of the particulars of the existing crate(s), the existing checklists and completed checklists. perhaps leave the root DESIGN-NOTES.md with only a placeholder description of what should go there. generally scrub the repository of content specific to the "globazog" crate/project, and add whatever would be necessary so that when creating a new repository from this template, it would either automatically specialize or be easily specialized to the task at hand.

Copilot AI and others added 2 commits August 16, 2026 20:38
Co-authored-by: MikeGrier <220633264+MikeGrier@users.noreply.github.com>
Co-authored-by: MikeGrier <220633264+MikeGrier@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove globazog crate and create template repository Turn crate-template into a reusable crates.io crate publishing template Aug 16, 2026
Copilot AI requested a review from MikeGrier August 16, 2026 20:42
@MikeGrier

Copy link
Copy Markdown
Owner

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?

@MikeGrier

Copy link
Copy Markdown
Owner

@copilot-swe-agent[bot] , can you read my last comment and act on it

Co-authored-by: MikeGrier <220633264+MikeGrier@users.noreply.github.com>

Copilot AI commented Aug 16, 2026

Copy link
Copy Markdown
Contributor Author

@copilot-swe-agent[bot] , can you read my last comment and act on it

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 greeting API.

@MikeGrier MikeGrier left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-advanced-security

Copy link
Copy Markdown

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:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

@MikeGrier
MikeGrier marked this pull request as ready for review August 16, 2026 20:59
Copilot AI lite review requested due to automatic review settings August 16, 2026 20:59
@MikeGrier
MikeGrier merged commit 86d793e into main Aug 16, 2026
11 checks passed
@MikeGrier
MikeGrier deleted the copilot/remove-globazog-crate branch August 16, 2026 20:59

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread tools/check-encoding.ps1
Comment on lines +48 to +57
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
}
Comment thread .github/workflows/ci.yml
@@ -0,0 +1,87 @@
# Copyright (c) 2026 Mike Grier. All rights reserved.
Comment thread .gitattributes
Comment on lines +1 to +2
# 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants