Skip to content

Conversation

martin-g
Copy link
Member

@Kriskras99
Copy link
Contributor

If we're keeping the README.md and src/lib.rs manually in sync, it might make sense to do something like #![doc = include_str!(../../README.md)]

@martin-g
Copy link
Member Author

It is not manual - we use cargo-rdme.
But your approach might be better!

@Kriskras99
Copy link
Contributor

Check, I think having the badges, License and Contributing in src/lib.rs is totally fine. It also means that a contributor not aware of cargo-rdme doesn't forget to update the readme after fixing/adding something in the documentation

@martin-g
Copy link
Member Author

t also means that a contributor not aware of cargo-rdme doesn't forget to update the readme after fixing/adding something in the documentation

The CI will let him/her know -

- name: Run cargo-rdme
# The result is environment independent so one test pattern is enough.
if: matrix.rust == 'stable' && matrix.runner.target == 'x86_64-unknown-linux-gnu'
run: |
cargo install --root ~/.cargo-${{ matrix.rust }}/cargo-rdme --locked cargo-rdme
export PATH=$PATH:~/.cargo-${{ matrix.rust }}/cargo-rdme/bin
cargo rdme --check

@martin-g martin-g merged commit 70867f1 into main Jul 25, 2025
20 checks passed
@martin-g martin-g deleted the fields-order-importance branch July 25, 2025 08:07
@Kriskras99
Copy link
Contributor

Ah perfect. Than it does not really matter

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.

2 participants