Skip to content
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

bin.doc=true and lib.doc=false documents only the lib #644

Closed
AE9RB opened this issue Mar 17, 2020 · 4 comments
Closed

bin.doc=true and lib.doc=false documents only the lib #644

AE9RB opened this issue Mar 17, 2020 · 4 comments

Comments

@AE9RB
Copy link

AE9RB commented Mar 17, 2020

Regarding: docs.rs/basic-lang

This crate has a lib and one bin. All of the documentation is in the bin but only the lib shows up on docs.rs.

It's doing the opposite of what I expect from my Cargo.toml:

[[bin]]
name = "basic"
doc = true
[lib]
name = "macros"
doc = false

Running cargo doc --open does what I expect.

@jyn514
Copy link
Member

jyn514 commented Mar 17, 2020

In general we don't document binaries, see e.g. https://docs.rs/bat. Can I ask your use case for putting documentation in the binary instead of in the library?

@AE9RB
Copy link
Author

AE9RB commented Mar 17, 2020

I used the lib for a small proc-macro I don't want to publish as a crate because there things in unstable that would let me git rid of it.

@jyn514
Copy link
Member

jyn514 commented Mar 17, 2020

Closing as duplicate of #238, but I'll keep this case in mind if we ever start documenting binaries.

@jyn514 jyn514 closed this as completed Mar 17, 2020
@AE9RB
Copy link
Author

AE9RB commented Mar 19, 2020

I removed the proc-macro so I could use lib for docs. I didn't know that bin docs weren't published. #238 also encountered cargo doc having different behavior. Digging for docs/faq only brought me to information about setting up a dev env. I'm all set now, just wanted to explain the experience that got me here.

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

No branches or pull requests

2 participants