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

Start documenting rustc #209

Closed
wants to merge 3 commits into from

Conversation

mrhota
Copy link
Contributor

@mrhota mrhota commented Jan 21, 2018

As far as I know, we don't have any reference documentation on the actual tools in the rust tool suite.

@@ -14,20 +14,14 @@ to shrink!
specified.
- [Flexible target specification] - Some---but not all---flags are documented
in [Conditional compilation]
- [Require parentheses for chained comparisons]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this supposed to be part of a separate PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no: that feature is already documented here, so I'm just cleaning this list up.

and its behavior can vary depending on the values of several environment
variables.

We document its command-line options, arguments, and operative environment
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can just link to ../rustdoc/index.html for documenting rustdoc (and ../cargo/index.html for cargo)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh dang it, I didn't even know about those. I'll link to the references.

Providing the option `-O` is equivalent to `-C opt-level=2`. If both `-O` and
`-C opt-level` are provided, the compiler will complain.

If `s` or `z` are provided on a non-nightly compiler, the compiler will
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't document nightly-only features in the Reference, to avoid having too large of a moving target to follow. Instead, said nightly features should be documented in the Unsafe Book inside the rust-lang/rust repo.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know, but the problem is rustup run stable rustc -C help says you can use s and z opt-levels. I thought it was worth mentioning you can't use those on non-nightlies.

I'm not married to the wording, obviously 😃

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I created rust-lang/rust#47651 for making non-nightlies stop reporting s and z options.

@Havvy
Copy link
Contributor

Havvy commented Jan 22, 2018

This is an extension to the scope of the Reference, and as such, needs to be discussed during a documentation meeting. As such, I've added it to the agenda for the next one on Tuesday, January 23rd. Anybody interested is free to attend (like all documentation meetings). They're in #rust-docs on irc.mozilla.org

@mrhota mrhota changed the title Start documenting rustc and rustdoc Start documenting rustc Jan 22, 2018
@steveklabnik
Copy link
Member

Rustdoc has an entire book in src/doc, the compiler does not yet.

@steveklabnik
Copy link
Member

So! @mrhota i want to start off by saying that doing this is awesome, however, i don't think it's appropriate for the reference. Right now, we have two out of the three, but elsewhere:

As for rustc, there's also an effort to make a book that's not about using, but contributing to, the compiler. I've opened a comment there to ask about this: https://internals.rust-lang.org/t/so-you-want-to-hack-on-the-rust-compiler-a-plan-for-a-book/6497/37

So, let's:

  1. see what they say on internals
  2. create a new book in the rust repo for rustc usage
  3. improve those existing books instead of doing it here

Thank you! Let me know if you want to help with 2, we can start that in a PR before the full discussion gets going.

@mrhota mrhota deleted the start-tools-references branch January 24, 2018 04:02
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.

4 participants