Skip to content
This repository has been archived by the owner on May 20, 2020. It is now read-only.

Serve docs directly from rustdoccommand #175

Open
hardvain opened this issue Sep 21, 2017 · 7 comments
Open

Serve docs directly from rustdoccommand #175

hardvain opened this issue Sep 21, 2017 · 7 comments

Comments

@hardvain
Copy link
Contributor

It would be nice to have something like rustdoc servecommand that generates the documentation and also serves the documentation from a local server. Auto reload for changes would be a still more nice to have.

Acceptance Criteria:

  • A command that builds the documentation and also serves it from a locally started server
  • Watch the files for changes and auto reload the documentation on changes (Extremely nice to have)
@steveklabnik
Copy link
Owner

Yup, this is certainly a thing we've thought about, possibly even as the way you look at docs locally.

@mgattozzi
Copy link
Contributor

This is similar to #153 but not exactly the same.

@euclio
Copy link
Contributor

euclio commented Sep 21, 2017

I'm 👎 on requiring a server to view docs locally, but I guess ember requires it?

@steveklabnik
Copy link
Owner

It does not require it. There are some things that are nicer with one, like pretty URLs, but that's a browser/standards issue, not an Ember thing.

@TheDan64
Copy link

I'd be interested in giving this a shot! What's the best way to serve files? Would hyper be too low level?

@steveklabnik
Copy link
Owner

So, this is kinda an open question! Given that it's local, I would argue that the smaller, the better.

There are several "simple file servers" in Rust; I even have one of my own: https://github.com/steveklabnik/simple-server/ I'm not saying mine would be the right choice, but I think whatever is simplest is the best option. We don't need to worry about things like scalability when we're talking about browsing docs locally.

@TheDan64
Copy link

Good point! I'll be sure to check them out. I'm trying out the notify crate for watching directories. My initial foray is here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants