visual_compiler
Version, currently main branch1 version
- main branchlatestMar 2, 2026
github.com/kojix2/visual_compiler
No description declared in shard.yml.
0 stars
0 dependents
License: MIT
Installation
# Add this to your shard.yml
dependencies:
visual_compiler:
github: kojix2/visual_compiler
branch: mainmain is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
>= 1.19.1- License
- MIT
- Author
- kojix2
- Target
visual_compilerfrom src/cli.cr
Dependencies
Runtime Dependencies
README
visual_compiler
ローカルで Crystal の入力コードを追跡し、以下を横並びで確認するための Kemal アプリです。
- 左: 入力コード
- 中央: 段階別 AST スナップショット(タブ切替、メタ情報、前段 diff)
- 右: 生成された LLVM IR
- 中央には
Programメタデータ(types,symbols,unions,vars,requiresなど)も表示 - Trace 時の prelude を
nano/preludeで切替可能(既定:nano)
astv.cr を参考にしつつ、MVP として parse -> canonical reparse -> codegen(llvm-ir) の時間軸表示を実装しています。
Setup
shards install
Run
crystal run src/cli.cr
ブラウザで http://127.0.0.1:3000 を開きます。
Notes
- LLVM IR は
crystal build --prelude <選択値> --emit llvm-irを一時ファイルに対して実行して取得します。 nanoは最小 prelude のためputsなど標準 prelude 前提のメソッドは使えません(必要時は UI でpreludeを選択)。- このツールはローカル利用を想定しています(インターネット公開は想定外)。
Programメタデータは内部的にcrystal eval -Di_know_what_im_doing -Dwithout_libxml2を別プロセス実行して取得します。- compiler利用の依存として
nano,markd,replyを追加済みです。
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
main- Seen
- Mar 2, 2026
- Crystal
>= 1.19.1- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/kojix2/visual_compiler
Metadata
- Created
- Aug 12, 2026
- Updated
- Sep 26, 2026
- Synced
- Sep 26, 2026
- Versions
- 1