-
Notifications
You must be signed in to change notification settings - Fork 900
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
file:// urls for doc incompatible with snap/flatpak/container-based-development #3112
Comments
I am only starting rust today (i tried once few month before )and i saw rustup doc --book is not working... i guess this the implementation of rustup doc, and this helps anyone who wanted to make this feature... or may be i will try in the future.... |
I think a rustup doc serve feature would be nice. |
I am seeing this issue too |
@rbtcollins I would be very happy to take this task on. Any help you would be willing to give / able to give would be highly appreciated 🙂 |
The functional requirement is that rustup should be able to spawn a webserver pointing at the docs, as a new feature complementary to spawning a browser on the file:// url it does today. Theres a lot of room for UX experimentation here:
I don't know whats right; my hunch is that something like the following would work ok:
I think adding a '--serve' option to the existing |
Sounds good! I'll try working on this! 🙂 |
@rustbot claim |
Is this being worked on? I have been using cargo-docs, but it doesn't seem to work on local crates, only the rust book. |
My impression is that it's not being worked on -- I don't see any related open PRs. @HarrisonHemstreet are you still intending to work on it? |
@donottellmetonottellyou |
G'day |
@brettearle we use external crates that are license compatible; we're just about to introduce a pervasive tokio runtime, so I would suggest something async + tokio based. |
G'day, trying to use tokio inside cli/rustup and it's not allowing the import, it's in dependencies in cargo.toml but has flag workspace= true, is there something special to get this use statement to work? Sorry if this is obvious new to production rust |
Hello I just stumbled on this issue in Ubuntu as well. Any motion on the serve feature? |
Nope, it hasn't been a priority for us. If someone wants to help out, that would be great! |
Problem you are trying to solve
There are various issues around confinement and working with containers on Linux where the path of the html docs either ends up wrong or the browser does not have permission to open the html docs.
Solution you'd like
Provide an option to serve the docs as a port like
mdbook serve
( https://rust-lang.github.io/mdBook/cli/serve.html ), maybe likerustup doc --serve
This allows for both confined applications and developing inside a container to then work as they don't need to access the html files via a path, but instead just open
localhost:8080
etc.Notes
This would resolve issues like #3110 #2997 #2988 as there is no issue with confinement on ports.
If this is something this is possible, it would be good for
cargo doc --serve
to also exist as the same problem occurs withcargo doc --open
. And this would then make both rustup and cargo consistent withmdbook serve
which has this ability.The text was updated successfully, but these errors were encountered: