"Code is a design, but MIR is the truth."
A next-generation IDE prototype for visualizing, editing, and executing Rust source code as interactive Visual Semantic Graphs (VSG). Rustのソースコードを、インタラクティブなビジュアル・セマンティック・グラフ (VSG) として視覚化し、編集し、実行するための次世代IDEプロトタイプ。
The editor is designed with a clear separation between two layers that you can seamlessly transition between. UIとシステムを「2つの層」に明確に分割し、それらをシームレスに行き来できる設計を採用しています。
A permissive environment where users can intuitively build logic relying on "Spatial Memory". ユーザーが「空間記憶」を頼りに、直感的にロジックを組むための寛容な環境。
- Spatial Memory Protection: Node coordinates are preserved in
.sidecarfiles. They never move unless you manually "Tidy Up".- 空間記憶の保護: ノードの座標は
.sidecarファイルに保存され、手動の整理 (Tidy Up) をしない限り勝手に動きません。
- 空間記憶の保護: ノードの座標は
- Stable Undo/Redo: Managed via "Logical Operations" rather than text diffs. Logical-to-Physical ID Remapping ensures perfect consistency between nodes and wires even after history operations.
- Stable Undo/Redo: テキスト差分ではなく「論理操作」ベースで管理。Logical-to-Physical ID Remapping により、履歴操作後もノードとワイヤーの整合性が完璧に保たれます。
Overlay the "Cold Truth" as seen by the compiler. コンパイラが見ている「冷徹な真実」をオーバーレイ表示。
- MIR Peek: Structured parsing of
rustcMid-level Intermediate Representation (MIR) to build 1:1 mapping with VSG.- MIR Peek:
rustcの中間表現を構造化パースし、VSGとの 1:1 対応を構築。
- MIR Peek:
- Lifetime Visualization: Visualize lifetimes as "Energy Fields" on the canvas using Metaball rendering.
- Lifetime Visualization: 生存期間をキャンバス上の「エネルギーフィールド(Metaball rendering)」として表現。
# Clone and run (Mac/Linux)
git clone <repo-url>
cd rusteditor
./run.sh
# Windows
run.batNo total code regeneration. We use ra_ap_syntax (CST) to replace only the specific TextRanges that need changes. Your comments, whitespace, and formatting are perfectly preserved.
ソースコードの再生成は一切行いません。ra_ap_syntax (CST) を使用して、変更が必要な 特定のTextRangeのみを置換 します。ユーザーの書いたコメント、空白、フォーマットが完璧に守られます。
Analyzes cargo check errors to provide an experience beyond simple error messages.
cargo check のエラーを解析し、単一のエラー表示を超えた体験を提供します。
- Reason Bubbles: Floating bubbles on nodes explaining compiler reasoning.
- Reason Bubbles: コンパイラの推論理由をノード上に吹き出し表示。
- Borrow Story Mode: Explains complex borrow errors as a step-by-step story ("where it was lent, where it collided").
- Borrow Story モード: 複雑な借用エラーに対し、「どこで貸し出され、どこで衝突したか」を紙芝居形式(Story Steps)で解説します。
- Auto-Suggestions: One-click solutions like inserting
.clone()or limiting scopes based on error codes.- Auto-Suggestions: エラーコードに基づき、
.clone()の挿入やスコープ制限などの解決策をワンクリックで提案。
- Auto-Suggestions: エラーコードに基づき、
Wiring changes are not reflected immediately in the source code but are held as "Pending Changes". A safety design that doesn't break source code until you approve it. 配線変更によるコード編集は即座に反映されず、「Pending Changes」 としてプレビューされます。ユーザーが承認するまでソースコードを破壊しない安全設計です。
| Key | Action |
|---|---|
| Alt (Hold) | Enable X-Ray Mode (Show Ownership/MIR) |
| Cmd + S | Save & Run Compile Check |
| Cmd + K | Command Palette (Tidy Up / Fetch MIR, etc.) |
| Cmd + Z / Shift+Z | Undo / Redo (Maintain ID Consistency) |
| Space | Toggle X-Ray Mode |
- UI:
egui0.31 &egui_dock0.16 - Graph:
slotmap(Generational indices) + ID Remapping Engine - Parsing:
ra_ap_syntax(CST) /nom8.0 (MIR structured parsing) - Async: Tokio-based background worker system
This project is not about "hiding the complexity of Rust". Rather, it's a tool for "loving the spatial rigor of Rust". このプロジェクトは「Rustの難解さを隠す」ためのものではありません。むしろ、**「Rustの厳密さを空間的に愛でる」**ための道具です。
Warning: This project is a prototype in development. It uses
-Zunpretty=mir, so the nightly toolchain is recommended.