Skip to content

Conversation

rithulkamesh
Copy link
Member

Borrowed from Java, Implemented the following:

Core components:

  1. Basic Symbol Structure
  • Track modules, functions, types and traits
  • Handle Rust visibility modifiers
  • Support generics and lifetimes
  • Track attributes and documentation
  • Support module hierarchy and crates
  1. Type System
  • Handle structs, enums, unions and traits
  • Support type parameters and bounds
  • Track implementations and trait bounds
  • Handle associated types
  1. Function Analysis
  • Track parameters and return types
  • Support async, const and extern functions
  • Handle generics and where clauses
  • Track call sites and dependencies
  1. Safety Analysis
  • Classify functions as safe/unsafe/FFI
  • Track unsafe blocks and their reasons
  • Add safety statistics for crates
  • Split module functions into safe/unsafe collections
  • Track raw pointer usage and FFI interactions

@rithulkamesh rithulkamesh requested a review from rahlk January 11, 2025 15:46
@rithulkamesh rithulkamesh self-assigned this Jan 11, 2025
Signed-off-by: Rithul Kamesh <[email protected]>
Add RustGenericParam, RustLifetimeParam, RustParameter, RustCallSite, and
RustVariableDeclaration classes to complete the type hierarchy. These model
generic types, lifetimes, parameters, call sites and variable declarations
for comprehensive Rust code analysis.

Signed-off-by: Rithul Kamesh <[email protected]>
Add comprehensive models to represent Rust code structures:

- Add RustStruct with support for normal, tuple, and unit structs
- Add RustStructField for struct field definitions
- Add core Rust types (enums, traits, impls, macros)
- Enhance RustModule to support all new type definitions

Signed-off-by: Rithul Kamesh <[email protected]>
@rahlk rahlk added the kind/feature New feature(s) label Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature New feature(s)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants