Skip to content
panayangPublic

About

Rumbrello (Ruml) - Rust UML Architecture & Structural Modeling Studio

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

8 Commits

Folders and files

Repository files navigation

Rumbrello (Ruml) - Rust UML Architecture & Structural Modeling Studio

Rumbrello is a modern, high-performance UML architecture visualizer, reverse-engineering engine, and interactive structural modeling tool designed specifically for Rust codebases.

It parses Rust source code, resolves type layout semantics, lifetime constraints, and concurrency lock flow, and renders dynamic, interactive UML class diagrams and scope/concurrency sequence diagrams.


🌟 Key Features

1. Multi-Engine Rust Code Extractor

  • Method 1: Fast Syn AST — Lightning-fast AST extractor using syn and quote. Ideal for rapid workspace scans.
  • Method 2: Hybrid RA Macro Expansion — Integrates rust-analyzer syntax parser to expand macro invocations while extracting detailed item ASTs.
  • Method 3: Standalone rust-analyzer LSP — Connects directly to a rust-analyzer LSP instance for full semantic resolution.

2. Advanced Type System & Memory Layout Analysis

  • Auto Traits Inference: Automatically determines Send and Sync implementations.
  • #[repr(...)] Validation: Audits repr(C), repr(transparent), and alignment directives for memory layout correctness.
  • Lifetime Constraint Graphs: Visualizes outlives bounds ('a: 'b), Higher-Rank Trait Bounds (HRTB for<'a>), and borrow relationships.
  • DST & ZST Classification: Identifies Dynamically Sized Types (DST) and Zero-Sized Types (ZST).
  • Atomic & Leak Detection: Highlights AtomicBool/AtomicUsize primitives and memory leaks (Box::leak, mem::forget, ManuallyDrop).

3. Concurrency & Borrow Scope Diagram Views

  • Scope View: Visualizes borrow scopes and variable lifetimes using full paths (crate::module::Struct::fn).
  • Concurrency View: Tracks mutex locks, cross-thread channel channels, and thread sequence flows.

4. Rich Markdown Doc Comment System (///, //!, //)

  • Automatic Sanitizing: Strips raw #[doc = "..."] attribute wrappers and rustdoc control directives (#[doc(hidden)], #[doc(inline)], #[doc(alias = "...")]).
  • Hover Markdown Tooltips: Displays formatted Markdown doc comments on mouse hover over symbol nodes.
  • Left Hierarchy Tree Icons: Badges module doc comments with 📜 //! and symbol docs with 📜 doc in the Workspace Explorer.
  • Inspector Comment Editor: Full support for adding, editing, and deleting Markdown comments at the symbol, field, variant, parameter, and trait bound levels.

5. Smart Exclusion & Default Filtering

  • Automatically excludes test, bench, fuzz, and fuzzing modules upon project import to maintain clean architectural views.

6. Interactive Canvas & Visual Editing

  • Multi-node selection, drag-to-move, and drag-to-resize.
  • Shift-drag / Right-click line connection with glowing target highlights (#2ed573).
  • Editable Existing Relations: Modify relation kinds (Ownership, SharedRef, SmartPointer, etc.) directly in the Inspector.

🏗️ Workspace Architecture

The project is structured as a modular Cargo workspace:

Crate Description
ruml_core Core data models (RIR, Symbols, Relations, DocCommentItem, CommentKind)
ruml_parser Method 1 Syn AST extractor, Scope & Concurrency analyzers, Auto-traits & Repr validators
ruml_ra_parser Method 2 Hybrid RA Macro & Method 3 Standalone RA LSP extractors
ruml_layout Sugiyama layered layout, force-directed graph, grid, and tree layout algorithms
ruml_dsl Ruml DSL parser, Mermaid exporter, and PlantUML exporter
ruml_storage JSON and binary serialization for diagram persistence
ruml_codegen Rust code generation and AST patching engine
ruml_gui egui-based GUI application (Canvas, Inspector, Hierarchy Explorer, Scope/Concurrency views)

🚀 Getting Started

Prerequisites

  • Rust 1.75+ (Edition 2021)
  • Cargo

Running the Application

Launch the desktop GUI:

cargo run --bin ruml_gui

Running Unit & Integration Tests

Run the full workspace test suite:

cargo test --workspace -- --skip test_parse_large_projects_performance

📜 License

MIT OR Apache-2.0

About

Rumbrello (Ruml) - Rust UML Architecture & Structural Modeling Studio

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages