Feature Request: Build repos from git and add an API to do so
I would like docsrs to be able to build a crate/workspace from a provided git-link and have that ability be exposed through an API of the webserver as well. This would then be similar to /crate/name/version/rebuild but the user of the API would need to provide a git-uri too. This would be awesome to have for development internal documentation where the crate is not yet mature enough to push onto crates.io but one wants to have a nice webpage with the documentation, which has some of the docsrs features that pure rustdoc does not have, e. g., a list of all crate-features, selecting specific architecture versions of the crate etc.
This is nontrivial and also has some security impliciations. Also if you want to account for workspaces, the complexity gets much higher.
Depending on how often you need this, you could just use prereleases. When using semver to (for example) find the latest release, we skip over prereleases.
We can cross out the workspaces for now. I wouldn't be opposed to working on it myself. Although, I am curious what security implications this would have because I wouldn't imagine the feature be enabled on docs.rs itself.
We can cross out the workspaces for now.
For your use-case, perhaps, as docs.rs? Probably not.
Although, I am curious what security implications this would have
I'm not 100% certain myself. Generally this would mean we have code running that didn't go through the cargo & crates.io publish process & checks. If not security, then we might have breakages because we might expect only crates that were converted by cargo & crates.io, and allowing the pull from git bypasses that.
I wouldn't imagine the feature be enabled on docs.rs itself.
Re-reading your description I now understand you are using docs.rs internally and wouldn't see this feature in the official deployment.
I wouldn't be opposed to working on it myself.
that's good to hear! but let's talk it through before you waste time. Btw, even when you provide the initial PR, there is a maintenance burden of this feature, and currently I'm the only person continously working on docs.rs.
generally about this feature
from a UI perspective this only only make sense if you would add the git hash or similar to the version dropdowns? Or have some global "dev" version that you can update via git? I don't think it would make sense differently.
I feel that to get working properly (even optionally) would be quite intrusive to the current UI / features, and I would worry that we then also have to test / maintain this, for one user.
Generally with the current capacity in the team, and the current TODOs to keep up with the ecosystem, I don't see us supporting private deployments with custom features.
So, except when there are more potential users, I'm leaning to not adding this.
I feel like this use-case is probably better solved with one of the private registry providers (kellnr, shipyard).
( happy to discuss everything of course)