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

Add a --release mode for rustdoc as well? #66956

Closed
GuillaumeGomez opened this issue Dec 2, 2019 · 5 comments
Closed

Add a --release mode for rustdoc as well? #66956

GuillaumeGomez opened this issue Dec 2, 2019 · 5 comments
Assignees
Labels
C-feature-request Category: A feature request, i.e: not implemented / a PR. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@GuillaumeGomez
Copy link
Member

We should have a --release version of rustdoc. When run, all the (JS) content would be minified. It would replace the --disable-minification option.

It'd make differentiation a bit better maybe? For the context, someone gave me the idea when we were talking about #66828.

@GuillaumeGomez GuillaumeGomez added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Dec 2, 2019
@GuillaumeGomez GuillaumeGomez self-assigned this Dec 2, 2019
@jonas-schievink jonas-schievink added the C-feature-request Category: A feature request, i.e: not implemented / a PR. label Dec 2, 2019
@jonas-schievink
Copy link
Contributor

Why call it --release? That sounds easy to confuse with the --release flag accepted by Cargo. If it only enables minification, why not call it --minify or --enable-minification?

@euclio
Copy link
Contributor

euclio commented Dec 2, 2019

I don't think that rustdoc's responsibility should be to minify or otherwise optimize the HTML/CSS/JS artifacts it produces. Other tools will do a much better job at this.

As suggested in another thread, I think making a cargo minidoc subcommand that uses your favorite minifier (whether implemented in Rust or another language) will be less complex and more effective.

@GuillaumeGomez
Copy link
Member Author

@jonas-schievink That's exactly my point: rustc generates more optimized code with --release and that's kinda what I had in mind about minification as well.

@euclio: I strongly disagree with you on this but this is nothing new. ;)

@jonas-schievink
Copy link
Contributor

rustc does not have a --release flag

@GuillaumeGomez
Copy link
Member Author

Ah? Then my bad. Maybe let's take it to cargo...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: A feature request, i.e: not implemented / a PR. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants