Add Rust language frontend leveraging Rust Analyzer internals for parsing and inference#2560
Draft
konradweiss wants to merge 85 commits into
Draft
Add Rust language frontend leveraging Rust Analyzer internals for parsing and inference#2560konradweiss wants to merge 85 commits into
konradweiss wants to merge 85 commits into
Conversation
…h structs that are prohibited if there are cycles in the structural definition
… Unfortunately necessary workaround
…ng name delimiter
… sequence and unwrapping them when adding declarations
…es in general references used in calls etc.
… import nodes, but whether the impacted calls invoke the right target
…ment EOG for deconstruction
…s eog and dfg during unwrapping
…pg into feature/language-rust
…for cf structures
…pg into feature/language-rust
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements a Rust language frontend by leveraging the rust-analyzer internals for parsing and analysis. The AST is generated in Rust and sent over UniFFI bindings to the Kotlin handling code. In Kotlin, the rust-analyzer AST is translated into the CPG internal AST, types are assigned, and the pass system builds additional edges to represent semantic information about the code.
This work is still in progress and does not yet cover all language constructs and functionality. For example, types are parsed but type inference is currently not applied. Further improvements and missing features will be addressed in subsequent updates.
All
pub structfrom rust analyzer, for feature coverage tracking (updating this list is in progress):Needed support for parser nodes:
Nodes for additional coverage: