gccrs icon indicating copy to clipboard operation
gccrs copied to clipboard

gccrs: Add base documentation for using the Rust frontend.

Open CohenArthur opened this issue 1 year ago • 3 comments

gcc/rust/ChangeLog:

* Make-lang.in: Add documentation targets.
* gccrs.texi: New file.

You can build the documentation yourself by running one of these commands:

pdf:

texi2pdf gcc/rust/gccrs.texi -I gcc/doc -I gcc/doc/include -I build/gcc/

html:

makeinfo --html gcc/rust/gccrs.texi -I gcc/doc -I gcc/doc/include -I build/gcc/ -o <output_dir>

for the HTML output look for an index.html file to open. as for the produced PDF, it should be called gccrs.pdf in your current working directory

CohenArthur avatar Apr 23 '24 19:04 CohenArthur

sorry, did not mean to force push here but I amended my commit by mistake :grimacing: the only change is me adding an index to the .texi file

CohenArthur avatar Apr 24 '24 06:04 CohenArthur

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 :)

good point! I added it in 66d644a9082fb8d7cc12d246b484c0f3b84fb135, 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.

CohenArthur avatar Apr 29 '24 13:04 CohenArthur

I'll add another PR with more documentation for using the compiler and add some example code from #2957

CohenArthur avatar Apr 29 '24 13:04 CohenArthur