Skip to content

Redesign the libsyntax and librustc APIs to make them more amenable to tooling #643

Closed

Description

@steveklabnik

Issue by bstrie
Tuesday Oct 08, 2013 at 13:34 GMT

For earlier discussion, see rust-lang/rust#9769

This issue was labelled with: A-tools, P-low in the Rust repository


http://www.reddit.com/r/programming/comments/1nxs2i/the_state_of_rust_08/ccn50ti

I hope they can also innovate in the area of code navigation and code completion as well. It's not perfect in the C++ IDE world, and if you use something like Emacs of Vim it's even worse.

With the work in Rustdoc, and integration with LLVM, and the fact that Rust is orders of magnitude easier to parse than C++, IDE support shouldn't be a problem. What does need to be implemented is incremental compilation.

To get properly useful semantic code completion, libsyntax and librustc would need to be dramatically overhauled to get partial parsing working and to make it easier/possible to extract information like "what's the type of this variable" and "what methods can I call on this [mutable] variable."

There's long been sentiment that the APIs provided by libsyntax and librustc are kinda okay for tooling, but not great.

For another anecdote, this past weekend at MozSummit someone asked whether it would be possible to add Rust support to DXR (http://dxr.mozilla.org/), to which Graydon replied that it would be difficult (relative to clang, at least).

This is obviously sort of a nebulous "figure out the API" bug, but it's important enough that we'll have to start thinking about it sometime. Without a good tooling story, we won't be able to compete with C++.

Activity

  1. added
    T-dev-toolsRelevant to the development tools team, which will review and decide on the RFC.
    on May 18, 2015
  2. added
    T-compilerRelevant to the compiler team, which will review and decide on the RFC.
    on Jan 30, 2018
  3. Centril commented on Oct 7, 2018

    @Centril
    Contributor

    Closing in favor of #643.

  4. glaebhoerl commented on Oct 8, 2018

    @glaebhoerl
    Contributor

    @Centril This is #643 :)

    (I think only 3 or so instances of this bug across over a hundred issues closed is a pretty good rate, don't worry about it:)

  5. Centril commented on Oct 8, 2018

    @Centril
    Contributor

    @glaebhoerl Apparently I needed a lot of sleep yesterday... :D

    The proper link is #2256 ;)

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

    T-compilerRelevant to the compiler team, which will review and decide on the RFC.T-dev-toolsRelevant to the development tools team, which will review and decide on the RFC.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions