-
Notifications
You must be signed in to change notification settings - Fork 153
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
gccrs: Add base documentation for using the Rust frontend. #2966
base: master
Are you sure you want to change the base?
Conversation
d38ac92
to
58f3dcd
Compare
sorry, did not mean to force push here but I amended my commit by mistake 😬 the only change is me adding an index to the .texi file |
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.
There are some mentions to the go frontend we probably want to get rid of.
gcc/rust/ChangeLog: * Make-lang.in: Add documentation targets. * gccrs.texi: New file.
58f3dcd
to
cbfb636
Compare
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.
You may want to add rust.install-html
target, so that the new urlification of terminal message can point to online doc generated from your new texinfo :)
@@ -0,0 +1,207 @@ | |||
\input texinfo @c -*-texinfo-*- | |||
@setfilename gccrs.info | |||
@settitle The GNU Rust Compiler |
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.
Just to be sure, is that the "blessed" name, wrt the Rust® ?
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.
good question :) I think we can leave it like this for now, and be open to changing it
rust has the (empty) rust.dvi and rust.html rules, but lacks the (empty) rust.install-dvi and rust.install-html ones. 2024-04-04 Christophe Lyon <[email protected]> gcc/rust/ * Make-lang.in (rust.install-dvi, rust.install-html): New rules.
gcc/rust/ChangeLog: * Make-lang.in: Add proper rust.install-html rule.
good point! I added it in 66d644a, basing it off the patch from Christophe Lyon we had received a while ago to add these dummy rules. it's a straight copy from the Ada frontend, as it seems both the D and Go frontend have done this too. |
I'll add another PR with more documentation for using the compiler and add some example code from #2957 |
@cindex @option{-frust-mini-std} | ||
@item -frust-mini-std | ||
Add the @code{mini_std} module to the crate you are currently compiling. This miniature | ||
standard library is experimental, and does not represent a strict subset of Rust's | ||
standard library. It is there so that you can have access to basic Rust functionality, | ||
such as common arithmetic operations on natural numbers or printing basic strings to | ||
the standard output streams. |
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.
Should probably not be mentioned.
@cindex @option{-frust-mini-std} | |
@item -frust-mini-std | |
Add the @code{mini_std} module to the crate you are currently compiling. This miniature | |
standard library is experimental, and does not represent a strict subset of Rust's | |
standard library. It is there so that you can have access to basic Rust functionality, | |
such as common arithmetic operations on natural numbers or printing basic strings to | |
the standard output streams. |
gcc/rust/ChangeLog:
You can build the documentation yourself by running one of these commands:
pdf:
html:
for the HTML output look for an
index.html
file to open. as for the produced PDF, it should be calledgccrs.pdf
in your current working directory