A compiler that reads Rails applications in Ruby and emits standalone projects in other languages such as Rust, Go, TypeScript, Elixir, or a native Spinel binary.
AhmadHassan-BTed/OpenHeart
A Rust static analysis engine that builds compact program graphs from source code and generates 19 UML and compiler-IR diagrams from them.
- Stars
- 1,980
- Forks
- 0
- Open issues
- 3
- Last commit
- 3 days ago
What is it?
OpenHeart is a static program analysis engine written in Rust. It parses source code with tree-sitter, runs the code through a 10-phase pipeline, and stores the results as memory-mapped binary artifacts. The core representation is a Succinct Compositional Program Graph, which uses balanced parentheses bitstrings and rank/select indexes instead of pointer-heavy AST nodes to keep memory use low.
From this graph the project derives 19 projections: 14 UML 2.5 diagrams (class, sequence, state machine, use case, deployment and others) plus five compiler IRs, including the control flow graph, data flow graph, control dependence graph, call graph and an ROBDD path summary. Output is available as JSON, PlantUML, Mermaid and XMI.
A web studio runs in the browser on GitHub Pages and can clone and analyze public GitHub repositories without a backend. The same engine can also be run as a CLI or a local HTTP server.
Key features
- 01Builds a compact succinct program graph from source code using tree-sitter parsing.
- 02Generates 14 UML 2.5 diagrams and 5 compiler IR graphs.
- 03Exports diagrams as JSON, PlantUML, Mermaid and XMI.
- 04Runs a browser-based studio that analyzes public GitHub repositories without a backend.
- 05Provides a CLI command for analyzing a local project and a local web server mode.
Use cases
- Reverse-engineering the structure of an unfamiliar codebase into UML diagrams.
- Inspecting control flow, data flow or call graphs during compiler or analysis research.
- Generating PlantUML or Mermaid diagrams from existing code for documentation.
Quick start
- 1
Build the engine
cargo build --release - 2
Analyze a codebase
target/release/openheart analyze ./my_project ./output_dir - 3
Launch the web server and studio
target/release/openheart server 8080
Things to know
- Requires a Rust toolchain (1.75+) to build the engine from source.
- The README does not describe the accuracy of the analysis beyond its own benchmark claims.
Topics
FAQ
- What is OpenHeart?
- A Rust static analysis engine that builds compact program graphs from source code and generates 19 UML and compiler-IR diagrams from them. OpenHeart is a static program analysis engine written in Rust. It parses source code with tree-sitter, runs the code through a 10-phase pipeline, and stores the results as memory-mapped binary artifacts. The core representation is a Succinct Compositional Program Graph, which uses balanced parentheses bitstrings and rank/select indexes instead of pointer-heavy AST nodes to keep memory use low.
- Is OpenHeart free to use? What license does it have?
- OpenHeart is open source under the MIT license. Check the license terms before using it in commercial products.
- Is OpenHeart still maintained?
- Actively maintained. The last commit to OpenHeart was on Oct 17, 2026.
- What can I use OpenHeart for?
- Reverse-engineering the structure of an unfamiliar codebase into UML diagrams. Inspecting control flow, data flow or call graphs during compiler or analysis research. Generating PlantUML or Mermaid diagrams from existing code for documentation.
- How do I install OpenHeart?
- Build the engine: cargo build --release Analyze a codebase: target/release/openheart analyze ./my_project ./output_dir Launch the web server and studio: target/release/openheart server 8080
- Where can I get OpenHeart?
- The source code and installation instructions are on GitHub: https://github.com/AhmadHassan-BTed/OpenHeart
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A local code knowledge graph that gives AI coding tools precise review context over MCP and a CLI.
An incremental parser generator and parsing library that builds concrete syntax trees and updates them as source files are edited.
An experimental Rust port of the TypeScript 7 compiler (tsc), with the same CLI, language server and API, plus built-in Effect diagnostics.
A Rust port of the TypeScript 7 compiler and language server, offered as a drop-in replacement for type checking and emit.
A terminal typing game that turns your own source code, or public GitHub repos, into typing challenges.