Skip to content
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

Feature: A programmatic interface for rustup (for IDEs and other complicated automation-around-rustup) #3434

Open
rami3l opened this issue Aug 13, 2023 · 1 comment
Milestone

Comments

@rami3l
Copy link
Member

rami3l commented Aug 13, 2023

Rustup's stdout content is not an API : we change it regularly to communicate more clearly with users. However programs that consume the output of rustup have no means by which they can extract the semantic content - an API.

This is tied into various internal concerns such as the notification system, logging system, the async unpacking of content (and this will become deeper when when async spreads further inside rustup). See also #1875

Another possible interaction is an idea that is still in concept status / tribal knowledge, of having a (lifetime undefined) daemon, which might help with some of the file replacement concerns on Windows.

The high level sketch of an isolated form of this feature would be:

  • some way to enable programmatic interface for install mode and rustup-mode (but not proxy-mode, at least not today).
  • when in programmatic mode both input from stdin and output to stdout are structured semantic content using some reliable protocol.
  • That is it detects errors including high-bit truncation, content truncation and insertion of unexpected content). Checksummed protobufs or similar might make a viable option.
  • It needs to be something that is viable for IDE tooling (e.g. rust-analyser LSP, but possibly also the JS or Lua IDE glue-code that invokes the LSP); research is needed to understand constraints there.
@rbtcollins rbtcollins changed the title Expose certain rustup functionalities as a library? Feature: A programmatic interface for rustup (for IDEs and other complicated automation-around-rustup) Aug 13, 2023
@rbtcollins
Copy link
Contributor

(I've edited the description to have a less opaque description than my throwaway comment in the other issue).

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

No branches or pull requests

2 participants