RustCrypto / RustCrypto/traits

Use macros for boilerplate documentation?

Open
#1,942 13 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
755
Forks
256
Avg merge
1h 27m
Merged PRs (30d)
2

Description

Several crates have copy-and-paste boilerplate documentation which ultimately shows how to use a trait-based API, but giving concrete examples for a particular algorithm.

It seems like we could potentially use macros to write #![doc] or #[doc] depending on context, and potentially accepting a type name to customize a specific example. After that it can use concat! to assemble the documentation, which should even make it possible to emit full code examples, but customized to algorithm-specific type names.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are named. Compare the repeated crate documentation and trait-based API examples first, then determine whether a macro can accept a type name and emit the required doc attributes and concatenated examples. Done means the duplicated documentation is replaced consistently without losing algorithm-specific names or full code examples.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.