about summary refs log tree commit diff
path: root/src/rt/sync/rust_thread.cpp
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2013-10-02 15:39:32 -0700
committerAlex Crichton <alex@alexcrichton.com>2013-10-02 16:17:08 -0700
commitd06043ba0b4f0ed871e5374aa0d6b37fa170dfc6 (patch)
treec64da86a53e4bb297626125834edbe0f9b8a047f /src/rt/sync/rust_thread.cpp
parentf00d72b78b5fbcc865500184b883f5991e2cf68d (diff)
downloadrust-d06043ba0b4f0ed871e5374aa0d6b37fa170dfc6.tar.gz
rust-d06043ba0b4f0ed871e5374aa0d6b37fa170dfc6.zip
rustdoc: Generate hyperlinks between crates
The general idea of hyperlinking between crates is that it should require as
little configuration as possible, if any at all. In this vein, there are two
separate ways to generate hyperlinks between crates:

1. When you're generating documentation for a crate 'foo' into folder 'doc',
   then if foo's external crate dependencies already have documented in the
   folder 'doc', then hyperlinks will be generated. This will work because all
   documentation is in the same folder, allowing links to work seamlessly both
   on the web and on the local filesystem browser.

   The rationale for this use case is a package with multiple libraries/crates
   that all want to link to one another, and you don't want to have to deal with
   going to the web. In theory this could be extended to have a RUST_PATH-style
   searching situtation, but I'm not sure that it would work seamlessly on the
   web as it does on the local filesystem, so I'm not attempting to explore this
   case in this pull request. I believe to fully realize this potential rustdoc
   would have to be acting as a server instead of a static site generator.

2. One of foo's external dependencies has a #[doc(html_root_url = "...")]
   attribute. This means that all hyperlinks to the dependency will be rooted at
   this url.

   This use case encompasses all packages using libstd/libextra. These two
   crates now have this attribute encoded (currently at the /doc/master url) and
   will be read by anything which has a dependency on libstd/libextra. This
   should also work for arbitrary crates in the wild that have online
   documentation. I don't like how the version is hard-wired into the url, but I
   think that this may be a case-by-case thing which doesn't end up being too
   bad in the long run.

Closes #9539
Diffstat (limited to 'src/rt/sync/rust_thread.cpp')
0 files changed, 0 insertions, 0 deletions