Skip to content

chore: prepare package for crates.io publish#5

Merged
rrbe merged 6 commits intomasterfrom
chore/prep-crates-io-publish
Apr 27, 2026
Merged

chore: prepare package for crates.io publish#5
rrbe merged 6 commits intomasterfrom
chore/prep-crates-io-publish

Conversation

@rrbe
Copy link
Copy Markdown
Owner

@rrbe rrbe commented Apr 22, 2026

Summary

Prep the repo for a first cargo publish. All changes live in Cargo.toml, README.md, and a new CHANGELOG.md — no code changes.

Package metadata (Cargo.toml)

  • Add repository + homepage pointing at this GitHub repo (silences cargo's metadata warning, populates crates.io page).
  • Add rust-version = "1.74" so crates.io displays a clear Rust floor. Value chosen to match the declared MSRV of our most demanding direct dep (ratatui 0.29). If we ever want a stricter/looser pin, cargo install cargo-msrv && cargo msrv find will verify.
  • Add exclude list so the tarball only ships runtime-relevant files. Excluded: CLAUDE.md, TODO.md, TEST_PLAN.md, docs/, .github/, install.sh, uninstall.sh, Cross.toml. Kept: src/, fonts/SourceSerif4-SemiBold.ttf (loaded via include_bytes! at build time — dropping it would break cargo install), fixtures/, Makefile, LICENSE, README.md, README_CN.md, CHANGELOG.md.

README

  • Installation section now leads with cargo install termdown as the recommended method.
  • Pre-built install script and git-snapshot install are still documented, just further down.
  • README_CN.md stays in the package so the [中文文档](README_CN.md) link on the crates.io page resolves.

CHANGELOG

Package size

Files Size Compressed
Before 59 1.2 MiB 699.9 KiB
After 41 599 KiB 205 KiB

Test plan

  • cargo publish --dry-run succeeds with no warnings
  • make check (fmt-check + clippy + tests) passes
  • README_CN.md, CHANGELOG.md, README.md, LICENSE, fonts/, fixtures/, src/ all present in the package list
  • docs/, .github/, install.sh, CLAUDE.md, TODO.md, TEST_PLAN.md all absent from the package list
  • Post-merge: register crates.io account (GitHub OAuth), verify email, generate token, cargo login, then cargo publish for termdown 0.4.0

rrbe and others added 6 commits April 22, 2026 23:23
Add repository/homepage links and an exclude list so the published crate
ships only runtime-relevant files. Package shrinks from 59 files / 700 KiB
compressed to 39 files / 199 KiB compressed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Declare rust-version = "1.74" so crates.io shows a clear Rust floor.
- Re-include README_CN.md in the package so the "中文文档" link in
  README.md resolves on the crates.io page.
- Add CHANGELOG.md (Keep a Changelog format), covering 0.1.0 – 0.4.0.
- README Installation section now leads with "cargo install termdown";
  the pre-built install script follows for users without a Rust toolchain.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Switched from a guessed 1.74 floor to the actual toolchain in use
(rustc 1.95.0). This is what every CI and developer run compiles against,
so it's the only version we can honestly claim support for.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Record the follow-up to measure the real MSRV with cargo-msrv and add a
CI job that pins to it. Parked for later — current 1.95 ships as-is with
this PR.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@rrbe rrbe merged commit 2fc05f1 into master Apr 27, 2026
5 checks passed
@rrbe rrbe deleted the chore/prep-crates-io-publish branch April 27, 2026 15:05
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.

1 participant