Skip to content

Release 0.3.1: sync docs.rs with README, declare MSRV - #5

Merged
azeemshaik025 merged 3 commits into
mainfrom
feat/v0.3.1
Aug 9, 2026
Merged

Release 0.3.1: sync docs.rs with README, declare MSRV#5
azeemshaik025 merged 3 commits into
mainfrom
feat/v0.3.1

Conversation

@azeemshaik025

Copy link
Copy Markdown
Owner

Summary

Docs + metadata patch — no code or behavior changes. Closes the two alignment gaps found while auditing the published 0.3.0 as a newcomer would experience it.

The problem

  • docs.rs was thin. The rustdoc landing showed only the basic example and the beckon macro — auth, retries, with_client, and error handling lived only in the README (crates.io). Worse, the macro's own doc said "see the crate-level docs for auth, retries…" while those docs didn't contain them.
  • No declared MSRV. The generated trait uses async fn in traits (Rust 1.75+), but nothing said so — a dev on older Rust hit a cryptic error.

The fix

  • #![doc = include_str!("../README.md")] — the README is now the single source of truth for both surfaces; they can't drift again. README rust fences are annotated no_run (the full example, still compile-verified) / ignore (fragments) so cargo test stays green.
  • rust-version = "1.75" in Cargo.toml (also surfaces an MSRV badge on crates.io) + a README note.
  • README: documented the method-naming rule (GET /users/{id}get_users_by_id); example links made absolute so they resolve on crates.io and docs.rs.

Verification

  • cargo fmt --check, clippy --all-targets -D warnings — clean
  • Tests: 28 unit/integration + doctests (1 passed = README example compiled via no_run, 6 ignored) — green
  • cargo doc builds; confirmed the rendered docs now contain Auth / Retry / with_client / Errors / MSRV
  • cargo publish --dry-run packages cleanly (README included for include_str!)

After this merges, the shipped story is fully in sync — clean base for 0.4.0 (typed error bodies).

Docs and metadata only — no code or behavior changes.

- Crate-level docs are now sourced from the README via
  `#![doc = include_str!("../README.md")]`, so docs.rs and crates.io no longer
  drift. Previously docs.rs showed only the basic example while auth, retries,
  with_client, and error handling lived only in the README. README `rust` fences
  are annotated (`no_run` / `ignore`) so doctests still compile-verify the API.
- Declared `rust-version = "1.75"` (the generated trait uses async fn in traits).
- README: documented the method-naming rule; example links are now absolute so
  they resolve on crates.io and docs.rs.
The README example (now the crate docs via include_str!) declared private structs
that the generated pub trait leaks, which stable rustc rejects with E0446. Local
1.92 only warned; CI stable (1.97) errors. Make User/UserPath pub — a public
generated trait genuinely requires public response types. Verified with +stable.
A stray git add -A on this branch swept up the macOS .DS_Store. Untrack it and add
it to .gitignore so it can't recur.
@azeemshaik025
azeemshaik025 merged commit a0449af into main Aug 9, 2026
1 check passed
@azeemshaik025
azeemshaik025 deleted the feat/v0.3.1 branch August 9, 2026 06:43
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