Commit 02a8fdf
committed
feat(geisterhand): #185 Phase D step 1 — live inspector UI at localhost:7676 (v0.5.349)
Land the read-only inspector UI as the foundation for Phase D devtools.
- inspector_ui/index.html: dependency-free single-page vanilla-JS app
embedded via include_str!; left-column tree view from /widgets?tree=true,
right-column per-widget detail (frame, value, raw JSON), 1.5s
auto-refresh with pause/resume, fire-onClick action button.
- server.rs: 3 new route arms (/, /inspector, /index.html) serve
INSPECTOR_HTML with text/html content-type. No new server-side endpoints
needed — read-only view uses the existing /widgets?tree=true,
/value/:h, /click/:h JSON surface.
- codegen.rs: entry-module main() prelude emits perry_geisterhand_start(port)
when needs_geisterhand. The call site has a critical secondary purpose:
pinning the geisterhand server module against macOS lazy-load
-dead_strip. Without it the linker silently eliminates INSPECTOR_HTML
as unreferenced rodata.
Verified end-to-end: `perry compile X.ts -o /tmp/X --enable-geisterhand`
produces a 1.3 MB binary; launching prints `[geisterhand] listening on
http://127.0.0.1:7676`; `curl localhost:7676/` returns the inspector
page (200 OK, text/html); `curl localhost:7676/widgets?tree=true`
returns a JSON array.
Phase D steps 2 (live style edit via POST /style/:h) and 3
(cross-platform screenshot capture) follow as separate PRs.1 parent 0c4333d commit 02a8fdf
6 files changed
Lines changed: 427 additions & 31 deletions
File tree
- crates
- perry-codegen/src
- perry-ui-geisterhand/src
- inspector_ui
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
| 152 | + | |
152 | 153 | | |
153 | 154 | | |
154 | 155 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
| 116 | + | |
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
248 | 256 | | |
249 | 257 | | |
250 | 258 | | |
| |||
615 | 623 | | |
616 | 624 | | |
617 | 625 | | |
| 626 | + | |
| 627 | + | |
618 | 628 | | |
619 | 629 | | |
620 | 630 | | |
| |||
2424 | 2434 | | |
2425 | 2435 | | |
2426 | 2436 | | |
| 2437 | + | |
| 2438 | + | |
| 2439 | + | |
| 2440 | + | |
| 2441 | + | |
| 2442 | + | |
| 2443 | + | |
2427 | 2444 | | |
2428 | 2445 | | |
2429 | 2446 | | |
| |||
2445 | 2462 | | |
2446 | 2463 | | |
2447 | 2464 | | |
| 2465 | + | |
| 2466 | + | |
| 2467 | + | |
| 2468 | + | |
| 2469 | + | |
| 2470 | + | |
| 2471 | + | |
| 2472 | + | |
| 2473 | + | |
| 2474 | + | |
| 2475 | + | |
| 2476 | + | |
| 2477 | + | |
| 2478 | + | |
| 2479 | + | |
| 2480 | + | |
| 2481 | + | |
| 2482 | + | |
| 2483 | + | |
2448 | 2484 | | |
2449 | 2485 | | |
2450 | 2486 | | |
| |||
0 commit comments