Rustdoc (CommonMark): variables?

In documenting my crate I sometimes need a linked ref (url) to someplace in my crate hierarchy. I can only do this with a relative url (which changes when either source or target destinations change). Is there a way in Rustdoc (CommonMark) to use a variable that points to the root of the crate? Thanks.

How about intra rustdoc links?

I've read rfcs/ at master · rust-lang/rfcs · GitHub, the corresponding tracking issue ( and the CommonMark specs (CommonMark Spec). Yet, I haven't been able to find a mechanism that allows me to refer to the crate's root in a general URI (i.e. one referring to a general resource, such as an image rather than code).

I don't think there is something like that if the intra rustdoc link feature doesn't cover your use case.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.