Skip to content

Intern project: Annotated source browser #3485

Closed
@nikomatsakis

Description

@nikomatsakis
Contributor

I was thinking: it'd be very cool to have a tool based on rustc that presented an annotated view of the source code, showing:

  • the inferred types of local variables, expressions;
  • hyperlinks between fn calls and the source text;
  • monomorphized versions of generic fns etc specific to a particular call site

This might also be useful in presenting error messages and so forth.

Seems like it would make a great intern project (we should have a tag for that).

Activity

graydon

graydon commented on May 15, 2013

@graydon
Contributor

Never mind, I'm just stumbling over myself here not understanding the purpose of related repos. Yes, this would be good. Nobody's worked on it yet. Also consider integration with #4064

emberian

emberian commented on Jul 8, 2013

@emberian
Member

I think I'm subsuming this as part of rustdoc2

metajack

metajack commented on Sep 25, 2013

@metajack
Contributor

triage bump. nothing to add.

jdm

jdm commented on Sep 25, 2013

@jdm
Contributor
flaper87

flaper87 commented on Mar 10, 2014

@flaper87
Contributor

triage bump, carry on

UPDATE: rustfind seems really interesting. I looked into it and it has some of the things listed in this issue.

huonw

huonw commented on Mar 10, 2014

@huonw
Member

I believe @nick29581 is (slowly) working on some DXR integration.

thehydroimpulse

thehydroimpulse commented on Mar 28, 2014

@thehydroimpulse
Contributor

Scala has tool that somewhat annotates code https://github.com/harrah/browse which produces code like: http://scalaz.github.io/scalaz/scalaz-2.9.1-6.0.2/doc.sxr/scalaz/Functor.scala.html#39245

Makes it a pleasant experience to be able to roll over different type definitions.

lilyball

lilyball commented on May 23, 2014

@lilyball
Contributor

It would be great if a tool like this could be general enough that e.g. vim could use it to show you the types of variables on demand. But even if it's limited to, say, emitting a web page with all the annotated source, that would still be awesome (I could use a vim command to generate and open the web page).

huonw

huonw commented on May 24, 2014

@huonw
Member

@kballard I believe the code @nick29581 has written in #13222 creates a reasonably generic CSV with a variety of that sort of information.

nrc

nrc commented on May 24, 2014

@nrc
Member

@kballard here is an out of date and poorly hosted index to show what DXR does - http://ncameron.org:8000/rust, hover over a variable of field to see its type. The rustc parts of this just emit raw data in CSV format which could be used by vim or whatever.

nrc

nrc commented on Jan 10, 2015

@nrc
Member

I'm tracking DXR implementation in https://github.com/nick29581/rust-dxr

steveklabnik

steveklabnik commented on Jan 21, 2015

@steveklabnik
Member

I'm pulling a massive triage effort to get us ready for 1.0. As part of this, I'm moving stuff that's wishlist-like to the RFCs repo, as that's where major new things should get discussed/prioritized.

This issue has been moved to the RFCs repo: rust-lang/rfcs#611

added a commit that references this issue on Apr 20, 2024

Auto merge of rust-lang#3485 - RalfJung:read_byte_slice, r=RalfJung

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @lilyball@flaper87@graydon@jdm@steveklabnik

        Issue actions

          Intern project: Annotated source browser · Issue #3485 · rust-lang/rust