-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
README: Autogenerate from library documentation using cargo-readme #11
base: master
Are you sure you want to change the base?
Conversation
README.md
Outdated
## Usage | ||
|
||
Add to your `Cargo.toml`: | ||
|
||
```toml | ||
gbm = "0.6.0" | ||
``` | ||
|
||
## Safe `libgbm` bindings for [rust](https://www.rust-lang.org) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like that this sits above the module documentation now :/
Error: Generated README is, please regenerate with `cargo readme > README.md`
diff --git a/README.md b/README.md
index c0d3cba..e7a3138 100644
--- a/README.md
+++ b/README.md
@@ -7,7 +7,7 @@ gbm
[![Lines of code](https://tokei.rs/b1/github/Smithay/gbm.rs)](https://github.com/Smithay/gbm.rs)
![MIT](https://img.shields.io/badge/license-MIT-blue.svg)
-## Usage
+### Usage
Add to your `Cargo.toml`:
@@ -75,8 +75,4 @@ gbm.set_crtc(crtc_handle, Some(fb), (0, 0), &[con], Some(mode))
.unwrap();
#```
-Current version: 0.6.0
-
-Some additional info here
-
License: MIT
Error: Process completed with exit code 1. Ha, that' works at least :) |
9fe684e
to
5dc5099
Compare
Based on the suggestion from @katyo in [1] and implementation in [2]. [1]: Smithay#9 (comment) [2]: https://github.com/katyo/aubio-rs/pull/18/files
5dc5099
to
c5d7eff
Compare
@MarijnS95 Rust since 1.54 can include README.md into documentation (see https://blog.rust-lang.org/2021/07/29/Rust-1.54.0.html#attributes-can-invoke-function-like-macros). So I suggest simply to use this feature if support older Rust versions does not so important for us. I was used |
@katyo I've considered that for some other projects too, but am hesitant for a couple reasons (drawbacks):
On the other hand |
Based on the suggestion from @katyo in 1 and implementation in 2. This also adds some neat badges for the repo (though I'm not sure how relevant the SLOC one is given all the generated files...).
We'll have to wait for webern/cargo-readme#67 to get rid of the
#
without introducing empty newlines.