-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Implement a web backend for rustdoc_ng #9374
Conversation
A couple of cool things:
Regardless, carry on! |
Also, this would seriously benefit from a markdown C library as opposed to forking off and executing pandoc. We're not really using any of pandoc's fancy extensions any more (except for all the tutorial/manual generation), so we're less attached to it now than before. The reason it needs to be a C library is that instead of forking pandoc once per page, now it's once per docblock which is a lot more often. I've parallelized everything among a set number of workers, so it's not as bad as it could be, but it's still pretty bad. |
You can use pandoc to compile small fragments without forking more than one process for it, since it's a library. |
@thestinger that would be awesome, but it wasn't clear to me at first how to do that. @Seldaek suggested coalescing a number of rendering requests into one batch to send to pandoc, but that was difficult to implement so I didn't end up doing it. If I could keep a long-running pandoc process running though, that'd be awesome. |
This large commit implements and `html` output option for rustdoc_ng. The executable has been altered to be invoked as "rustdoc_ng html <crate>" and it will dump everything into the local "doc" directory. JSON can still be generated by changing 'html' to 'json'. This also fixes a number of bugs in rustdoc_ng relating to comment stripping, along with some other various issues that I found along the way. The `make doc` command has been altered to generate the new documentation into the `doc/ng/$(CRATE)` directories. Previews * http://www.contrib.andrew.cmu.edu/~acrichto/doc/std/ * http://www.contrib.andrew.cmu.edu/~acrichto/doc/extra/ Missing features * Different versions of documentation on the same page (all possibly indexed as well?) I think that this needs to be thought out before action is taken. It's an awesome idea, but it should be done carefully. * Source links are missing. This is a little dependent on getting versions working. In theory we should link back to github, but we should always link back to the exact version the documentation was generated from. * Integration with other tools. It would be awesome to have rustpkg-style inference of the package name and version so they don't have to be specified anywhere. Additionally, I should be able to build documentation for a pkgid, not necessarily a crate file. cc @cmr/@Seldaek
Ive also been thinking about an HTML auto-escaping library.... |
This large commit implements and `html` output option for rustdoc_ng. The executable has been altered to be invoked as "rustdoc_ng html <crate>" and it will dump everything into the local "doc" directory. JSON can still be generated by changing 'html' to 'json'. This also fixes a number of bugs in rustdoc_ng relating to comment stripping, along with some other various issues that I found along the way. The `make doc` command has been altered to generate the new documentation into the `doc/ng/$(CRATE)` directories.
This large commit implements and `html` output option for rustdoc_ng. The executable has been altered to be invoked as "rustdoc_ng html <crate>" and it will dump everything into the local "doc" directory. JSON can still be generated by changing 'html' to 'json'. This also fixes a number of bugs in rustdoc_ng relating to comment stripping, along with some other various issues that I found along the way. The `make doc` command has been altered to generate the new documentation into the `doc/ng/$(CRATE)` directories. Previews * http://www.contrib.andrew.cmu.edu/~acrichto/doc/std/ * http://www.contrib.andrew.cmu.edu/~acrichto/doc/extra/ Missing features * Different versions of documentation on the same page (all possibly indexed as well?) I think that this needs to be thought out before action is taken. It's an awesome idea, but it should be done carefully. * Source links are missing. This is a little dependent on getting versions working. In theory we should link back to github, but we should always link back to the exact version the documentation was generated from. * Integration with other tools. It would be awesome to have rustpkg-style inference of the package name and version so they don't have to be specified anywhere. Additionally, I should be able to build documentation for a pkgid, not necessarily a crate file. cc @cmr/@Seldaek
uninit_vec: Vec::spare_capacity_mut is stable Quick documentation fix: `Vec::spare_capacity_mut` no longer needs nightly. changelog: none
This large commit implements and
html
output option for rustdoc_ng. Theexecutable has been altered to be invoked as "rustdoc_ng html " and
it will dump everything into the local "doc" directory. JSON can still be
generated by changing 'html' to 'json'.
This also fixes a number of bugs in rustdoc_ng relating to comment stripping,
along with some other various issues that I found along the way.
The
make doc
command has been altered to generate the new documentation intothe
doc/ng/$(CRATE)
directories.Previews
Missing features
cc @cmr/@Seldaek