diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-18 22:03:14 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-18 22:23:51 -0300 |
| commit | 99f5b10eccd95aa0066ea6fe6bb75f367ab56a47 (patch) | |
| tree | 813596ea84318a7bae4fd7416ba463de8e3b7107 | |
| parent | 92d553123673376adf6126ab90d49a22c5b833d2 (diff) | |
| download | pardes-99f5b10eccd95aa0066ea6fe6bb75f367ab56a47.tar.gz pardes-99f5b10eccd95aa0066ea6fe6bb75f367ab56a47.zip | |
core: src/ becomes core/, pardes.zig its root.zig (the reorganisation's tree, step 2d), and every mention of a src/ path follows: the build's paths, the core's imports of its root, the tests that read the repository's files by path (lspbench's, look.zig's spans over core/look.zig), the comments that cite files, the documents and the manual (the typst corpus reads core/tutor.txt and core/plumbing); left as they were: the /src tree's served names (src/pardes.zig and the rest are the 9P tree's, not the repository's), the CHANGELOG's history, fixtures that are only strings; fs-unit-test runs from the core's root (a module of the core rooted at fs.zig had the runtime's and the devices' `core` be fs.zig); nothing else changes: the ledger (pardes.test.* now root.test.*), frames byte-identical, replicas and process-test the base's
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
| -rw-r--r-- | .agents/skills/pardes/SKILL.md | 2 | ||||
| -rw-r--r-- | abi/pardes.h | 6 | ||||
| -rw-r--r-- | abi/pardes_addon.h | 2 | ||||
| -rw-r--r-- | abi/plain.zig | 2 | ||||
| -rw-r--r-- | abi/term.zig | 6 | ||||
| -rw-r--r-- | abi/wire.zig | 18 | ||||
| -rw-r--r-- | addons/fake/fake.c | 2 | ||||
| -rw-r--r-- | addons/snake/snake.zig | 2 | ||||
| -rw-r--r-- | build.zig | 4 | ||||
| -rw-r--r-- | build.zig.zon | 2 | ||||
| -rw-r--r-- | build/core.zig | 40 | ||||
| -rw-r--r-- | build/docs.zig | 2 | ||||
| -rw-r--r-- | build/library.zig | 6 | ||||
| -rw-r--r-- | build/patches.zig | 2 | ||||
| -rw-r--r-- | build/tests.zig | 19 | ||||
| -rw-r--r-- | build/tools.zig | 4 | ||||
| -rw-r--r-- | core/Addon.zig (renamed from src/Addon.zig) | 2 | ||||
| -rw-r--r-- | core/CHANGELOG.md (renamed from src/CHANGELOG.md) | 0 | ||||
| -rw-r--r-- | core/Core.zig (renamed from src/Core.zig) | 14 | ||||
| -rw-r--r-- | core/Db.zig (renamed from src/Db.zig) | 2 | ||||
| -rw-r--r-- | core/Dir.zig (renamed from src/Dir.zig) | 2 | ||||
| -rw-r--r-- | core/Editor.zig (renamed from src/Editor.zig) | 2 | ||||
| -rw-r--r-- | core/Effect.zig (renamed from src/Effect.zig) | 2 | ||||
| -rw-r--r-- | core/Event.zig (renamed from src/Event.zig) | 0 | ||||
| -rw-r--r-- | core/File.zig (renamed from src/File.zig) | 14 | ||||
| -rw-r--r-- | core/FrameStats.zig (renamed from src/FrameStats.zig) | 4 | ||||
| -rw-r--r-- | core/Handover.zig (renamed from src/Handover.zig) | 4 | ||||
| -rw-r--r-- | core/Jump.zig (renamed from src/Jump.zig) | 2 | ||||
| -rw-r--r-- | core/Kind.zig (renamed from src/Kind.zig) | 4 | ||||
| -rw-r--r-- | core/Layer.zig (renamed from src/Layer.zig) | 2 | ||||
| -rw-r--r-- | core/Macro.zig (renamed from src/Macro.zig) | 2 | ||||
| -rw-r--r-- | core/Messages.zig (renamed from src/Messages.zig) | 10 | ||||
| -rw-r--r-- | core/Names.zig (renamed from src/Names.zig) | 2 | ||||
| -rw-r--r-- | core/Output.zig (renamed from src/Output.zig) | 2 | ||||
| -rw-r--r-- | core/Pipe.zig (renamed from src/Pipe.zig) | 6 | ||||
| -rw-r--r-- | core/Places.zig (renamed from src/Places.zig) | 6 | ||||
| -rw-r--r-- | core/Plumb.zig (renamed from src/Plumb.zig) | 6 | ||||
| -rw-r--r-- | core/Query.zig (renamed from src/Query.zig) | 2 | ||||
| -rw-r--r-- | core/Registers.zig (renamed from src/Registers.zig) | 2 | ||||
| -rw-r--r-- | core/Store.zig (renamed from src/Store.zig) | 2 | ||||
| -rw-r--r-- | core/Stream.zig (renamed from src/Stream.zig) | 4 | ||||
| -rw-r--r-- | core/Tables.zig (renamed from src/Tables.zig) | 4 | ||||
| -rw-r--r-- | core/Term.zig (renamed from src/Term.zig) | 14 | ||||
| -rw-r--r-- | core/Text.zig (renamed from src/Text.zig) | 2 | ||||
| -rw-r--r-- | core/Turn.zig (renamed from src/Turn.zig) | 2 | ||||
| -rw-r--r-- | core/ansi.zig (renamed from src/ansi.zig) | 2 | ||||
| -rw-r--r-- | core/body_layer.zig (renamed from src/body_layer.zig) | 2 | ||||
| -rw-r--r-- | core/builtins.zig (renamed from src/builtins.zig) | 4 | ||||
| -rw-r--r-- | core/builtins_json.zig (renamed from src/builtins_json.zig) | 2 | ||||
| -rw-r--r-- | core/c_heap.zig (renamed from src/c_heap.zig) | 0 | ||||
| -rw-r--r-- | core/colors.zig (renamed from src/colors.zig) | 4 | ||||
| -rw-r--r-- | core/config.zig (renamed from src/config.zig) | 4 | ||||
| -rw-r--r-- | core/diff.zig (renamed from src/diff.zig) | 0 | ||||
| -rw-r--r-- | core/draw.zig (renamed from src/draw.zig) | 2 | ||||
| -rw-r--r-- | core/dump.zig (renamed from src/dump.zig) | 8 | ||||
| -rw-r--r-- | core/echo.zig (renamed from src/echo.zig) | 2 | ||||
| -rw-r--r-- | core/edit.zig (renamed from src/edit.zig) | 2 | ||||
| -rw-r--r-- | core/edit_cmd.zig (renamed from src/edit_cmd.zig) | 4 | ||||
| -rw-r--r-- | core/exec.zig (renamed from src/exec.zig) | 2 | ||||
| -rw-r--r-- | core/fs-help.txt (renamed from src/fs-help.txt) | 0 | ||||
| -rw-r--r-- | core/fs.zig (renamed from src/fs.zig) | 14 | ||||
| -rw-r--r-- | core/grammar_manifest.zig (renamed from src/grammar_manifest.zig) | 0 | ||||
| -rw-r--r-- | core/hunks.zig (renamed from src/hunks.zig) | 4 | ||||
| -rw-r--r-- | core/indent.zig (renamed from src/indent.zig) | 0 | ||||
| -rw-r--r-- | core/keys.zig (renamed from src/keys.zig) | 2 | ||||
| -rw-r--r-- | core/layout.zig (renamed from src/layout.zig) | 2 | ||||
| -rw-r--r-- | core/lib_editor.zig (renamed from src/lib_editor.zig) | 2 | ||||
| -rw-r--r-- | core/lib_syntax.zig (renamed from src/lib_syntax.zig) | 0 | ||||
| -rw-r--r-- | core/locations.zig (renamed from src/locations.zig) | 6 | ||||
| -rw-r--r-- | core/look.zig (renamed from src/look.zig) | 32 | ||||
| -rw-r--r-- | core/lsp/Ask.zig (renamed from src/lsp/Ask.zig) | 2 | ||||
| -rw-r--r-- | core/lsp/lsp.zig (renamed from src/lsp/lsp.zig) | 0 | ||||
| -rw-r--r-- | core/memory.zig (renamed from src/memory.zig) | 4 | ||||
| -rw-r--r-- | core/mini.zig (renamed from src/mini.zig) | 2 | ||||
| -rw-r--r-- | core/modal.zig (renamed from src/modal.zig) | 0 | ||||
| -rw-r--r-- | core/mouse.zig (renamed from src/mouse.zig) | 2 | ||||
| -rw-r--r-- | core/ninep/addr.zig (renamed from src/ninep/addr.zig) | 0 | ||||
| -rw-r--r-- | core/ninep/cols.zig (renamed from src/ninep/cols.zig) | 2 | ||||
| -rw-r--r-- | core/ninep/ctl.zig (renamed from src/ninep/ctl.zig) | 2 | ||||
| -rw-r--r-- | core/ninep/events.zig (renamed from src/ninep/events.zig) | 2 | ||||
| -rw-r--r-- | core/ninep/pane.zig (renamed from src/ninep/pane.zig) | 2 | ||||
| -rw-r--r-- | core/ninep/pty.zig (renamed from src/ninep/pty.zig) | 2 | ||||
| -rw-r--r-- | core/ninep/screen.zig (renamed from src/ninep/screen.zig) | 2 | ||||
| -rw-r--r-- | core/ninep/sources.zig (renamed from src/ninep/sources.zig) | 2 | ||||
| -rw-r--r-- | core/ninep/testing.zig (renamed from src/ninep/testing.zig) | 2 | ||||
| -rw-r--r-- | core/ninep/tree.zig (renamed from src/ninep/tree.zig) | 8 | ||||
| -rw-r--r-- | core/normal.zig (renamed from src/normal.zig) | 2 | ||||
| -rw-r--r-- | core/panes.zig (renamed from src/panes.zig) | 8 | ||||
| -rw-r--r-- | core/plumbing (renamed from src/plumbing) | 0 | ||||
| -rw-r--r-- | core/recent.zig (renamed from src/recent.zig) | 0 | ||||
| -rw-r--r-- | core/regexp.zig (renamed from src/regexp.zig) | 4 | ||||
| -rw-r--r-- | core/replica.zig (renamed from src/replica.zig) | 20 | ||||
| -rw-r--r-- | core/rollback.zig (renamed from src/rollback.zig) | 6 | ||||
| -rw-r--r-- | core/root.zig (renamed from src/pardes.zig) | 2 | ||||
| -rw-r--r-- | core/sam_edit.zig (renamed from src/sam_edit.zig) | 4 | ||||
| -rw-r--r-- | core/selection_pipe.zig (renamed from src/selection_pipe.zig) | 4 | ||||
| -rw-r--r-- | core/surface.zig (renamed from src/surface.zig) | 4 | ||||
| -rw-r--r-- | core/syntax.zig (renamed from src/syntax.zig) | 4 | ||||
| -rw-r--r-- | core/tagline.zig (renamed from src/tagline.zig) | 2 | ||||
| -rw-r--r-- | core/tape.zig (renamed from src/tape.zig) | 20 | ||||
| -rw-r--r-- | core/term/TerminalImages.zig (renamed from src/term/TerminalImages.zig) | 0 | ||||
| -rw-r--r-- | core/term/pager.zig (renamed from src/term/pager.zig) | 0 | ||||
| -rw-r--r-- | core/term/screen_state.zig (renamed from src/term/screen_state.zig) | 4 | ||||
| -rw-r--r-- | core/term/term.zig (renamed from src/term/term.zig) | 4 | ||||
| -rw-r--r-- | core/term/terminal.zig (renamed from src/term/terminal.zig) | 14 | ||||
| -rw-r--r-- | core/themes/acme.zig (renamed from src/themes/acme.zig) | 0 | ||||
| -rw-r--r-- | core/themes/alucard.zig (renamed from src/themes/alucard.zig) | 0 | ||||
| -rw-r--r-- | core/themes/atelier.zig (renamed from src/themes/atelier.zig) | 0 | ||||
| -rw-r--r-- | core/themes/ayu_dark.zig (renamed from src/themes/ayu_dark.zig) | 0 | ||||
| -rw-r--r-- | core/themes/ayu_light.zig (renamed from src/themes/ayu_light.zig) | 0 | ||||
| -rw-r--r-- | core/themes/ayu_mirage.zig (renamed from src/themes/ayu_mirage.zig) | 0 | ||||
| -rw-r--r-- | core/themes/catppuccin_frappe.zig (renamed from src/themes/catppuccin_frappe.zig) | 0 | ||||
| -rw-r--r-- | core/themes/catppuccin_latte.zig (renamed from src/themes/catppuccin_latte.zig) | 0 | ||||
| -rw-r--r-- | core/themes/catppuccin_macchiato.zig (renamed from src/themes/catppuccin_macchiato.zig) | 0 | ||||
| -rw-r--r-- | core/themes/catppuccin_mocha.zig (renamed from src/themes/catppuccin_mocha.zig) | 0 | ||||
| -rw-r--r-- | core/themes/clay.zig (renamed from src/themes/clay.zig) | 0 | ||||
| -rw-r--r-- | core/themes/dark.zig (renamed from src/themes/dark.zig) | 0 | ||||
| -rw-r--r-- | core/themes/dark_plus.zig (renamed from src/themes/dark_plus.zig) | 0 | ||||
| -rw-r--r-- | core/themes/daybreak.zig (renamed from src/themes/daybreak.zig) | 0 | ||||
| -rw-r--r-- | core/themes/doom_one.zig (renamed from src/themes/doom_one.zig) | 0 | ||||
| -rw-r--r-- | core/themes/doom_one_light.zig (renamed from src/themes/doom_one_light.zig) | 0 | ||||
| -rw-r--r-- | core/themes/dracula.zig (renamed from src/themes/dracula.zig) | 0 | ||||
| -rw-r--r-- | core/themes/dracula_soft.zig (renamed from src/themes/dracula_soft.zig) | 0 | ||||
| -rw-r--r-- | core/themes/duckbones.zig (renamed from src/themes/duckbones.zig) | 0 | ||||
| -rw-r--r-- | core/themes/dusk.zig (renamed from src/themes/dusk.zig) | 0 | ||||
| -rw-r--r-- | core/themes/forestbones_dark.zig (renamed from src/themes/forestbones_dark.zig) | 0 | ||||
| -rw-r--r-- | core/themes/forestbones_light.zig (renamed from src/themes/forestbones_light.zig) | 0 | ||||
| -rw-r--r-- | core/themes/forge.zig (renamed from src/themes/forge.zig) | 0 | ||||
| -rw-r--r-- | core/themes/forge_black.zig (renamed from src/themes/forge_black.zig) | 0 | ||||
| -rw-r--r-- | core/themes/forge_soft.zig (renamed from src/themes/forge_soft.zig) | 0 | ||||
| -rw-r--r-- | core/themes/harvest.zig (renamed from src/themes/harvest.zig) | 0 | ||||
| -rw-r--r-- | core/themes/helix.zig (renamed from src/themes/helix.zig) | 0 | ||||
| -rw-r--r-- | core/themes/ink.zig (renamed from src/themes/ink.zig) | 0 | ||||
| -rw-r--r-- | core/themes/kanagawabones.zig (renamed from src/themes/kanagawabones.zig) | 0 | ||||
| -rw-r--r-- | core/themes/lagoon.zig (renamed from src/themes/lagoon.zig) | 0 | ||||
| -rw-r--r-- | core/themes/lapis.zig (renamed from src/themes/lapis.zig) | 0 | ||||
| -rw-r--r-- | core/themes/monokai.zig (renamed from src/themes/monokai.zig) | 0 | ||||
| -rw-r--r-- | core/themes/monokai_pro.zig (renamed from src/themes/monokai_pro.zig) | 0 | ||||
| -rw-r--r-- | core/themes/monokai_pro_classic.zig (renamed from src/themes/monokai_pro_classic.zig) | 0 | ||||
| -rw-r--r-- | core/themes/monokai_pro_light.zig (renamed from src/themes/monokai_pro_light.zig) | 0 | ||||
| -rw-r--r-- | core/themes/monokai_pro_light_sun.zig (renamed from src/themes/monokai_pro_light_sun.zig) | 0 | ||||
| -rw-r--r-- | core/themes/monokai_pro_machine.zig (renamed from src/themes/monokai_pro_machine.zig) | 0 | ||||
| -rw-r--r-- | core/themes/monokai_pro_octagon.zig (renamed from src/themes/monokai_pro_octagon.zig) | 0 | ||||
| -rw-r--r-- | core/themes/monokai_pro_ristretto.zig (renamed from src/themes/monokai_pro_ristretto.zig) | 0 | ||||
| -rw-r--r-- | core/themes/monokai_pro_spectrum.zig (renamed from src/themes/monokai_pro_spectrum.zig) | 0 | ||||
| -rw-r--r-- | core/themes/neobones_dark.zig (renamed from src/themes/neobones_dark.zig) | 0 | ||||
| -rw-r--r-- | core/themes/neobones_light.zig (renamed from src/themes/neobones_light.zig) | 0 | ||||
| -rw-r--r-- | core/themes/nord.zig (renamed from src/themes/nord.zig) | 0 | ||||
| -rw-r--r-- | core/themes/nordbones.zig (renamed from src/themes/nordbones.zig) | 0 | ||||
| -rw-r--r-- | core/themes/orchard.zig (renamed from src/themes/orchard.zig) | 0 | ||||
| -rw-r--r-- | core/themes/orchard_black.zig (renamed from src/themes/orchard_black.zig) | 0 | ||||
| -rw-r--r-- | core/themes/paper.zig (renamed from src/themes/paper.zig) | 0 | ||||
| -rw-r--r-- | core/themes/rose_pine.zig (renamed from src/themes/rose_pine.zig) | 0 | ||||
| -rw-r--r-- | core/themes/rose_pine_dawn.zig (renamed from src/themes/rose_pine_dawn.zig) | 0 | ||||
| -rw-r--r-- | core/themes/rose_pine_moon.zig (renamed from src/themes/rose_pine_moon.zig) | 0 | ||||
| -rw-r--r-- | core/themes/rosebones_dark.zig (renamed from src/themes/rosebones_dark.zig) | 0 | ||||
| -rw-r--r-- | core/themes/rosebones_light.zig (renamed from src/themes/rosebones_light.zig) | 0 | ||||
| -rw-r--r-- | core/themes/seoul256.zig (renamed from src/themes/seoul256.zig) | 0 | ||||
| -rw-r--r-- | core/themes/seoulbones_dark.zig (renamed from src/themes/seoulbones_dark.zig) | 0 | ||||
| -rw-r--r-- | core/themes/seoulbones_light.zig (renamed from src/themes/seoulbones_light.zig) | 0 | ||||
| -rw-r--r-- | core/themes/solarium.zig (renamed from src/themes/solarium.zig) | 0 | ||||
| -rw-r--r-- | core/themes/solarized_dark.zig (renamed from src/themes/solarized_dark.zig) | 0 | ||||
| -rw-r--r-- | core/themes/solarized_light.zig (renamed from src/themes/solarized_light.zig) | 0 | ||||
| -rw-r--r-- | core/themes/spectrum.zig (renamed from src/themes/spectrum.zig) | 0 | ||||
| -rw-r--r-- | core/themes/tokyobones_dark.zig (renamed from src/themes/tokyobones_dark.zig) | 0 | ||||
| -rw-r--r-- | core/themes/tokyobones_light.zig (renamed from src/themes/tokyobones_light.zig) | 0 | ||||
| -rw-r--r-- | core/themes/tokyonight_day.zig (renamed from src/themes/tokyonight_day.zig) | 0 | ||||
| -rw-r--r-- | core/themes/tokyonight_moon.zig (renamed from src/themes/tokyonight_moon.zig) | 0 | ||||
| -rw-r--r-- | core/themes/tokyonight_night.zig (renamed from src/themes/tokyonight_night.zig) | 0 | ||||
| -rw-r--r-- | core/themes/tokyonight_storm.zig (renamed from src/themes/tokyonight_storm.zig) | 0 | ||||
| -rw-r--r-- | core/themes/vimbones.zig (renamed from src/themes/vimbones.zig) | 0 | ||||
| -rw-r--r-- | core/themes/zenbones_dark.zig (renamed from src/themes/zenbones_dark.zig) | 0 | ||||
| -rw-r--r-- | core/themes/zenbones_light.zig (renamed from src/themes/zenbones_light.zig) | 0 | ||||
| -rw-r--r-- | core/themes/zenburned.zig (renamed from src/themes/zenburned.zig) | 0 | ||||
| -rw-r--r-- | core/themes/zenwritten_dark.zig (renamed from src/themes/zenwritten_dark.zig) | 0 | ||||
| -rw-r--r-- | core/themes/zenwritten_light.zig (renamed from src/themes/zenwritten_light.zig) | 0 | ||||
| -rw-r--r-- | core/tracy.zig (renamed from src/tracy.zig) | 0 | ||||
| -rw-r--r-- | core/tree_sitter_heap.h (renamed from src/tree_sitter_heap.h) | 0 | ||||
| -rw-r--r-- | core/tutor.txt (renamed from src/tutor.txt) | 0 | ||||
| -rw-r--r-- | core/views.zig (renamed from src/views.zig) | 2 | ||||
| -rw-r--r-- | core/walk.zig (renamed from src/walk.zig) | 6 | ||||
| -rw-r--r-- | dev/gui/gui.zig | 4 | ||||
| -rw-r--r-- | dev/macos/Info.plist | 2 | ||||
| -rw-r--r-- | dev/macos/Sources/AppDelegate.swift | 4 | ||||
| -rw-r--r-- | dev/macos/Sources/PardesView.swift | 8 | ||||
| -rw-r--r-- | dev/tui/tui.zig | 6 | ||||
| -rw-r--r-- | docs/diff-pager-proposals.md | 4 | ||||
| -rw-r--r-- | docs/ghostty-macos-notes.md | 6 | ||||
| -rw-r--r-- | docs/helix-keys.md | 28 | ||||
| -rw-r--r-- | docs/lsp-evaluation.md | 12 | ||||
| -rw-r--r-- | docs/macos.md | 44 | ||||
| -rw-r--r-- | docs/next-daemon.md | 72 | ||||
| -rw-r--r-- | docs/next-drag.md | 2 | ||||
| -rw-r--r-- | docs/next-editor.md | 4 | ||||
| -rw-r--r-- | docs/next-plumber.md | 20 | ||||
| -rw-r--r-- | docs/next-run.md | 4 | ||||
| -rw-r--r-- | docs/next-searchrows.md | 4 | ||||
| -rw-r--r-- | docs/next-store.md | 2 | ||||
| -rw-r--r-- | docs/next-terminal.md | 24 | ||||
| -rw-r--r-- | docs/next-tests.md | 10 | ||||
| -rw-r--r-- | docs/search-proto-converge.md | 20 | ||||
| -rw-r--r-- | docs/selections.md | 2 | ||||
| -rw-r--r-- | docs/shared-libs.md | 4 | ||||
| -rw-r--r-- | docs/typ/README | 8 | ||||
| -rw-r--r-- | docs/typ/book.typ | 2 | ||||
| -rw-r--r-- | docs/typ/building.typ | 40 | ||||
| -rw-r--r-- | docs/typ/guide.typ | 4 | ||||
| -rw-r--r-- | docs/typ/reference.typ | 24 | ||||
| -rw-r--r-- | docs/typ/running.typ | 2 | ||||
| -rw-r--r-- | docs/typ/style.typ | 12 | ||||
| -rw-r--r-- | features.txt | 4 | ||||
| -rw-r--r-- | runtime/9p.zig | 4 | ||||
| -rw-r--r-- | runtime/daemon.zig | 2 | ||||
| -rw-r--r-- | runtime/main.zig | 4 | ||||
| -rw-r--r-- | test/behaviour/addons.zig | 2 | ||||
| -rw-r--r-- | test/behaviour/language_servers.zig | 2 | ||||
| -rw-r--r-- | test/daemon.py | 2 | ||||
| -rw-r--r-- | test/deck/replay.zig | 2 | ||||
| -rw-r--r-- | test/e2e_harness.zig | 2 | ||||
| -rw-r--r-- | test/hxdiff.zig | 4 | ||||
| -rw-r--r-- | test/hxlib.zig | 2 | ||||
| -rw-r--r-- | test/kitty.zig | 2 | ||||
| -rw-r--r-- | test/kitty_client.zig | 2 | ||||
| -rw-r--r-- | test/lspbench.zig | 32 | ||||
| -rw-r--r-- | test/macos_e2e.swift | 2 | ||||
| -rw-r--r-- | test/monkey9p.zig | 2 | ||||
| -rw-r--r-- | test/process.zig | 2 | ||||
| -rw-r--r-- | test/process/tty_boot.zig | 2 | ||||
| -rw-r--r-- | test/record_demos.py | 6 | ||||
| -rw-r--r-- | test/replicas.zig | 12 | ||||
| -rw-r--r-- | test/rollback_bench.zig | 6 | ||||
| -rw-r--r-- | test/session.zig | 6 | ||||
| -rw-r--r-- | test/terminal.zig | 4 | ||||
| -rw-r--r-- | test/tty.zig | 2 | ||||
| -rw-r--r-- | tools/demos/jumps.txt | 2 | ||||
| -rw-r--r-- | tools/gen_themes.zig | 8 | ||||
| -rw-r--r-- | tools/shared_libs_check.zig | 2 | ||||
| -rw-r--r-- | vendor/queries/README.md | 2 | ||||
| -rw-r--r-- | vendor/queries/rust/indents.scm | 2 |
239 files changed, 494 insertions, 493 deletions
diff --git a/.agents/skills/pardes/SKILL.md b/.agents/skills/pardes/SKILL.md index 6e2f2eff..c9fb39ff 100644 --- a/.agents/skills/pardes/SKILL.md +++ b/.agents/skills/pardes/SKILL.md @@ -118,7 +118,7 @@ pardes --detach=work & # a session with no screen; --attach=work shows it These act on the user's session: do them when asked. Anything more (read panes, run commands, react to clicks) is the pardes-9p skill. Config is `~/.config/pardes/init`, a builtin a line; keys are compiled in -(`src/config.zig`). `$NINE_MOUNT/agents`, where present, is cloud9's +(`core/config.zig`). `$NINE_MOUNT/agents`, where present, is cloud9's read-only view of running coding agents. ## The book diff --git a/abi/pardes.h b/abi/pardes.h index c4470569..65ca5c60 100644 --- a/abi/pardes.h +++ b/abi/pardes.h @@ -1,7 +1,7 @@ // libpardes — the C ABI the macOS app links against. // // Hand-written, and kept honest by a test: build.zig translate-C's this file -// into the unit-test build, and src/macos.zig asserts every constant and +// into the unit-test build, and runtime/macos.zig asserts every constant and // struct layout below against the Zig side (ghostty's trick — see docs/macos.md). // Change nothing here without running `zig build unit-test -Dplatform=macos`. // @@ -27,7 +27,7 @@ extern "C" { // ---------------------------------------------------------------- frame -// One rendered cell. Mirrors pardes.Cell (src/pardes.zig) flattened for the +// One rendered cell. Mirrors pardes.Cell (core/root.zig) flattened for the // wire. typedef struct { // UTF-8 grapheme, `len` bytes. The core caps graphemes at seven bytes; the @@ -322,7 +322,7 @@ uint32_t pardes_topbar_pane_border_rgb(void); // Rows the global topbar occupies, and therefore the row index of the FIRST // pane tagline — the one the rule above joins the topbar band to. Mirrors -// pardes.TOPBAR_H, and src/macos.zig asserts the two agree. +// pardes.TOPBAR_H, and runtime/macos.zig asserts the two agree. #define PARDES_TOPBAR_H 1u // The active pane's tag row background, for hosts that afford the active diff --git a/abi/pardes_addon.h b/abi/pardes_addon.h index 11dcec38..2f5c53de 100644 --- a/abi/pardes_addon.h +++ b/abi/pardes_addon.h @@ -25,7 +25,7 @@ * its head's minor, an addon pardes's by api->size. * * addons/fake/fake.c implements every function; it is the template. In - * Zig, src/kinds/addon.zig makes the pa_ops from a struct, and + * Zig, abi/addon.zig makes the pa_ops from a struct, and * addons/snake/snake.zig is a game in it. */ #ifndef PARDES_ADDON_H diff --git a/abi/plain.zig b/abi/plain.zig index 6ca96fe9..c250de03 100644 --- a/abi/plain.zig +++ b/abi/plain.zig @@ -2,7 +2,7 @@ //! (docs/next-terminal.md, Phase 1): a frame's cells, their styles and //! colours, the pictures over them and a key read. Data that needs //! nothing else, in a module of its own: the core (surface.zig and -//! Event.zig, under their old names) and the terminal (src/term/) both +//! Event.zig, under their old names) and the terminal (core/term/) both //! import it, and neither imports the other. const std = @import("std"); /// The terminal as the core sees it: its entries and the records they diff --git a/abi/term.zig b/abi/term.zig index de969796..de32a575 100644 --- a/abi/term.zig +++ b/abi/term.zig @@ -2,8 +2,8 @@ //! entries (`Ops`) a terminal module gives the core, and the records they //! take and give. A terminal's state, its replicas' encoder and tracks are //! handles the core holds and never looks into; what it knows of them it is -//! told here, as numbers, bytes, text and cells. src/term/term.zig is the -//! one implementation (ghostty-vt behind it); src/Term.zig is the core's +//! told here, as numbers, bytes, text and cells. core/term/term.zig is the +//! one implementation (ghostty-vt behind it); core/Term.zig is the core's //! side of it. const std = @import("std"); const plain = @import("plain.zig"); @@ -282,7 +282,7 @@ pub const Peer = struct { pub const Applied = struct { seq: u32, extra: []const u8 }; /// What the dump keeps of a terminal beside its emulator, by name as every -/// dump is (src/walk.zig, through the core's `Term.State`). +/// dump is (core/walk.zig, through the core's `Term.State`). pub const Parts = struct { reply: []const u8 = "", reply_dropped: u32 = 0, diff --git a/abi/wire.zig b/abi/wire.zig index d6098325..cf3daf2e 100644 --- a/abi/wire.zig +++ b/abi/wire.zig @@ -16,9 +16,9 @@ const config = @import("pardes_config"); /// 22: a PDF's pixel scroll (0x1a) is gone with the core's PDF, the pdf /// addon's panes scrolled by the wheel as any kind's are; /// 21: a session's views are `Pardes.views` in its dump and its digest -/// (src/views.zig), the panes' shares of the others under `shares`; +/// (core/views.zig), the panes' shares of the others under `shares`; /// 20: a digest takes a blob of 4 KiB and up (a file's text, a register's, -/// an undo entry's bytes) by its length, not its bytes (src/walk.zig): a +/// an undo entry's bytes) by its length, not its bytes (core/walk.zig): a /// text's revision says what it holds; /// 19: a client joining again names the view it had in its hello, and a /// bye says whether it joins again for it (views.away); @@ -90,7 +90,7 @@ pub const ClientTag = enum(u8) { hello = 0x01, bye = 0x02, ping = 0x03, - /// A replica's word about a terminal's state (src/term/screen_state.zig): the + /// A replica's word about a terminal's state (core/term/screen_state.zig): the /// delta it holds, or rows it asks for. Opaque here. screen_ack = 0x04, /// What is the session's digest, in stream order (a replica checks @@ -103,7 +103,7 @@ pub const ClientTag = enum(u8) { want = 0x07, /// The session's clocks (realtime and monotonic, ns) as the client /// guessed them for the input that follows: its time, which the step - /// reads (src/replica.zig). + /// reads (core/replica.zig). stamp = 0x08, key = 0x10, @@ -166,26 +166,26 @@ pub const ServerTag = enum(u8) { refused = 0x02, /// A ping's value back. pong = 0x03, - /// A piece of the join's dump (src/dump.zig): the welcome says how long + /// A piece of the join's dump (core/dump.zig): the welcome says how long /// it is whole. dump = 0x04, - /// A unit of the authority's stream (src/replica.zig): its origin, seq, + /// A unit of the authority's stream (core/replica.zig): its origin, seq, /// clocks and tape. unit = 0x05, - /// A terminal's delta, or rows asked for (src/term/screen_state.zig), applied + /// A terminal's delta, or rows asked for (core/term/screen_state.zig), applied /// before the next unit. Opaque here. screen = 0x06, /// The session's digest (u64le), after every unit before it. check = 0x07, /// Part of the join's list of blobs, to a far client: each one's place - /// in the state, its length and its BLAKE3 hash (src/replica.zig). + /// in the state, its length and its BLAKE3 hash (core/replica.zig). blobs = 0x08, /// A piece of a far client's stream from here on, zstd-compressed: the /// messages in it are framed as these are. Opaque here. zstd = 0x09, /// A piece of a record's bytes by hash (tape.zig `Big`), before the /// unit naming it: the hash, the whole's length and this piece's place - /// (u64le each), then at most 1 MiB of it (src/replica.zig). + /// (u64le each), then at most 1 MiB of it (core/replica.zig). blob = 0x0a, }; diff --git a/addons/fake/fake.c b/addons/fake/fake.c index 648dcace..b3f6b288 100644 --- a/addons/fake/fake.c +++ b/addons/fake/fake.c @@ -2,7 +2,7 @@ * lines, and what the loader's tests drive (test/behaviour/addons.zig, * `pardes --addon-test`). * - * cc -shared -fPIC -I src/kinds -o fake.so addons/fake/fake.c + * cc -shared -fPIC -I abi -o fake.so addons/fake/fake.c * * A pane of it counts: keys and clicks and ticks and words each add to a * count it paints, dumps and answers `where` with; `:N` sets it. It paints diff --git a/addons/snake/snake.zig b/addons/snake/snake.zig index 5d1e06db..ef2283ac 100644 --- a/addons/snake/snake.zig +++ b/addons/snake/snake.zig @@ -1,4 +1,4 @@ -//! snake.zig: a snake game as a pardes addon, over src/kinds/addon.zig +//! snake.zig: a snake game as a pardes addon, over abi/addon.zig //! (`zig build addon-test` builds it as snake.so and runs snake.script). //! h j k l steer; once dead, any key starts again. It steps only while its //! pane has the keyboard, and asks for nothing otherwise. @@ -181,14 +181,14 @@ pub fn build(b: *std.Build) void { const root_mod = root_set.root; // hxdiff's headless core and pardes-isolate are the primary shell's // configuration compiled two more ways, not two more frontends. - const core_cfg: core.Core = .{ .root = "src/pardes.zig", .config = opts, .builtin_addons = compiled_in, .tracy = true }; + const core_cfg: core.Core = .{ .root = "core/root.zig", .config = opts, .builtin_addons = compiled_in, .tracy = true }; const core_set = core.module(b, parts, core_cfg); const core_module = core_set.root; // The core without the terminal module (docs/next-terminal.md, Phase 1): // what core-test is compiled from. No ghostty-vt, wuffs, zstbi or C++; // a shell boot is a scratch pane, a test that needs a terminal skips, // and shell-test runs them all with one. - const lean_cfg: core.Core = .{ .root = "src/pardes.zig", .config = opts, .builtin_addons = compiled_in, .terminal = false }; + const lean_cfg: core.Core = .{ .root = "core/root.zig", .config = opts, .builtin_addons = compiled_in, .terminal = false }; const core_lean = core.module(b, parts, lean_cfg); const isolated_mod: ?*std.Build.Module = if (platform == .tui) core.module(b, parts, .{ .root = "runtime/main.zig", .config = opts, .builtin_addons = compiled_in, .isolated = true }).root else null; // `zig build static`'s: the addons compiled in (Addon.zig). Linked diff --git a/build.zig.zon b/build.zig.zon index 2804add7..b893f330 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -239,7 +239,7 @@ .hash = "N-V-__8AAG02ugUcWec-Ndp-i7JTsJ0dgF8nnJRUInkGLG7G", .lazy = true, }, - // zstd for a far replica client's stream (src/replica.zig): the + // zstd for a far replica client's stream (core/replica.zig): the // upstream release tarball, its lib/ compiled by build.zig. .zstd = .{ .url = "https://github.com/facebook/zstd/releases/download/v1.5.7/zstd-1.5.7.tar.gz", diff --git a/build/core.zig b/build/core.zig index 26de1669..974d5c7e 100644 --- a/build/core.zig +++ b/build/core.zig @@ -1,7 +1,7 @@ const std = @import("std"); const Platform = @import("../build.zig").Platform; const TreeSitterGrammars = @import("../build.zig").TreeSitterGrammars; -const grammar_manifest = @import("../src/grammar_manifest.zig"); +const grammar_manifest = @import("../core/grammar_manifest.zig"); const addons = @import("addons.zig"); const patches = @import("patches.zig"); /// The package manifest, imported UNTYPED on purpose — see the `version` @@ -16,7 +16,7 @@ else /// Every dependency the manifest pins, by its content hash: a grammar, /// ghostty or the Unicode tables steps a core differently, so they are part -/// of a replica's semantics hash (src/wire.zig `semantics`). +/// of a replica's semantics hash (abi/wire.zig `semantics`). const deps_text = blk: { var text: []const u8 = ""; for (@typeInfo(@TypeOf(zon.dependencies)).@"struct".field_names) |name| { @@ -71,8 +71,8 @@ pub const ShellConfig = struct { /// `Build` word's, stamped with the commit (see `stamp_commit`). change: ?[]const u8 = null, built: ?[]const u8 = null, - /// The library's editor (src/lib_editor.zig): a text with no pane, so - /// the core is not compiled (src/Editor.zig). + /// The library's editor (core/lib_editor.zig): a text with no pane, so + /// the core is not compiled (core/Editor.zig). lib: bool = false, }; @@ -189,7 +189,7 @@ pub fn treeSitter(b: *std.Build, io: std.Io, target: std.Build.ResolvedTarget, c // Every allocation a grammar's external scanner makes goes to the // runtime's allocator, which syntax.zig points at a Zig one: // TREE_SITTER_REUSE_ALLOCATOR for the scanners that use - // ts_malloc, and src/tree_sitter_heap.h for the ones that call + // ts_malloc, and core/tree_sitter_heap.h for the ones that call // malloc themselves. const ts_cflags = [_][]const u8{ "-fno-sanitize=function", @@ -197,7 +197,7 @@ pub fn treeSitter(b: *std.Build, io: std.Io, target: std.Build.ResolvedTarget, c // From the compiler's working directory, the root // package's: pardes's own, or the one that depends on it. "-include", - b.root.joinString(b.allocator, "src/tree_sitter_heap.h") catch @panic("OOM"), + b.root.joinString(b.allocator, "core/tree_sitter_heap.h") catch @panic("OOM"), }; lib.root_module.addCSourceFile(.{ .file = dep.path(g.src ++ "/parser.c"), .flags = &ts_cflags }); if (g.scanner) lib.root_module.addCSourceFile(.{ .file = dep.path(g.src ++ "/scanner.c"), .flags = &ts_cflags }); @@ -227,7 +227,7 @@ pub fn uucodeModule(b: *std.Build, target: std.Build.ResolvedTarget, optimize: s }) catch return null).module("uucode"); } -/// The editor as a library (src/lib_editor.zig, docs/next-editor.md): the +/// The editor as a library (core/lib_editor.zig, docs/next-editor.md): the /// text pane's own code built with `lib`, so no pane and no core, over /// tree-sitter, uucode and mvzr, with pardes-syntax in it as `.syntax`. /// `library` exports it to a package that asks; hxdiff runs its cases on it. @@ -243,7 +243,7 @@ pub fn editorModule(b: *std.Build, name: ?[]const u8, target: std.Build.Resolved const options: std.Build.Module.CreateOptions = .{ .target = target, .optimize = optimize, - .root_source_file = b.path("src/lib_editor.zig"), + .root_source_file = b.path("core/lib_editor.zig"), .link_libc = true, }; const m = if (name) |n| b.addModule(n, options) else b.createModule(options); @@ -254,7 +254,7 @@ pub fn editorModule(b: *std.Build, name: ?[]const u8, target: std.Build.Resolved m.addImport("generated_themes", d.themes); d.ts.wire(m); m.addImport("mvzr", d.mvzr); - m.addImport("c_heap", b.createModule(.{ .target = target, .optimize = optimize, .root_source_file = b.path("src/c_heap.zig") })); + m.addImport("c_heap", b.createModule(.{ .target = target, .optimize = optimize, .root_source_file = b.path("core/c_heap.zig") })); m.addImport("vaxis", d.vaxis); m.addImport("uucode", d.uucode); return m; @@ -299,7 +299,7 @@ pub const Parts = struct { /// Which core: its root and the few ways the products differ. pub const Core = struct { /// runtime/main.zig for a shell (runtime/macos.zig for the macOS - /// library), src/pardes.zig for the core, runtime/root.zig for the + /// library), core/root.zig for the core, runtime/root.zig for the /// runtime, or a core file whose tests run on the core's imports. root: []const u8, /// The shell's options (`pardes_config`): this build's, or the window's @@ -335,7 +335,7 @@ pub const Modules = struct { /// and link named here and nowhere else. pub fn module(b: *std.Build, p: Parts, c: Core) Modules { const in_runtime = std.mem.startsWith(u8, c.root, "runtime/"); - const m = b.createModule(.{ .target = p.target, .optimize = p.optimize, .root_source_file = b.path(if (in_runtime) "src/pardes.zig" else c.root), .link_libc = true }); + const m = b.createModule(.{ .target = p.target, .optimize = p.optimize, .root_source_file = b.path(if (in_runtime) "core/root.zig" else c.root), .link_libc = true }); // forkpty: in libc proper on glibc>=2.34 and darwin; the BSDs keep it in libutil if (c.util and (p.target.result.os.tag == .freebsd or p.target.result.os.tag == .netbsd or p.target.result.os.tag == .openbsd)) m.linkSystemLibrary("util", .{}); @@ -409,7 +409,7 @@ pub const Assembly = struct { /// The shell's options (`pardes_config`), and the window's in the bare build. opts: *std.Build.Step.Options, gui_opts: ?*std.Build.Step.Options, - /// What an addon in Zig imports (src/kinds/addon.zig). + /// What an addon in Zig imports (abi/addon.zig). addon_mod: *std.Build.Module, pdf: addons.Pdf, image_addon: *std.Build.Step.Compile, @@ -484,7 +484,7 @@ pub fn assemble(b: *std.Build, c: struct { const c_heap_mod = b.createModule(.{ .target = target, .optimize = optimize, - .root_source_file = b.path("src/c_heap.zig"), + .root_source_file = b.path("core/c_heap.zig"), }); // MuPDF and FreeType, lazy (build.zig's `pdf` option has why). @@ -499,10 +499,10 @@ pub fn assemble(b: *std.Build, c: struct { }) catch null else null; const freetype = if (freetype_dep) |d| d.artifact("freetype") else null; - // The kinds' C ABI (src/kinds/pardes_addon.h), translated once: the core's + // The kinds' C ABI (abi/pardes_addon.h), translated once: the core's // records are the header's, never a mirror of it. const kind_mod = b.addTranslateC(.{ .root_source_file = b.path("abi/pardes_addon.h"), .target = target, .optimize = optimize }).createModule(); - // ...and what an addon in Zig imports over it (src/kinds/addon.zig). + // ...and what an addon in Zig imports over it (abi/addon.zig). const addon_mod = b.createModule(.{ .root_source_file = b.path("abi/addon.zig"), .target = target, .optimize = optimize, .imports = &.{.{ .name = "pardes_addon", .module = kind_mod }} }); const pdf_built = addons.pdf(b, .{ .addon_mod = addon_mod, @@ -551,7 +551,7 @@ pub fn assemble(b: *std.Build, c: struct { patches.zstbi(b, patch, zstbi_dep, zstbi_mod); // One zstd (docs/shared-libs.md): a far replica's stream, compressed by - // its session and read by its client (src/replica.zig). The library's + // its session and read by its client (core/replica.zig). The library's // compressor and decompressor alone, single-threaded and without its // x86 assembly, each context made with ZSTD_customMem over c_heap; of // its block compressors only those of levels 3 (dfast) and 6 (lazy), @@ -588,16 +588,16 @@ pub fn assemble(b: *std.Build, c: struct { break :zstd lib; }; - // xitdb keeps what pardes writes to disk (src/Db.zig): pure Zig, no C + // xitdb keeps what pardes writes to disk (core/Db.zig): pure Zig, no C // library and no allocator hook of its own (it takes Zig allocators). const xitdb_mod = b.dependency("xitdb", .{ .target = target, .optimize = optimize }).module("xitdb"); const image_addon = addons.image(b, target, c_optimize, addon_mod, zstbi_dep); - // The records the core and the terminal both name (src/plain/plain.zig). + // The records the core and the terminal both name (abi/plain.zig). const plain_mod = b.createModule(.{ .root_source_file = b.path("abi/plain.zig"), .target = target, .optimize = optimize }); - // The terminal, a module of its own (src/term/term.zig): the emulator and + // The terminal, a module of its own (core/term/term.zig): the emulator and // what it brings are its, and every core but core-test's is given it. - const term_mod = b.createModule(.{ .root_source_file = b.path("src/term/term.zig"), .target = target, .optimize = optimize, .link_libc = true }); + const term_mod = b.createModule(.{ .root_source_file = b.path("core/term/term.zig"), .target = target, .optimize = optimize, .link_libc = true }); term_mod.addImport("plain", plain_mod); if (ghostty_vt_for_tests) |x| term_mod.addImport("ghostty-vt", x); if (wuffs_mod) |x| term_mod.addImport("wuffs", x); diff --git a/build/docs.zig b/build/docs.zig index b698da02..e6cd9e72 100644 --- a/build/docs.zig +++ b/build/docs.zig @@ -40,7 +40,7 @@ pub fn add(b: *std.Build) [3]*std.Build.Step.Run { } /// docs/typ/builtins-<platform>.json: every builtin, from the registry and the Help -/// rows (src/builtins_json.zig), rewritten in the source tree so a plain +/// rows (core/builtins_json.zig), rewritten in the source tree so a plain /// `typst compile` reads it too; a unit test fails when it is stale. /// A terminal build writes builtins-tui.json and a window build /// builtins-gui.json; style.typ merges the two into one glossary. diff --git a/build/library.zig b/build/library.zig index 049b4323..ebfd8596 100644 --- a/build/library.zig +++ b/build/library.zig @@ -4,7 +4,7 @@ const core = @import("core.zig"); const patches = @import("patches.zig"); /// pardes as a library, all a package that depends on it is given: the -/// `pardes-syntax` module (src/lib_syntax.zig), the grammars, highlighting +/// `pardes-syntax` module (core/lib_syntax.zig), the grammars, highlighting /// and themes for a program that draws source text itself. It takes /// tree-sitter and the grammars of its `tree-sitter` option and no other /// dependency, so nothing else is fetched (build.zig.zon). test/lib is such @@ -19,7 +19,7 @@ pub fn build(b: *std.Build) void { const mod = b.addModule("pardes-syntax", .{ .target = target, .optimize = optimize, - .root_source_file = b.path("src/lib_syntax.zig"), + .root_source_file = b.path("core/lib_syntax.zig"), .link_libc = true, }); // A library's options: its grammars, nothing stamped, no window. @@ -29,7 +29,7 @@ pub fn build(b: *std.Build) void { const themes = core.generatedThemes(b, io, target, optimize); mod.addImport("generated_themes", themes); ts.wire(mod); - mod.addImport("c_heap", b.createModule(.{ .target = target, .optimize = optimize, .root_source_file = b.path("src/c_heap.zig") })); + mod.addImport("c_heap", b.createModule(.{ .target = target, .optimize = optimize, .root_source_file = b.path("core/c_heap.zig") })); // The editor, `pardes-editor`, to a package that asks for it: uucode, // mvzr and vaxis (with what its build names) are fetched then and only // then. Of vaxis it takes the grapheme width, which uucode alone feeds. diff --git a/build/patches.zig b/build/patches.zig index b6b6b86d..5e120345 100644 --- a/build/patches.zig +++ b/build/patches.zig @@ -258,7 +258,7 @@ pub fn ghosttyKitty(b: *std.Build, patch: *std.Build.Step.Compile, dep: *std.Bui /// no bound on its work (its own test "do not make this test any /// longer": `a?` n times is 2^n steps), so each entry to matchPattern, /// which its backtracking recurses through, spends a step, and with none -/// left the match fails and says so (src/regexp.zig). +/// left the match fails and says so (core/regexp.zig). /// - A group's greedy match never gave back to what follows the group: on /// `aab`, `(a+)ab` missed where `a+ab` matched. hasAlt counts the group's /// own `)` as an alternative, so every group with pattern after it takes diff --git a/build/tests.zig b/build/tests.zig index 0eaf7c63..fe9e1355 100644 --- a/build/tests.zig +++ b/build/tests.zig @@ -74,9 +74,9 @@ pub fn add(b: *std.Build, c: struct { core_test_step.dependOn(&run_core_test.step); if (core_match) |check| check.addArtifactArg(core_test); } - // The terminal module's own tests (src/term/): the emulator without a core. + // The terminal module's own tests (core/term/): the emulator without a core. const run_term_test = units.add(b, b.addTest(.{ .root_module = c.parts.term, .filters = c.test_filters }), null); - b.step("term-test", "run the terminal module's own tests (src/term/)").dependOn(&run_term_test.step); + b.step("term-test", "run the terminal module's own tests (core/term/)").dependOn(&run_term_test.step); // test/terminal.zig reads the emulator behind a core's terminal. const pane_tests = units.root(b, "test/panes.zig", true, &.{ .{ .name = "pardes", .module = c.core_module }, .{ .name = "term", .module = c.parts.term }, .{ .name = "plain", .module = c.parts.plain } }); if (c.ghostty_vt_for_tests) |x| pane_tests.root_module.addImport("ghostty-vt", x); @@ -193,13 +193,14 @@ pub fn add(b: *std.Build, c: struct { // pty and the shell's output, is the kitty-harness step. _ = units.add(b, units.root(b, "test/kitty.zig", true, &.{.{ .name = "pardes", .module = c.core_module }}), b.step("kitty-test", "run the kitty graphics conformance cases for terminal panes")); - // 9p_io.zig's and fs.zig's tests as roots of their own, on the - // core's imports and C libraries: native transport integration - // stays reachable even when Zig's filter leaves the core's - // anonymous test-import block out. + // 9p_io.zig's and fs.zig's tests on the core's imports and C + // libraries: native transport integration stays reachable even when + // Zig's filter leaves the core's anonymous test-import block out. Each + // from its module's root (runtime/root.zig, core/root.zig): the + // modules name each other by module, whose `core` is the core's root. for ([_]struct { path: []const u8, step: []const u8, about: []const u8, filters: []const []const u8 }{ .{ .path = "runtime/root.zig", .step = "9p-io-test", .about = "run native 9P transport and client integration tests", .filters = &.{ "Unix and TCP", "one fetch", "expired sessions", "posts itself" } }, - .{ .path = "src/fs.zig", .step = "fs-unit-test", .about = "run filesystem unit tests", .filters = c.test_filters }, + .{ .path = "core/root.zig", .step = "fs-unit-test", .about = "run filesystem unit tests", .filters = c.test_filters }, }) |t| { var cfg = c.core_cfg; cfg.root = t.path; @@ -214,9 +215,9 @@ pub fn add(b: *std.Build, c: struct { protocol_step.dependOn(&units.add(b, protocol_tests, null).step); if (testMatch(b, c.unit_profile, c.test_filters, protocol_step)) |check| check.addArtifactArg(protocol_tests); _ = units.add(b, units.root(b, "dev/fonts.zig", true, cloud9), null); - _ = units.add(b, units.root(b, "src/c_heap.zig", false, cloud9), null); + _ = units.add(b, units.root(b, "core/c_heap.zig", false, cloud9), null); // Its lookup goes wrong only where the optimizer folds it. - _ = units.add(b, b.addTest(.{ .root_module = b.createModule(.{ .target = c.target, .optimize = .safe, .root_source_file = b.path("src/c_heap.zig"), .link_libc = false, .imports = cloud9 }), .filters = c.test_filters }), null); + _ = units.add(b, b.addTest(.{ .root_module = b.createModule(.{ .target = c.target, .optimize = .safe, .root_source_file = b.path("core/c_heap.zig"), .link_libc = false, .imports = cloud9 }), .filters = c.test_filters }), null); _ = units.add(b, units.root(b, "test/deck/replay.zig", null, &.{.{ .name = "deck", .module = b.createModule(.{ .target = c.target, .optimize = c.optimize, .root_source_file = b.path("dev/gui/deck.zig") }) }}), null); diff --git a/build/tools.zig b/build/tools.zig index c6f25e6d..1343fef9 100644 --- a/build/tools.zig +++ b/build/tools.zig @@ -107,7 +107,7 @@ pub fn add(b: *std.Build, c: struct { const hxdiff_step = b.step("hxdiff", "compare Helix results (-- --strict cases reference [waivers]; cases alone emits; --parity: a pty pane against a file pane)"); hxdiff_step.dependOn(&run_hxdiff.step); - // The same cases on the library (src/lib_editor.zig): test/hxlib.zig + // The same cases on the library (core/lib_editor.zig): test/hxlib.zig // types them into an editor value and prints its results, which // hxdiff holds against helix's goldens, or with `-- --parity` // against the file pane, so the library cannot drift from either. @@ -235,7 +235,7 @@ pub fn add(b: *std.Build, c: struct { // The syntax module's own tests and snapshots, on the core without // a terminal: its tests reach the editor's modes (modal.zig). var syntax_cfg = c.lean; - syntax_cfg.root = "src/syntax.zig"; + syntax_cfg.root = "core/syntax.zig"; const syntax_module = core.module(b, c.parts, syntax_cfg).root; const syntax_runner = program(b, "pardes-syntax", "test/syntax.zig", c.target, c.optimize, &.{.{ .name = "syntax", .module = syntax_module }}); const run_syntax = b.addRunArtifact(syntax_runner); diff --git a/src/Addon.zig b/core/Addon.zig index 3dd48944..5c3f84e2 100644 --- a/src/Addon.zig +++ b/core/Addon.zig @@ -20,7 +20,7 @@ const std = @import("std"); const Kind = @import("Kind.zig"); const dump = @import("dump.zig"); -const pardes = @import("pardes.zig"); +const pardes = @import("root.zig"); const tape = @import("tape.zig"); const Pardes = pardes.Pardes; diff --git a/src/CHANGELOG.md b/core/CHANGELOG.md index 5fcfd378..5fcfd378 100644 --- a/src/CHANGELOG.md +++ b/core/CHANGELOG.md diff --git a/src/Core.zig b/core/Core.zig index ffc60360..39d09f21 100644 --- a/src/Core.zig +++ b/core/Core.zig @@ -7,7 +7,7 @@ //! Effect.zig, lsp/Ask.zig, colors.zig), a few called from everywhere kept //! here as declaration aliases. const std = @import("std"); -const pardes = @import("pardes.zig"); +const pardes = @import("root.zig"); const BOX_H = pardes.BOX_H; const Builtin = pardes.Builtin; const COLBAR_H = pardes.COLBAR_H; @@ -369,7 +369,7 @@ restore_req: ?[]const u8 = null, restore_buf: [1024]u8 = @splat(0), surface: Surface = .{}, -/// A replica's predicted echo (src/term/echo.zig), drawn over its terminals: +/// A replica's predicted echo (core/term/echo.zig), drawn over its terminals: /// presentation, its own, in no digest and no rollback copy. Null on a /// session's own core. echo: ?*pardes.Echo = null, @@ -384,7 +384,7 @@ views_away: u8 = 0, /// Each open view (`views_open`); a closed one is null. views: [Views.max]?View = @splat(null), /// The views no frontend here draws: a replica client's, which its own -/// process draws (src/replica.zig). A pump skips them. +/// process draws (core/replica.zig). A pump skips them. undrawn: u8 = 0, /// The Ctrl key into a terminal's tty mode and out (`--tty-toggle`): the /// session's, taken from its options when it is made, so a dump carries @@ -402,7 +402,7 @@ shell_rows: pardes.edit.RowsCache = .{}, /// (ansi.DiffOutput). diff_output: pardes.ansi.DiffOutput = .{}, -/// What the replay digest leaves out (src/walk.zig): what drawing +/// What the replay digest leaves out (core/walk.zig): what drawing /// keeps, what is recomputed, and what only the session that performs /// effects has. pub const replica = .{ @@ -676,7 +676,7 @@ pub fn recentGpa(_: *const Pardes) std.mem.Allocator { /// Recent read from the state file once at start: a new session's. pub fn loadRecent(p: *Pardes) void { // A replica's Recent is its own, in memory: the recording session's - // state file is every session's of its user (src/tape.zig). + // state file is every session's of its user (core/tape.zig). if (tape.replaying()) p.db.kind = .off; p.db.readRecent(p); } @@ -1508,7 +1508,7 @@ pub fn settle(p: *Pardes) void { turn.bump(&turn.epoch); } -/// A replica client's input settled on the authority (src/replica.zig): +/// A replica client's input settled on the authority (core/replica.zig): /// a pump that waits on nothing, reads no clock and draws nothing, so /// the client's own core can apply the same at once and expect the /// authority's tape of it to read the same. The session's own pump @@ -2120,7 +2120,7 @@ pub const PendingWrite = struct { bytes: []u8, off: usize = 0 }; pub const Column = struct { // Zeroed, not undefined: a digest takes the whole of it, a release // build's heap leaves its unused slots whatever was there before, and - // two replicas must agree on them (src/replica.zig). + // two replicas must agree on them (core/replica.zig). panes: [MAX_PANES]usize = @splat(0), n: usize = 0, weight: u64 = column_weight_unit, diff --git a/src/Db.zig b/core/Db.zig index 5cea5be9..e8d606ec 100644 --- a/src/Db.zig +++ b/core/Db.zig @@ -24,7 +24,7 @@ const Db = @This(); const std = @import("std"); const xitdb = @import("xitdb"); -const pardes = @import("pardes.zig"); +const pardes = @import("root.zig"); const recent = @import("recent.zig"); const Pardes = pardes.Pardes; diff --git a/src/Dir.zig b/core/Dir.zig index 337a09be..0f99e497 100644 --- a/src/Dir.zig +++ b/core/Dir.zig @@ -6,7 +6,7 @@ //! reads it again. Otherwise it is a text pane like +Errors (Output's //! `.dir`): searched, selected and edited as any, and never dirty. const std = @import("std"); -const pardes = @import("pardes.zig"); +const pardes = @import("root.zig"); const panes = @import("panes.zig"); const config = @import("config.zig"); const layout = @import("layout.zig"); diff --git a/src/Editor.zig b/core/Editor.zig index b7c7057d..5b1fc6e2 100644 --- a/src/Editor.zig +++ b/core/Editor.zig @@ -3,7 +3,7 @@ //! key across the ranges, the text an edit made that nothing kept, and the //! core the text's pane is in. Gathered for each call from where pardes //! keeps them (`Pardes.editor`); the library gathers it from the value a -//! sketch stores (src/lib_editor.zig). Nothing here is kept between calls. +//! sketch stores (core/lib_editor.zig). Nothing here is kept between calls. const std = @import("std"); const Registers = @import("Registers.zig"); diff --git a/src/Effect.zig b/core/Effect.zig index 420bb8e3..da6e1f7d 100644 --- a/src/Effect.zig +++ b/core/Effect.zig @@ -3,7 +3,7 @@ //! which hands one to the host, or to the in-process fallback a host //! without that method has. const std = @import("std"); -const pardes = @import("pardes.zig"); +const pardes = @import("root.zig"); const tape = @import("tape.zig"); const panes = @import("panes.zig"); const ctlfs = @import("ninep/tree.zig"); diff --git a/src/Event.zig b/core/Event.zig index faea73cc..faea73cc 100644 --- a/src/Event.zig +++ b/core/Event.zig diff --git a/src/File.zig b/core/File.zig index d049fc27..2e5a8306 100644 --- a/src/File.zig +++ b/core/File.zig @@ -4,7 +4,7 @@ const panes = @import("panes.zig"); const std = @import("std"); const vaxis = @import("vaxis"); const builtin = @import("builtin"); -const pardes = @import("pardes.zig"); +const pardes = @import("root.zig"); const config = @import("config.zig"); const Pardes = pardes.Pardes; const Surface = pardes.Surface; @@ -79,19 +79,19 @@ pub const ContextCache = struct { /// A file pane's backing: owned content, its derived caches, and undo history. pub const State = struct { - /// What the replay digest leaves out (src/walk.zig): what is made again + /// What the replay digest leaves out (core/walk.zig): what is made again /// from the text whenever it is wanted. // Syntax caches must not load through the dump loader's core allocator. pub const replica = .{ .derived = .{ "cap", "line_starts", "line_cap", "highlights", "highlight_start", "syntax_dirty", "context", "node_tree", "node_tree_revision", "node_tree_edits", "node_history", "tables" }, - // Big texts, dumped and sent by their hash (src/walk.zig). The + // Big texts, dumped and sent by their hash (core/walk.zig). The // text is written in place by `replace`, but never while a join // sends it (memory.zig `pin`): then an edit puts a new buffer in // its place. .blob = .{ "content", "location_rows" }, // Written in place in a replica's core too: its rollback copy keeps // none of their bytes, and takes back what a speculation wrote - // (src/rollback.zig `Epoch.wrote`). + // (core/rollback.zig `Epoch.wrote`). .journal = .{ "content", "line_starts" }, }; @@ -456,7 +456,7 @@ fn shiftIndex(gpa: std.mem.Allocator, f: *State, off: usize, len: usize, bytes: /// out go, its newlines' come in, and those after it move by what it added; /// only the moving is a pass over the index, and only from the edit on. The /// edit turned round (`cut` its length in, `bytes` what it took out) gives -/// the index before it back: a rollback's (src/rollback.zig `unwrite`). +/// the index before it back: a rollback's (core/rollback.zig `unwrite`). pub fn shiftStarts(room: []usize, len: usize, n: usize, off: usize, cut: usize, bytes: []const u8) void { const starts = room[0..len]; const kept = std.sort.upperBound(usize, starts, off, ascending); @@ -585,7 +585,7 @@ pub fn deinit(p: *Pardes, pane: *Pane, file: *State) void { } else false; p.gpa.free(file.path); // Raw, as every text is freed (a replica's rollback copy keeps the - // buffers it was taken over, src/rollback.zig, and a safe build's free + // buffers it was taken over, core/rollback.zig, and a safe build's free // writes over what it frees). if (ntwins == 0) pardes.memory.freeRaw(p.gpa, textRoom(file)); if (file.listing) |listing| p.gpa.free(listing.names); @@ -766,7 +766,7 @@ fn edit(p: *Pardes, f: *State, off: usize, len: usize, bytes_in: []const u8, who if (f.saved_hash) |h| if ((f.saved_len orelse new_len) == new_len and std.hash.Wyhash.hash(0, f.content) == h) { f.saved_revision = f.revision; }; - // The clock the session that recorded read (src/tape.zig). + // The clock the session that recorded read (core/tape.zig). f.mtime = pardes.tape.value(.mtime, pardes.ctlfs.events.now, .{}); if (f.highlights.len > 0) p.tree_sitter_gpa.free(f.highlights); f.highlights = &.{}; diff --git a/src/FrameStats.zig b/core/FrameStats.zig index 2bbdd32c..4fbe0735 100644 --- a/src/FrameStats.zig +++ b/core/FrameStats.zig @@ -23,8 +23,8 @@ //! the session: a timedemo, so two builds are compared on the same motion, //! on a real display. const std = @import("std"); -const pardes = @import("pardes.zig"); -const frame_ns = @import("pardes.zig").frame_ns; +const pardes = @import("root.zig"); +const frame_ns = @import("root.zig").frame_ns; const FrameStats = @This(); diff --git a/src/Handover.zig b/core/Handover.zig index 7e71fff6..5347fb95 100644 --- a/src/Handover.zig +++ b/core/Handover.zig @@ -21,7 +21,7 @@ const Handover = @This(); const std = @import("std"); const builtin = @import("builtin"); -const pardes = @import("pardes.zig"); +const pardes = @import("root.zig"); const layout = @import("layout.zig"); const dump = @import("dump.zig"); const ninep_io = @import("runtime").ninep_io; @@ -67,7 +67,7 @@ bytes: ?[]u8 = null, task: ?struct { future: std.Io.Future(void), io: std.Io } = null, /// The dump in flight and its carrier are the host's errand, not the -/// session's (src/walk.zig). +/// session's (core/walk.zig). pub const replica = .{ .authority = .{ "bytes", "task" } }; pub fn deinit(h: *Handover, gpa: std.mem.Allocator) void { diff --git a/src/Jump.zig b/core/Jump.zig index 2e23d932..b958b30b 100644 --- a/src/Jump.zig +++ b/core/Jump.zig @@ -1,7 +1,7 @@ //! The jump list: places jumped from, Back and Forward (Ctrl-o, Ctrl-i), //! a closed file's place reopened from Recent. const std = @import("std"); -const pardes = @import("pardes.zig"); +const pardes = @import("root.zig"); const panes = @import("panes.zig"); const look = @import("look.zig"); const exec = @import("exec.zig"); diff --git a/src/Kind.zig b/core/Kind.zig index 021d0247..a624d7c6 100644 --- a/src/Kind.zig +++ b/core/Kind.zig @@ -1,6 +1,6 @@ //! A kind of pane that is neither text nor a terminal: a picture, a game, //! anything an addon (a library, Addon.zig) brings. Its records and -//! functions are the C ABI of src/kinds/pardes_addon.h (translated, the +//! functions are the C ABI of abi/pardes_addon.h (translated, the //! one copy); this file is the core's side of it: the kinds a core has //! (`Registry`, what libraries brought, with their words and extensions), //! and a pane's `Slot`, the state the core keeps round the kind's own. @@ -17,7 +17,7 @@ const std = @import("std"); const builtin = @import("builtin"); pub const c = @import("pardes_addon"); -const pardes = @import("pardes.zig"); +const pardes = @import("root.zig"); const walk = @import("walk.zig"); const tape = @import("tape.zig"); const surface = @import("surface.zig"); diff --git a/src/Layer.zig b/core/Layer.zig index 78dfa069..8128543a 100644 --- a/src/Layer.zig +++ b/core/Layer.zig @@ -9,7 +9,7 @@ //! body's first `context_rows` rows are stacked at the tagline's height, the //! rest at the body's. `rows == 0` is no layer. const std = @import("std"); -const pardes = @import("pardes.zig"); +const pardes = @import("root.zig"); const config = @import("config.zig"); const limits = @import("memory.zig").limits; const layout = @import("layout.zig"); diff --git a/src/Macro.zig b/core/Macro.zig index 3688dcf9..3e9f9422 100644 --- a/src/Macro.zig +++ b/core/Macro.zig @@ -5,7 +5,7 @@ //! as helix writes one, in key notation (`xt,S=<ret>_<A-(>`), so it can be //! pasted, edited and yanked back like any text. const std = @import("std"); -const pardes = @import("pardes.zig"); +const pardes = @import("root.zig"); const Key = pardes.Key; const Macro = @This(); diff --git a/src/Messages.zig b/core/Messages.zig index 90bedd6f..4080ff61 100644 --- a/src/Messages.zig +++ b/core/Messages.zig @@ -1,7 +1,7 @@ //! The message row: messages and statuses a pane shows between its body and //! its tagline, how each line lingers once dismissed, the notices //! built from them every frame, and the log of everything said. -const pardes = @import("pardes.zig"); +const pardes = @import("root.zig"); const memory = @import("memory.zig"); const std = @import("std"); const layout = @import("layout.zig"); @@ -84,7 +84,7 @@ pub const Message = struct { /// `HH:MM:SS` of `seconds` since the epoch in a zone `gmtoff` seconds /// east of UTC: the message row's time of day, and a replica's guess - /// of the session's (src/tape.zig). + /// of the session's (core/tape.zig). pub fn clockText(seconds: i64, gmtoff: i64) [8]u8 { var text: [8]u8 = "--:--:--".*; if (noTime()) return text; @@ -112,7 +112,7 @@ pub const Message = struct { pub fn stamp(buf: []u8, verb: []const u8, subject: []const u8) []const u8 { // The time of day as the session that said it read it, in its - // zone: a replica's clock and TZ are its own (src/tape.zig). + // zone: a replica's clock and TZ are its own (core/tape.zig). const clock = pardes.tape.value(.clock, timeOfDay, .{}); const head = std.fmt.bufPrint(buf, "{s} {s} ", .{ &clock, verb }) catch return buf[0..0]; const room = buf.len - head.len; @@ -186,7 +186,7 @@ fn nowMs() i64 { pub fn expireUnattended(p: *Pardes) void { if (!p.unattended) return; - // The clock as the session that recorded read it (src/tape.zig). + // The clock as the session that recorded read it (core/tape.zig). const now = pardes.tape.value(.clock, nowMs, .{}); for (p.panes) |slot| { const pane = slot orelse continue; @@ -334,7 +334,7 @@ pub const no_pane_room = "no space for a pane in that column: each keeps its tag /// `<operation>: <the error in words>`: FileNotFound reads "file not found". /// Why a peer could not be reached, in words, for an error of a 9P dial -/// (src/9p_io.zig, Client); null for any other error. +/// (runtime/9p_io.zig, Client); null for any other error. pub fn dialReason(err: anyerror) ?[]const u8 { return switch (err) { error.Dial => "no answer", diff --git a/src/Names.zig b/core/Names.zig index af1d5c2d..fff2c84f 100644 --- a/src/Names.zig +++ b/core/Names.zig @@ -9,7 +9,7 @@ const Names = @This(); const std = @import("std"); -const pardes = @import("pardes.zig"); +const pardes = @import("root.zig"); /// The candidates' rows, back to back, no newlines. bytes: std.ArrayList(u8) = .empty, diff --git a/src/Output.zig b/core/Output.zig index c4252ab2..4284faf3 100644 --- a/src/Output.zig +++ b/core/Output.zig @@ -2,7 +2,7 @@ //! changelog): their rows, traits and look targets. const panes = @import("panes.zig"); const std = @import("std"); -const pardes = @import("pardes.zig"); +const pardes = @import("root.zig"); const exec = @import("exec.zig"); const config = @import("config.zig"); const Pardes = pardes.Pardes; diff --git a/src/Pipe.zig b/core/Pipe.zig index 9b913f1e..59613222 100644 --- a/src/Pipe.zig +++ b/core/Pipe.zig @@ -2,7 +2,7 @@ //! for the shell to run through selection_pipe.zig, and the atomic edit its //! answer makes. const std = @import("std"); -const pardes = @import("pardes.zig"); +const pardes = @import("root.zig"); const modal = @import("modal.zig"); const panes = @import("panes.zig"); const config = @import("config.zig"); @@ -17,7 +17,7 @@ const Pardes = pardes.Pardes; const Pipe = @This(); /// A pipe's run, an Edit's and its writes, out with the host: errands of -/// the session that performs them, not a dump's (src/walk.zig). +/// the session that performs them, not a dump's (core/walk.zig). pub const replica = .{ .authority = .{ "wait", "edit_run", "writes" } }; /// Bumped for every request, so a late answer to an older one is ignored. @@ -49,7 +49,7 @@ pub fn pipeMarker(how: modal.Normal.PipeBehavior) []const u8 { } pub const PendingPipe = struct { - /// The digest's walk (src/walk.zig) of the ranges, as far as they go. + /// The digest's walk (core/walk.zig) of the ranges, as far as they go. pub const replica = .{ .len = .{.{ "ranges", "nranges" }} }; id: u32, pane: usize, diff --git a/src/Places.zig b/core/Places.zig index 6aab0684..9b8754b9 100644 --- a/src/Places.zig +++ b/core/Places.zig @@ -18,7 +18,7 @@ //! finds again only on the lines it touched (File.State.splice), so typing //! in a pane whose places are shown costs a line, not the file. const std = @import("std"); -const pardes = @import("pardes.zig"); +const pardes = @import("root.zig"); const panes = @import("panes.zig"); const modal = @import("modal.zig"); const colors = @import("colors.zig"); @@ -60,7 +60,7 @@ const chunk_bytes = 16 << 10; /// A rail's ticks are placed to 1/`tick_scale` of the file. pub const tick_scale = @import("surface.zig").rail_tick_scale; -/// What the replay digest leaves out (src/walk.zig): the rail's ticks, +/// What the replay digest leaves out (core/walk.zig): the rail's ticks, /// made again from the places when they are drawn. pub const replica = .{ .derived = .{ "ticks", "ticks_gen", "re" } }; @@ -498,7 +498,7 @@ pub fn fill(set: *Places, p: *Pardes, pane: *Pane, bytes: usize, steps: u64) voi if (short) break; // A frame's time spent (a whole search's for n and N, whose steps // are mvzr's whole budget). - // The clock's verdict is the session's (src/tape.zig): a replica + // The clock's verdict is the session's (core/tape.zig): a replica // finds as many places a frame as this did. if (started_ns != 0 and bytes != std.math.maxInt(usize) and pardes.tape.over(started_ns, frame_ns)) break; } diff --git a/src/Plumb.zig b/core/Plumb.zig index 5299a8c3..89f1a52d 100644 --- a/src/Plumb.zig +++ b/core/Plumb.zig @@ -7,7 +7,7 @@ //! only at `isfile` and `isdir`, through the taped resolve sites Look uses. const Plumb = @This(); const std = @import("std"); -const pardes = @import("pardes.zig"); +const pardes = @import("root.zig"); const fs = @import("fs.zig"); const look = @import("look.zig"); const layout = @import("layout.zig"); @@ -434,7 +434,7 @@ const Parser = struct { /// `s`'s first word expanded with the variables: a slice of `s` when /// that changes nothing (no quote, no `$`), as in most rules. What a /// parse keeps slices the text it read, which outlives it (the rules in - /// force, a write's, an include read into the arena, src/plumbing). + /// force, a write's, an include read into the arena, core/plumbing). fn word(ps: *Parser, s: []const u8) Error![]const u8 { var buf: [4096]u8 = undefined; const w, const took = expand(&ps.rules, null, s, &buf) catch return ps.fail("string-too-long", .{}); @@ -463,7 +463,7 @@ const Parser = struct { return true; } - /// rules.c's include: `include basic` is src/plumbing; another name + /// rules.c's include: `include basic` is core/plumbing; another name /// the configuration directory's file, an absolute one where it says. fn include(ps: *Parser, l: []const u8) Error!void { var words = std.mem.tokenizeAny(u8, l, " \t"); diff --git a/src/Query.zig b/core/Query.zig index 0263052d..870f630a 100644 --- a/src/Query.zig +++ b/core/Query.zig @@ -29,7 +29,7 @@ const Query = @This(); const std = @import("std"); -const pardes = @import("pardes.zig"); +const pardes = @import("root.zig"); const panes = @import("panes.zig"); const config = @import("config.zig"); const edit = @import("edit.zig"); diff --git a/src/Registers.zig b/core/Registers.zig index 8019d9dc..516c0682 100644 --- a/src/Registers.zig +++ b/core/Registers.zig @@ -14,7 +14,7 @@ last_search: u21 = '/', /// The values (their array too) and the joined text are replaced whole, /// never written in place (`put` makes a new array), freed raw: blobs -/// (src/walk.zig), which a digest hashes once and a replica's rollback copy +/// (core/walk.zig), which a digest hashes once and a replica's rollback copy /// pins as it does a file's text. pub const Reg = struct { pub const replica = .{ .blob = .{ "values", "joined" } }; diff --git a/src/Store.zig b/core/Store.zig index f6e4919f..25b41bcb 100644 --- a/src/Store.zig +++ b/core/Store.zig @@ -6,7 +6,7 @@ const Store = @This(); const std = @import("std"); -const pardes = @import("pardes.zig"); +const pardes = @import("root.zig"); const dump = @import("dump.zig"); const layout = @import("layout.zig"); const Pardes = pardes.Pardes; diff --git a/src/Stream.zig b/core/Stream.zig index e94ac58d..d5246211 100644 --- a/src/Stream.zig +++ b/core/Stream.zig @@ -18,7 +18,7 @@ const Stream = @This(); const std = @import("std"); -const pardes = @import("pardes.zig"); +const pardes = @import("root.zig"); const config = @import("config.zig"); const filesystem = @import("fs.zig"); const look = @import("look.zig"); @@ -184,7 +184,7 @@ pub const Job = struct { const Task = struct { job: *Job, future: std.Io.Future(void), io: std.Io }; -/// What the replay digest leaves out (src/walk.zig): the workers' timings, +/// What the replay digest leaves out (core/walk.zig): the workers' timings, /// and the colours painted ahead of a view for its frames, which is the /// render's own prefetch (a replica that draws nothing paints none). pub const replica = .{ diff --git a/src/Tables.zig b/core/Tables.zig index c29e6954..0ec69186 100644 --- a/src/Tables.zig +++ b/core/Tables.zig @@ -29,7 +29,7 @@ //! finds"). const std = @import("std"); const panes = @import("panes.zig"); -const pardes = @import("pardes.zig"); +const pardes = @import("root.zig"); const colors = @import("colors.zig"); const modal = @import("modal.zig"); const Surface = @import("surface.zig").Surface; @@ -96,7 +96,7 @@ pending: ?Resume = null, const Resume = struct { at: usize, n: u32, fence: ?Fence, prev_blank: bool }; /// What one frame spends reading a big text from the top: on the session's -/// tick, by the clock (src/tape.zig keeps a replica's reading in step). +/// tick, by the clock (core/tape.zig keeps a replica's reading in step). pub const frame_ns: u64 = 4 * std.time.ns_per_ms; /// What a new text's first look reads at once, wherever it is asked for /// (the render, or a step reading the view's geometry): a count, never the diff --git a/src/Term.zig b/core/Term.zig index 441280ee..116c1118 100644 --- a/src/Term.zig +++ b/core/Term.zig @@ -1,7 +1,7 @@ //! The terminal as the core sees it (docs/next-terminal.md, Phase 1): the -//! entries of the terminal module (src/term/, its own module: ghostty-vt, +//! entries of the terminal module (core/term/, its own module: ghostty-vt, //! wuffs and zstbi are its, not the core's) and the plain records they take -//! and give (src/plain/term.zig). A terminal pane holds a `*State` the core +//! and give (abi/term.zig). A terminal pane holds a `*State` the core //! never looks into: what it knows of one it is told here, as numbers, //! bytes, text and cells. A core built without the module (a test //! configuration: core-test) has `ops` null, and no terminal at all. @@ -50,7 +50,7 @@ fn the() *const iface.Ops { } /// A terminal pane's terminal: the module's handle, and the walk's hooks -/// (src/walk.zig) for it: the replay digest, and the dump, which keeps it +/// (core/walk.zig) for it: the replay digest, and the dump, which keeps it /// as it always has (`Parts` by name, then ghostty's snapshot). pub const State = struct { impl: *iface.State, @@ -340,7 +340,7 @@ pub fn spanColor(f: *Filter, color: plain.Color, is_bg: bool) plain.Color { // Plain data both ways: the core hands the theme's colours (`Ink`) and a // buffer, and is given its view's cells (`Painted`, `PaintedRow`) and its // images as placements; which of the body's rows they stand under is the -// core's (src/ansi.zig). +// core's (core/ansi.zig). /// Its view's rows from `first`, `rows.len` of them, as cells in the /// theme's colours, through the theme's filter when the pane has it on. @@ -452,7 +452,7 @@ pub fn dumpScreen(s: *State, w: *std.Io.Writer) !void { test "a core without a terminal boots to a scratch pane" { if (ops != null) return error.SkipZigTest; - const pardes = @import("pardes.zig"); + const pardes = @import("root.zig"); for ([_]pardes.Options{ .{}, .{ .tty_only = true }, .{ .boot = .tty }, .{ .shells = 3 } }) |opts| { const p = try pardes.Pardes.init(std.testing.allocator, opts); defer p.deinit(); @@ -465,7 +465,7 @@ test "a core without a terminal boots to a scratch pane" { test "a core without a terminal: Term refuses in words, and no line is typed at a shell" { if (ops != null) return error.SkipZigTest; - const pardes = @import("pardes.zig"); + const pardes = @import("root.zig"); const p = try pardes.Pardes.init(std.testing.allocator, .{ .file = "mise.toml" }); defer p.deinit(); try std.testing.expectError(error.NoTerminal, p.newShell(p.freeSlot().?, "")); @@ -480,7 +480,7 @@ test "a core without a terminal: Term refuses in words, and no line is typed at test "a core without a terminal pages a program's output as plain text" { if (ops != null) return error.SkipZigTest; - const pardes = @import("pardes.zig"); + const pardes = @import("root.zig"); const raw = "one\n\x1b[31mtwo\x1b[0m\n"; const paged = try page(std.testing.allocator, raw); defer paged.deinit(std.testing.allocator); diff --git a/src/Text.zig b/core/Text.zig index fd08bb71..5acd6146 100644 --- a/src/Text.zig +++ b/core/Text.zig @@ -60,7 +60,7 @@ pub const SelRange = struct { sticky: i32 = -1, }; -/// The replay digest's walk (src/walk.zig) of the histories and the ranges: +/// The replay digest's walk (core/walk.zig) of the histories and the ranges: /// as far as they go (the ranges' room is made whole and used `nsel` deep). pub const replica = .{ .len = .{ .{ "ed_undo", "ed_undo_len" }, .{ "ed_redo", "ed_redo_len" }, .{ "sels", "nsel" } } }; diff --git a/src/Turn.zig b/core/Turn.zig index 1a10fad7..687e287f 100644 --- a/src/Turn.zig +++ b/core/Turn.zig @@ -9,7 +9,7 @@ //! //! `out` counts the steps that are out. While one is, the core reads //! consistently but that step still holds pointers into it, so nothing may -//! change it: a request that would is parked in the engine (src/9p_io.zig) +//! change it: a request that would is parked in the engine (runtime/9p_io.zig) //! and retried when the turn is next given up with nothing out, which //! `parked` remembers to arrange; and the editor's own wake waits for the //! count to reach zero, since a step of the editor's may change anything. diff --git a/src/ansi.zig b/core/ansi.zig index 224a5e69..6a5d0416 100644 --- a/src/ansi.zig +++ b/core/ansi.zig @@ -6,7 +6,7 @@ //! finished command pane's diff, coloured over those cells as a .diff //! file's lines are (DiffOutput, recolorDiffOutput). const std = @import("std"); -const pardes = @import("pardes.zig"); +const pardes = @import("root.zig"); const panes = @import("panes.zig"); const modal = @import("modal.zig"); const tracy = @import("tracy.zig"); diff --git a/src/body_layer.zig b/core/body_layer.zig index 6748c161..101bbe9c 100644 --- a/src/body_layer.zig +++ b/core/body_layer.zig @@ -2,7 +2,7 @@ //! cursor, and joining a body with compact context rows through its layer //! (Layer.zig). const std = @import("std"); -const pardes = @import("pardes.zig"); +const pardes = @import("root.zig"); const normal = @import("normal.zig"); const edit = @import("edit.zig"); const config = @import("config.zig"); diff --git a/src/builtins.zig b/core/builtins.zig index a44afb98..b3e8d638 100644 --- a/src/builtins.zig +++ b/core/builtins.zig @@ -1,6 +1,6 @@ //! Command structs and runtime settings form the builtin registry; bindings live in config.zig. const std = @import("std"); -const pardes = @import("pardes.zig"); +const pardes = @import("root.zig"); const tagline = @import("tagline.zig"); const dump = @import("dump.zig"); const exec = @import("exec.zig"); @@ -1092,7 +1092,7 @@ pub const Togglettymode = struct { /// acme's Edit (exec.c `edit`, edit.c): sam's command language over the /// open text panes, from a tag, a pane ctl or exec, starting in the pane's /// body. One undo step in each file it changes; a failure changes nothing -/// and says why. src/edit_cmd.zig runs it; src/sam_edit.zig has what is +/// and says why. core/edit_cmd.zig runs it; core/sam_edit.zig has what is /// left out. pub const Edit = struct { pub const takes_arg = true; diff --git a/src/builtins_json.zig b/core/builtins_json.zig index c5bc6bb3..3773e5ae 100644 --- a/src/builtins_json.zig +++ b/core/builtins_json.zig @@ -8,7 +8,7 @@ //! glossary and Help cannot drift; the test below fails when the committed //! copy is stale, and `zig build builtins-json` rewrites it. const std = @import("std"); -const pardes = @import("pardes.zig"); +const pardes = @import("root.zig"); const builtins = @import("builtins.zig"); const config = @import("config.zig"); const ctl = @import("ninep/ctl.zig"); diff --git a/src/c_heap.zig b/core/c_heap.zig index 51cfc137..51cfc137 100644 --- a/src/c_heap.zig +++ b/core/c_heap.zig diff --git a/src/colors.zig b/core/colors.zig index d3ab82e2..3ca8a44e 100644 --- a/src/colors.zig +++ b/core/colors.zig @@ -1,6 +1,6 @@ //! Colour themes: the Theme type, the curated and generated ring, chrome //! colours, theme files, and switching themes at runtime. -const pardes = @import("pardes.zig"); +const pardes = @import("root.zig"); const tagline = @import("tagline.zig"); const panes = @import("panes.zig"); const std = @import("std"); @@ -380,7 +380,7 @@ const curated = struct { pub const orchard_black = @import("themes/orchard_black.zig"); pub const acme = @import("themes/acme.zig"); pub const lapis = @import("themes/lapis.zig"); - // Faithful ports of well-known themes, a family at a time (src/themes/ + // Faithful ports of well-known themes, a family at a time (core/themes/ // <name>.zig says where each value came from): `theme_groups`. pub const dark_plus = @import("themes/dark_plus.zig"); pub const solarized_dark = @import("themes/solarized_dark.zig"); diff --git a/src/config.zig b/core/config.zig index 43a68dd3..ebc5d056 100644 --- a/src/config.zig +++ b/core/config.zig @@ -2,7 +2,7 @@ const std = @import("std"); const builtin = @import("builtin"); const layout = @import("layout.zig"); const limits = @import("memory.zig").limits; -const pardes = @import("pardes.zig"); +const pardes = @import("root.zig"); const builtins = @import("builtins.zig"); const Key = @import("plain").Key; const Mouse = pardes.Mouse; @@ -331,7 +331,7 @@ pub fn wheelTick(guard: *u8, vertical: bool) bool { /// The shell when no `Shell` is set: the user's login shell ($SHELL), as a /// terminal would start, else /bin/sh. An explicit `Shell` overrides it. pub fn defaultShell() []const u8 { - // As the session that recorded found it (src/tape.zig). + // As the session that recorded found it (core/tape.zig). return pardes.tape.value(.env, defaultShellHost, .{}); } diff --git a/src/diff.zig b/core/diff.zig index 659576d3..659576d3 100644 --- a/src/diff.zig +++ b/core/diff.zig diff --git a/src/draw.zig b/core/draw.zig index dbc7069d..7091f61e 100644 --- a/src/draw.zig +++ b/core/draw.zig @@ -5,7 +5,7 @@ //! debug box, then the cursor. const std = @import("std"); const vaxis = @import("vaxis"); -const pardes = @import("pardes.zig"); +const pardes = @import("root.zig"); const layout = @import("layout.zig"); const config = @import("config.zig"); const panes = @import("panes.zig"); diff --git a/src/dump.zig b/core/dump.zig index 7f45ecc8..a4fc0f8d 100644 --- a/src/dump.zig +++ b/core/dump.zig @@ -1,7 +1,7 @@ const std = @import("std"); const builtin = @import("builtin"); const limits = @import("memory.zig").limits; -const pardes = @import("pardes.zig"); +const pardes = @import("root.zig"); const walk = @import("walk.zig"); const Handover = @import("Handover.zig"); const filesystem = @import("fs.zig"); @@ -67,7 +67,7 @@ pub fn defaultDirectory(buf: []u8) ?[]const u8 { } /// What a load makes a terminal's emulator with, when not the loader's -/// own: a screen-state replica's are the C heap's (src/replica.zig). +/// own: a screen-state replica's are the C heap's (core/replica.zig). pub var terminal_gpa: ?std.mem.Allocator = null; // ---- a whole session to and from a dump (acme keeps this in rows.c) ---- @@ -87,7 +87,7 @@ pub var terminal_gpa: ?std.mem.Allocator = null; // `reviveSession` give it to this host: new shells, watches, kinds' panes opened. /// A session's dump: its core, everything it is but what is the host's, -/// the frame's or worked out again (`replica` in each type, src/walk.zig), +/// the frame's or worked out again (`replica` in each type, core/walk.zig), /// then its 9P mounts, which live with the 9P server's own state, which of /// its panes' files were on disk when it was made (one gone by its load is /// said deleted: its text is nowhere else now), its theme's name (the @@ -255,7 +255,7 @@ pub fn image(p: *Pardes, name: []const u8) ![]u8 { return pardes.Db.image(gpa, name, buf.written(), w.blobs.items, panes, names.written()); } -/// A dump for a screen-state replica's join (src/replica.zig): its blobs' +/// A dump for a screen-state replica's join (core/replica.zig): its blobs' /// bytes left out and noted in `deferred` (they are the session's, alive /// while pinned: memory.zig `pin`), its terminals' emulators left out (the /// first delta brings each afresh). What is left is the session's mutable diff --git a/src/echo.zig b/core/echo.zig index 6a18f5dd..90dcfede 100644 --- a/src/echo.zig +++ b/core/echo.zig @@ -28,7 +28,7 @@ //! prompt or a program that ignores input confirms none, so nothing typed //! there is ever shown. const std = @import("std"); -const pardes = @import("pardes.zig"); +const pardes = @import("root.zig"); const Term = pardes.Term; const Pardes = pardes.Pardes; const Pane = pardes.Pane; diff --git a/src/edit.zig b/core/edit.zig index fe644541..ea8f9e8a 100644 --- a/src/edit.zig +++ b/core/edit.zig @@ -2,7 +2,7 @@ //! its lines and cursor map to the screen, insert mode, the d/c/y/p edit //! operations, replace, case, join, indent, comments, numbers, textobjects //! and surround, undo, yank and paste, and the pointer selections as text. -const pardes = @import("pardes.zig"); +const pardes = @import("root.zig"); const tagline = @import("tagline.zig"); const mouse = @import("mouse.zig"); const normal = @import("normal.zig"); diff --git a/src/edit_cmd.zig b/core/edit_cmd.zig index 54ce5c1f..f4b6096a 100644 --- a/src/edit_cmd.zig +++ b/core/edit_cmd.zig @@ -1,5 +1,5 @@ //! acme's Edit in the editor (exec.c `edit`, edit.c editcmd): the panes an -//! Edit sees and what it does to them. src/sam_edit.zig runs the commands +//! Edit sees and what it does to them. core/sam_edit.zig runs the commands //! over the open text panes; here they are handed over, and what came of //! them applied: each file's changes as one undo step, the dots, `w`'s //! writes, the names `e` and `f` gave, `D`'s closes, and what was printed, @@ -14,7 +14,7 @@ //! (9p_io, `fs.edit_hold`), the connection serving on meanwhile; a flush //! of that write stops the commands and changes nothing. const std = @import("std"); -const pardes = @import("pardes.zig"); +const pardes = @import("root.zig"); const sam = @import("sam_edit.zig"); const panes = @import("panes.zig"); const layout = @import("layout.zig"); diff --git a/src/exec.zig b/core/exec.zig index 0a831a85..601d43dc 100644 --- a/src/exec.zig +++ b/core/exec.zig @@ -2,7 +2,7 @@ //! a terminal, the builtin dispatch and settings, the operand a click or //! chord hands over, the terminals commands run in, placing a document, and //! saving a pane. -const pardes = @import("pardes.zig"); +const pardes = @import("root.zig"); const tagline = @import("tagline.zig"); const std = @import("std"); const layout = @import("layout.zig"); diff --git a/src/fs-help.txt b/core/fs-help.txt index 76ad7c5e..76ad7c5e 100644 --- a/src/fs-help.txt +++ b/core/fs-help.txt diff --git a/src/fs.zig b/core/fs.zig index c249ed6d..333588ce 100644 --- a/src/fs.zig +++ b/core/fs.zig @@ -2,7 +2,7 @@ const std = @import("std"); const limits = @import("memory.zig").limits; /// libc: opens with O_NONBLOCK (a FIFO must not hang the editor), which std.Io's open has no flag for, and errno mapped to fs's own errors. const libc = std.c; -const pardes = @import("pardes.zig"); +const pardes = @import("root.zig"); const config = @import("config.zig"); const lsp = @import("lsp/lsp.zig"); const ninep_io = @import("runtime").ninep_io; @@ -38,7 +38,7 @@ pub const name_capacity: usize = 255; pub const Source = struct { path: []const u8, contents: []const u8 }; pub const sources: []const Source = if (limits.embedded_sources) &source_files else &.{}; const source_files = [_]Source{ - .{ .path = "src/pardes.zig", .contents = @embedFile("pardes.zig") }, + .{ .path = "src/pardes.zig", .contents = @embedFile("root.zig") }, .{ .path = "src/panes.zig", .contents = @embedFile("panes.zig") }, .{ .path = "src/Text.zig", .contents = @embedFile("Text.zig") }, .{ .path = "src/surface.zig", .contents = @embedFile("surface.zig") }, @@ -400,7 +400,7 @@ pub fn dotRelative(word: []const u8) bool { /// `~` to expand, or no home for it. pub fn expandHome(path: []const u8, out: *[4096]u8) []const u8 { if (path.len == 0 or path[0] != '~') return path; - // Home as the session that recorded found it (src/tape.zig). + // Home as the session that recorded found it (core/tape.zig). return pardes.tape.value(.env, expandHomeHost, .{ path, out }); } @@ -489,7 +489,7 @@ pub fn readLimit(p: *pardes.Pardes, path: []const u8, max_bytes: usize) ReadErro const native = resolveOs(remote_path, &native_buf) orelse return readFileLimit(p.gpa, path, limit); if (!native.dir) return readFileLimit(p.gpa, path, limit); // The node stays in the table until no connection names it either - // (src/9p_io.zig, collectOs): a client may have walked to it too. + // (runtime/9p_io.zig, collectOs): a client may have walked to it too. const node = try osNode(p, native.path); return readNode(p, node, path, limit); } @@ -889,7 +889,7 @@ pub const Namespace = struct { said_at: u32 = 0, /// What went wrong performing a write's effects after it was answered /// by the core (a save the host could not do): the 9P write, which - /// waits for them, fails with it (src/9p_io.zig). + /// waits for them, fails with it (runtime/9p_io.zig). late_failure: [256]u8 = undefined, late_failure_len: u16 = 0, /// A 9P write asked a language server something: the answer count it @@ -952,7 +952,7 @@ pub const Namespace = struct { /// that said one while it ran failed. failures: u32 = 0, /// A refusal that quotes the message it refuses, as Plan 9's cmderror - /// does (kernel/misc/parse.c:82); answered at once (src/9p_io.zig). + /// does (kernel/misc/parse.c:82); answered at once (runtime/9p_io.zig). ename: [320]u8 = undefined, /// Something a held read may be waiting on changed since they were last /// answered: a record queued, a run answered, a pane gone. @@ -1239,7 +1239,7 @@ test "bounded reads accept exact OS file lengths and empty files" { defer gpa.free(empty); try std.testing.expectEqual(@as(usize, 0), empty.len); // The directory's node stays in the table for the listener to collect - // once no connection names it (src/9p_io.zig, collectOs): a client may + // once no connection names it (runtime/9p_io.zig, collectOs): a client may // have walked to the same directory meanwhile and hold it by that node. try std.testing.expectEqual(@as(usize, 1), p.fs.os_paths.items.len); try std.testing.expectEqualStrings(native, p.fs.os_paths.items[0].path); diff --git a/src/grammar_manifest.zig b/core/grammar_manifest.zig index 711c31a4..711c31a4 100644 --- a/src/grammar_manifest.zig +++ b/core/grammar_manifest.zig diff --git a/src/hunks.zig b/core/hunks.zig index 2fa86ccd..186ba928 100644 --- a/src/hunks.zig +++ b/core/hunks.zig @@ -10,7 +10,7 @@ const diff = @import("diff.zig"); const syntax = @import("syntax.zig"); const locations = @import("locations.zig"); -const pardes = @import("pardes.zig"); +const pardes = @import("root.zig"); const Pardes = pardes.Pardes; const Pane = pardes.Pane; const Output = pardes.panes.Output; @@ -603,7 +603,7 @@ fn trimmedWidth(section: []const u8) usize { // // Its word (Diff), the open and the text it goes back to, and the // restack of a paged diff. A bare look at a .diff, a commit hash and a -// paged diff are plumbing rules (src/plumbing) that start Diff or ask the +// paged diff are plumbing rules (core/plumbing) that start Diff or ask the // edit port to show the diff (Plumb.show). /// The `Diff` word (builtins.zig registers it). Bare, on a +Diff, the diff diff --git a/src/indent.zig b/core/indent.zig index bf52800c..bf52800c 100644 --- a/src/indent.zig +++ b/core/indent.zig diff --git a/src/keys.zig b/core/keys.zig index 05148fed..5a3ad10f 100644 --- a/src/keys.zig +++ b/core/keys.zig @@ -2,7 +2,7 @@ //! chords, the window and tty prefixes, a question's answer, the modes' //! cycle and the tty toggle, as mouse.zig is the mouse. const std = @import("std"); -const pardes = @import("pardes.zig"); +const pardes = @import("root.zig"); const config = @import("config.zig"); const panes = @import("panes.zig"); const modal = @import("modal.zig"); diff --git a/src/layout.zig b/core/layout.zig index 7719af38..6f74025d 100644 --- a/src/layout.zig +++ b/core/layout.zig @@ -1,5 +1,5 @@ const std = @import("std"); -const pardes = @import("pardes.zig"); +const pardes = @import("root.zig"); const tagline = @import("tagline.zig"); const dump = @import("dump.zig"); const config = @import("config.zig"); diff --git a/src/lib_editor.zig b/core/lib_editor.zig index 9bfa5cff..ee42a2cd 100644 --- a/src/lib_editor.zig +++ b/core/lib_editor.zig @@ -21,7 +21,7 @@ const normal = @import("normal.zig"); const edit = @import("edit.zig"); const syntax_impl = @import("syntax.zig"); -/// pardes's syntax (src/lib_syntax.zig): its grammars, highlighting, +/// pardes's syntax (core/lib_syntax.zig): its grammars, highlighting, /// themes and line arithmetic. A file belongs to one module, so a package /// imports this module or `pardes-syntax`, not both. pub const syntax = @import("lib_syntax.zig"); diff --git a/src/lib_syntax.zig b/core/lib_syntax.zig index a25af884..a25af884 100644 --- a/src/lib_syntax.zig +++ b/core/lib_syntax.zig diff --git a/src/locations.zig b/core/locations.zig index ca6b7a7d..da8179d0 100644 --- a/src/locations.zig +++ b/core/locations.zig @@ -1,6 +1,6 @@ const std = @import("std"); const freeRaw = @import("memory.zig").freeRaw; -const pardes = @import("pardes.zig"); +const pardes = @import("root.zig"); const look = @import("look.zig"); const syntax = @import("syntax.zig"); const filesystem = @import("fs.zig"); @@ -25,7 +25,7 @@ pub const Row = struct { code_start: usize, colors: []u8 = &.{}, - /// The replay digest's (src/walk.zig): all of it but its colours. They + /// The replay digest's (core/walk.zig): all of it but its colours. They /// are painted from what this process has painted (the owner's /// highlights a frame made, the locations cache: both derived), so a /// client joined from a dump, or one that drew another view, colours a @@ -40,7 +40,7 @@ pub const Row = struct { }; /// Raw (no safe build's overwrite): a replica's rollback copy pins a row -/// blob and what its rows own (src/rollback.zig `pinnedDeep`). +/// blob and what its rows own (core/rollback.zig `pinnedDeep`). pub fn freeRows(gpa: std.mem.Allocator, rows: []Row) void { for (rows) |row| { freeRaw(gpa, row.path); diff --git a/src/look.zig b/core/look.zig index c6e2ea8b..79880476 100644 --- a/src/look.zig +++ b/core/look.zig @@ -2,7 +2,7 @@ const std = @import("std"); const Kind = @import("Kind.zig"); const builtin = @import("builtin"); const libc = std.c; -const pardes = @import("pardes.zig"); +const pardes = @import("root.zig"); const exec = @import("exec.zig"); const Plumb = @import("Plumb.zig"); const config = @import("config.zig"); @@ -1756,20 +1756,20 @@ test "lookableSpan peels prose punctuation off a path, largest first" { if (!platform_has_fs) return; var realbuf: [4096]u8 = undefined; try std.testing.expectEqualDeep( - @as(?Span, .{ .start = 0, .end = "src/look.zig".len }), - wordSpan(null, "src/look.zig", ".", &realbuf), + @as(?Span, .{ .start = 0, .end = "core/look.zig".len }), + wordSpan(null, "core/look.zig", ".", &realbuf), ); try std.testing.expectEqualDeep( - @as(?Span, .{ .start = 1, .end = 1 + "src/look.zig".len }), - wordSpan(null, "(src/look.zig),", ".", &realbuf), + @as(?Span, .{ .start = 1, .end = 1 + "core/look.zig".len }), + wordSpan(null, "(core/look.zig),", ".", &realbuf), ); try std.testing.expectEqualDeep( - @as(?Span, .{ .start = 0, .end = "src/look.zig:12:3".len }), - wordSpan(null, "src/look.zig:12:3,", ".", &realbuf), + @as(?Span, .{ .start = 0, .end = "core/look.zig:12:3".len }), + wordSpan(null, "core/look.zig:12:3,", ".", &realbuf), ); try std.testing.expectEqualDeep( - @as(?Span, .{ .start = 0, .end = "src/look.zig:12".len }), - wordSpan(null, "src/look.zig:12:", ".", &realbuf), + @as(?Span, .{ .start = 0, .end = "core/look.zig:12".len }), + wordSpan(null, "core/look.zig:12:", ".", &realbuf), ); try std.testing.expectEqual(@as(?Span, null), wordSpan(null, "nothing-here", ".", &realbuf)); try std.testing.expectEqual(@as(?Span, null), wordSpan(null, "", ".", &realbuf)); @@ -1780,20 +1780,20 @@ test "lookableLineSpan takes the row's location and stops before its text" { if (!platform_has_fs) return; var realbuf: [4096]u8 = undefined; try std.testing.expectEqualDeep( - @as(?Span, .{ .start = 0, .end = "src/look.zig:12:5-9".len }), - lineSpan(null, "src/look.zig:12:5-9 const std = @import(\"std\");", ".", &realbuf), + @as(?Span, .{ .start = 0, .end = "core/look.zig:12:5-9".len }), + lineSpan(null, "core/look.zig:12:5-9 const std = @import(\"std\");", ".", &realbuf), ); try std.testing.expectEqualDeep( - @as(?Span, .{ .start = 0, .end = "src/look.zig:12:5".len }), - lineSpan(null, "src/look.zig:12:5 pub fn resolve", ".", &realbuf), + @as(?Span, .{ .start = 0, .end = "core/look.zig:12:5".len }), + lineSpan(null, "core/look.zig:12:5 pub fn resolve", ".", &realbuf), ); try std.testing.expectEqualDeep( @as(?Span, .{ .start = 0, .end = "@p3:10:5".len }), lineSpan(null, "@p3:10:5 /home/goblin", ".", &realbuf), ); try std.testing.expectEqualDeep( - @as(?Span, .{ .start = 3, .end = 3 + "src/look.zig".len }), - lineSpan(null, " (src/look.zig)", ".", &realbuf), + @as(?Span, .{ .start = 3, .end = 3 + "core/look.zig".len }), + lineSpan(null, " (core/look.zig)", ".", &realbuf), ); try std.testing.expectEqualDeep( @as(?Span, .{ .start = 0, .end = "https://pardes.dev/a".len }), @@ -1801,7 +1801,7 @@ test "lookableLineSpan takes the row's location and stops before its text" { ); try std.testing.expectEqual( @as(?Span, null), - lineSpan(null, "see also src/look.zig", ".", &realbuf), + lineSpan(null, "see also core/look.zig", ".", &realbuf), ); try std.testing.expectEqual(@as(?Span, null), lineSpan(null, " ", ".", &realbuf)); try std.testing.expectEqual(@as(?Span, null), lineSpan(null, "", ".", &realbuf)); diff --git a/src/lsp/Ask.zig b/core/lsp/Ask.zig index 2ee33123..40ffaede 100644 --- a/src/lsp/Ask.zig +++ b/core/lsp/Ask.zig @@ -3,7 +3,7 @@ //! rest), the one answer awaited, and what the answer does when it comes //! (rows in a query pane, a jump, a rename's edits, a message). const std = @import("std"); -const pardes = @import("../pardes.zig"); +const pardes = @import("../root.zig"); const lsp = @import("lsp.zig"); const panes = @import("../panes.zig"); const modal = @import("../modal.zig"); diff --git a/src/lsp/lsp.zig b/core/lsp/lsp.zig index 7a636f72..7a636f72 100644 --- a/src/lsp/lsp.zig +++ b/core/lsp/lsp.zig diff --git a/src/memory.zig b/core/memory.zig index ae340bff..c628ae49 100644 --- a/src/memory.zig +++ b/core/memory.zig @@ -343,7 +343,7 @@ pub fn dupeUnfilled(allocator: Allocator, bytes: []const u8) Allocator.Error![]u /// Frees without the safe-build overwrite `free` does: text-sized buffers /// and line indexes, freed as an edit grows or replaces them (and kept by a -/// replica's rollback copy, src/rollback.zig, while it holds the core it +/// replica's rollback copy, core/rollback.zig, while it holds the core it /// was taken over, which a safe build's overwrite would spoil). pub fn freeRaw(allocator: Allocator, items: anytype) void { const E = @typeInfo(@TypeOf(items)).pointer.child; @@ -353,7 +353,7 @@ pub fn freeRaw(allocator: Allocator, items: anytype) void { allocator.rawFree(@constCast(bytes), .of(E), @returnAddress()); } -// ---- a join's pins (src/replica.zig) ---- +// ---- a join's pins (core/replica.zig) ---- // // A replica client's join dumps the session's mutable state in its step and // leaves its blobs out (walk.Deferred); its writer thread streams them after. diff --git a/src/mini.zig b/core/mini.zig index a068a812..b4737f29 100644 --- a/src/mini.zig +++ b/core/mini.zig @@ -1,7 +1,7 @@ //! The Mini minimap: a file drawn four rows to a cell in braille dots. const panes = @import("panes.zig"); const std = @import("std"); -const pardes = @import("pardes.zig"); +const pardes = @import("root.zig"); const layout = @import("layout.zig"); const config = @import("config.zig"); const Pardes = pardes.Pardes; diff --git a/src/modal.zig b/core/modal.zig index f540b1a7..f540b1a7 100644 --- a/src/modal.zig +++ b/core/modal.zig diff --git a/src/mouse.zig b/core/mouse.zig index 4eb18141..073f09c3 100644 --- a/src/mouse.zig +++ b/core/mouse.zig @@ -1,6 +1,6 @@ //! The mouse: what a pointer is over, the three buttons' presses, drags and //! releases (acme's chords, grip and seam drags, gestures). -const pardes = @import("pardes.zig"); +const pardes = @import("root.zig"); const tagline = @import("tagline.zig"); const exec = @import("exec.zig"); const look = @import("look.zig"); diff --git a/src/ninep/addr.zig b/core/ninep/addr.zig index 72a2d815..72a2d815 100644 --- a/src/ninep/addr.zig +++ b/core/ninep/addr.zig diff --git a/src/ninep/cols.zig b/core/ninep/cols.zig index d953bcc7..561a5ffa 100644 --- a/src/ninep/cols.zig +++ b/core/ninep/cols.zig @@ -4,7 +4,7 @@ //! are only a window's place -- so these go past it: a script can see where //! the panes are and edit the tags a person clicks in. const std = @import("std"); -const pardes = @import("../pardes.zig"); +const pardes = @import("../root.zig"); const Pardes = pardes.Pardes; const tree = @import("tree.zig"); const limits = @import("../memory.zig").limits; diff --git a/src/ninep/ctl.zig b/core/ninep/ctl.zig index 49fe661d..0077f095 100644 --- a/src/ninep/ctl.zig +++ b/core/ninep/ctl.zig @@ -6,7 +6,7 @@ //! a pane's ctl reads its acme status line and takes acme's verbs `get`, //! `lock` and `unlock` and the builtins that act on a pane. const std = @import("std"); -const pardes = @import("../pardes.zig"); +const pardes = @import("../root.zig"); const look = @import("../look.zig"); const panes = @import("../panes.zig"); const config = @import("../config.zig"); diff --git a/src/ninep/events.zig b/core/ninep/events.zig index 2af86108..276261c8 100644 --- a/src/ninep/events.zig +++ b/core/ninep/events.zig @@ -1,7 +1,7 @@ //! Event streams: per-pane `event` records, the editor-wide `log`, and the //! bounded queues that park a read until something happens. const std = @import("std"); -const pardes = @import("../pardes.zig"); +const pardes = @import("../root.zig"); const exec = @import("../exec.zig"); const look = @import("../look.zig"); const cloud9 = @import("cloud9"); diff --git a/src/ninep/pane.zig b/core/ninep/pane.zig index 93759aa5..11f0558e 100644 --- a/src/ninep/pane.zig +++ b/core/ninep/pane.zig @@ -2,7 +2,7 @@ //! files addr, dot and limit, data, xdata, sel, the three flag files dirty, //! mark and scroll, errors, event, look and exec. Terminals add pty/ (pty.zig). const std = @import("std"); -const pardes = @import("../pardes.zig"); +const pardes = @import("../root.zig"); const tagline = @import("../tagline.zig"); const exec = @import("../exec.zig"); const layout = @import("../layout.zig"); diff --git a/src/ninep/pty.zig b/core/ninep/pty.zig index 0a1cfc23..a66d9f23 100644 --- a/src/ninep/pty.zig +++ b/core/ninep/pty.zig @@ -1,6 +1,6 @@ //! A terminal pane's pty/: ctl (winsize, sig, exec), status and the raw data stream. const std = @import("std"); -const pardes = @import("../pardes.zig"); +const pardes = @import("../root.zig"); const tree = @import("tree.zig"); const pane_files = @import("pane.zig"); diff --git a/src/ninep/screen.zig b/core/ninep/screen.zig index 1bfd9b63..cd3c73b6 100644 --- a/src/ninep/screen.zig +++ b/core/ninep/screen.zig @@ -1,7 +1,7 @@ //! /screen, /listeners and the snapshots that freeze a screen or a terminal //! history between open and close (tree.zig's open records hold them). const std = @import("std"); -const pardes = @import("../pardes.zig"); +const pardes = @import("../root.zig"); const panes = @import("../panes.zig"); const tree = @import("tree.zig"); diff --git a/src/ninep/sources.zig b/core/ninep/sources.zig index 2e96b539..1d804e31 100644 --- a/src/ninep/sources.zig +++ b/core/ninep/sources.zig @@ -1,7 +1,7 @@ //! The editor's embedded sources, served read-only from the root when the //! build carries them (-Dembed-sources=true). const std = @import("std"); -const pardes = @import("../pardes.zig"); +const pardes = @import("../root.zig"); const fs = @import("../fs.zig"); const tree = @import("tree.zig"); diff --git a/src/ninep/testing.zig b/core/ninep/testing.zig index a9f6d5de..23a9199f 100644 --- a/src/ninep/testing.zig +++ b/core/ninep/testing.zig @@ -1,7 +1,7 @@ //! Test helpers shared by the control-tree modules: drive one request //! through the core and collect the reply and the effects it raised. const std = @import("std"); -const pardes = @import("../pardes.zig"); +const pardes = @import("../root.zig"); const tree = @import("tree.zig"); const cloud9 = @import("cloud9"); diff --git a/src/ninep/tree.zig b/core/ninep/tree.zig index 43d1a272..d13a1b19 100644 --- a/src/ninep/tree.zig +++ b/core/ninep/tree.zig @@ -1,6 +1,6 @@ //! The control tree served over 9P: its nodes, lookup, readdir and the //! dispatch that answers the engine (cloud9.fs.Server, configured in -//! src/9p.zig). The backend contract (Req, Reply, Op, Status, E) is cloud9's, +//! runtime/9p.zig). The backend contract (Req, Reply, Op, Status, E) is cloud9's, //! extended here with the editor's reply payload; fs.zig keeps host access //! and mounts. //! @@ -12,7 +12,7 @@ //! /os/... the host filesystem /src/... embedded sources (opt-in) const std = @import("std"); const cloud9 = @import("cloud9"); -const pardes = @import("../pardes.zig"); +const pardes = @import("../root.zig"); const fs = @import("../fs.zig"); pub const events = @import("events.zig"); pub const pane = @import("pane.zig"); @@ -177,7 +177,7 @@ pub const Open = struct { /// log.c:4-52) and acme an event read (editors/acme/xfid.c:994). One at a /// time, as acme's window keeps one `eventx`: a newer read takes the /// place of the older. The listener fills it in and answers it - /// (src/9p_io.zig, `answerHeld`). + /// (runtime/9p_io.zig, `answerHeld`). held: ?Held = null, /// The last answer a stream open (a followed log, event, pty/data) gave, /// and the offset it was read at. A read at an offset inside it is @@ -271,7 +271,7 @@ pub const TopFile = enum(u5) { kbdin, /// devmouse's mousein: `m col row buttons`, the mouse as it now is. mousein, - /// The dumps the state file keeps (src/Db.zig), a line each, the newest + /// The dumps the state file keeps (core/Db.zig), a line each, the newest /// first: `<label> <date> <size> <panes>`; `Restore <label>` brings one /// back. dumps, diff --git a/src/normal.zig b/core/normal.zig index 70933607..869394fc 100644 --- a/src/normal.zig +++ b/core/normal.zig @@ -1,7 +1,7 @@ //! Helix normal mode: a key read against the configured bindings becomes //! modal actions, replayed across every selection, and each action is done //! to the pane (a kind's pane takes its own keys first, Kind.key). -const pardes = @import("pardes.zig"); +const pardes = @import("root.zig"); const tagline = @import("tagline.zig"); const exec = @import("exec.zig"); const look = @import("look.zig"); diff --git a/src/panes.zig b/core/panes.zig index e9c9b1d3..fe57793a 100644 --- a/src/panes.zig +++ b/core/panes.zig @@ -1,5 +1,5 @@ const std = @import("std"); -const pardes = @import("pardes.zig"); +const pardes = @import("root.zig"); const views = @import("views.zig"); const config = @import("config.zig"); const modal = @import("modal.zig"); @@ -26,7 +26,7 @@ const effect_path_cap = pardes.effect_path_cap; pub const EditText = struct { text: []u8, row0: i32 }; pub const Pane = struct { - /// What the replay digest leaves out (src/walk.zig): the view's geometry, + /// What the replay digest leaves out (core/walk.zig): the view's geometry, /// made again from the rest (File.geometry); the 9P server's record of /// the pane's opens and readers; the other views' share of it (views.zig). pub const replica = .{ @@ -1481,7 +1481,7 @@ pub fn startPrompt(p: *Pardes, pane: *Pane, t: *Text, request: union(enum) { save, }) void { // Nobody is at the keyboard to answer a command a script wrote to a - // ctl file: the write fails instead (src/ninep/ctl.zig). + // ctl file: the write fails instead (core/ninep/ctl.zig). if (p.fs.no_prompt) { p.fs.refused = true; // A failure like any other: the builtin's announcement goes. @@ -1715,7 +1715,7 @@ test "owned cwd EOF failure retains the pane and Del retries its close" { test "owned cwd restore either copies the directory or preserves the old core" { // No terminal: the emulator's (1.4) snapshot decode leaks when an allocation // inside it fails, and this fails every allocation of a Restore in turn - // (what pardes's own load made is freed, src/walk.zig rollback). + // (what pardes's own load made is freed, core/walk.zig rollback). var allocator = std.testing.FailingAllocator.init(std.testing.allocator, .{}); const p = try Pardes.init(allocator.allocator(), .{ .tty_only = true, .file = "/nonexistent/pardes-owned-cwd" }); defer p.deinit(); diff --git a/src/plumbing b/core/plumbing index 4e8cd702..4e8cd702 100644 --- a/src/plumbing +++ b/core/plumbing diff --git a/src/recent.zig b/core/recent.zig index 5cccf18b..5cccf18b 100644 --- a/src/recent.zig +++ b/core/recent.zig diff --git a/src/regexp.zig b/core/regexp.zig index 87fc51d6..3f4bb391 100644 --- a/src/regexp.zig +++ b/core/regexp.zig @@ -1,6 +1,6 @@ //! How pardes runs a regular expression over text: mvzr's, searched the way -//! sam searches (editors/acme/regx.c). `addr` (src/ninep/addr.zig) and -//! normal mode's `s` and `S` (src/normal.zig) both call it. +//! sam searches (editors/acme/regx.c). `addr` (core/ninep/addr.zig) and +//! normal mode's `s` and `S` (core/normal.zig) both call it. const std = @import("std"); const mvzr = @import("mvzr"); diff --git a/src/replica.zig b/core/replica.zig index 4336855e..b8d8f436 100644 --- a/src/replica.zig +++ b/core/replica.zig @@ -1,5 +1,5 @@ //! A session's replicas (docs/next-daemon.md, phase 5 part A): the authority -//! orders every input and records what its core consumed (src/tape.zig); +//! orders every input and records what its core consumed (core/tape.zig); //! each replica runs a core of its own, applies its own inputs at once, and //! takes the authority's stream as the truth. //! @@ -8,7 +8,7 @@ //! it). For each unit of the authority's stream, in order: //! - its own pending head, recorded the same (inputs, host calls and //! answers): the head goes, nothing is redone (the fast path); -//! - else the rollback copy is put back (src/rollback.zig), the confirmed +//! - else the rollback copy is put back (core/rollback.zig), the confirmed //! units since it are replayed, then this one, and the pending inputs //! are applied again. //! A speculation that reaches a host call or a syscall (a Host function, @@ -23,7 +23,7 @@ //! tick), its sequence number and the authority's tape of it. const std = @import("std"); const builtin = @import("builtin"); -const pardes = @import("pardes.zig"); +const pardes = @import("root.zig"); const tape = @import("tape.zig"); const rollback = @import("rollback.zig"); const walk = @import("walk.zig"); @@ -153,7 +153,7 @@ pub const Authority = struct { host: pardes.Host, out: std.ArrayListUnmanaged(u8) = .empty, seq: u32 = 0, - /// Each client's view (src/views.zig): its own layout, focus and + /// Each client's view (core/views.zig): its own layout, focus and /// cursors over the session's text. The first client has the session's. view_of: [64]u8 = @splat(0), /// Steps of its own taken since the last unit (`output`): one unit, @@ -352,7 +352,7 @@ pub const Authority = struct { } }; -// ---- terminals as screen state (src/term/screen_state.zig) ---- +// ---- terminals as screen state (core/term/screen_state.zig) ---- // // A message of either side is u8 pane, u32 the pane's serial (a slot's // next pane is another), u8 kind, and the kind's bytes: @@ -705,7 +705,7 @@ pub const Replica = struct { /// goes for its next join. cache: ?Cache = null, io: std.Io = undefined, - /// Its predicted echo (src/term/echo.zig), drawn over its core's terminals: + /// Its predicted echo (core/term/echo.zig), drawn over its core's terminals: /// fed by its keys, its units and its deltas here, and by `echoFrame`. echo: Echo = .{}, @@ -737,7 +737,7 @@ pub const Replica = struct { return r; } - /// A replica of a session elsewhere, as its walker dump (src/dump.zig) + /// A replica of a session elsewhere, as its walker dump (core/dump.zig) /// is: what a client of a socket joins with. `opts` are this process's /// (a replica's own allocators and names); its core's allocator is the /// rollback epoch's, but for images and PDFs, whose workers allocate on @@ -788,7 +788,7 @@ pub const Replica = struct { c.in_len = 0; c.in_head = 0; tape.adoptCore(&r.t, c); - // Its keys into a terminal drawn at once (src/term/echo.zig). + // Its keys into a terminal drawn at once (core/term/echo.zig). c.echo = &r.echo; return r; } @@ -1443,7 +1443,7 @@ fn terminalDigests(p: *const Pardes, out: *[pardes.MAX_PANES]u64) void { // boundary of the session's loop (`Peers.boundary`, after a pump): // - the pump's unit goes to every client; // - a client that came is joined: its view opened, the session dumped -// (src/dump.zig) and sent ahead of every unit after; +// (core/dump.zig) and sent ahead of every unit after; // - each input that came is a unit of its own: its view, the input, a // `step` (what the client's own core applied at once); // - a client gone takes its view with it. @@ -2037,7 +2037,7 @@ pub const Peers = struct { boundary_ns: std.ArrayListUnmanaged(u64) = .empty, cut: u32 = 0, head: [unit_head]u8 = undefined, - /// Its clients' terminals as screen state (src/term/screen_state.zig), while + /// Its clients' terminals as screen state (core/term/screen_state.zig), while /// it records: what each was sent. screens: Screens = undefined, msgs: std.ArrayListUnmanaged([]u8) = .empty, diff --git a/src/rollback.zig b/core/rollback.zig index d5810a86..a17e47ba 100644 --- a/src/rollback.zig +++ b/core/rollback.zig @@ -8,7 +8,7 @@ //! is put off) and grows nothing of then in place. What is allocated //! meanwhile is the epoch's. So whatever the core held when the copy was //! taken is still where it was when the copy is put back. -//! - `Copy`, the walker's walk of the core's state (src/walk.zig: what a +//! - `Copy`, the walker's walk of the core's state (core/walk.zig: what a //! digest covers, so views, buffers, registers, counters and terminal //! metadata), saving the bytes of every allocation it reaches, the core //! struct's own included. A file's text and its line index are neither @@ -36,7 +36,7 @@ //! (test/replicas.zig) checks a digest at every confirmed step. const std = @import("std"); const builtin = @import("builtin"); -const pardes = @import("pardes.zig"); +const pardes = @import("root.zig"); const walk = @import("walk.zig"); const Allocator = std.mem.Allocator; const Alignment = std.mem.Alignment; @@ -518,7 +518,7 @@ fn annotatedStruct(comptime T: type) bool { /// is taken: what is in their slots is nothing), the frame statistics /// (numbers), and the rows a terminal was last read as /// (a grid's worth of text, emptied when a copy is taken and when it is -/// put back: src/replica.zig), and a replica's predicted echo (src/term/echo.zig: +/// put back: core/replica.zig), and a replica's predicted echo (core/term/echo.zig: /// the replica's, never its core's). And the store and Recent, a replica's /// own: on the host's heap (Pardes.recentGpa), which the epoch never puts a /// free off for, so their bytes put back would point at what is freed. A diff --git a/src/pardes.zig b/core/root.zig index 16933396..a0cba5ec 100644 --- a/src/pardes.zig +++ b/core/root.zig @@ -82,7 +82,7 @@ pub const views = @import("views.zig"); pub const rollback = @import("rollback.zig"); pub const replica = @import("replica.zig"); pub const Kind = @import("Kind.zig"); -/// The terminal, as the core calls it (src/term/ behind it). +/// The terminal, as the core calls it (core/term/ behind it). pub const Term = @import("Term.zig"); pub const keys = @import("keys.zig"); pub const Addon = @import("Addon.zig"); diff --git a/src/sam_edit.zig b/core/sam_edit.zig index a2db0abc..39f667f9 100644 --- a/src/sam_edit.zig +++ b/core/sam_edit.zig @@ -5,8 +5,8 @@ //! logs them, then applied at once: an Edit is one undo step in each file it //! changes, and one that fails changes nothing. //! -//! Addresses are the `addr` file's (src/ninep/addr.zig), so they take -//! pardes's `line:col` too; regular expressions are src/regexp.zig's, mvzr +//! Addresses are the `addr` file's (core/ninep/addr.zig), so they take +//! pardes's `line:col` too; regular expressions are core/regexp.zig's, mvzr //! searched as sam searches, with its step budget. //! //! What touches more than the text is the caller's (src/EditCmd.zig): `<`, diff --git a/src/selection_pipe.zig b/core/selection_pipe.zig index 200eff95..c33cf913 100644 --- a/src/selection_pipe.zig +++ b/core/selection_pipe.zig @@ -5,7 +5,7 @@ //! memory reaches the editor/event-loop thread. const std = @import("std"); const filesystem = @import("fs.zig"); -const pardes = @import("pardes.zig"); +const pardes = @import("root.zig"); /// A deliberately finite answer. One selection cannot retain more than 1 MiB /// and a multi-selection command cannot retain more than 4 MiB in total. @@ -17,7 +17,7 @@ pub const max_stderr_bytes: usize = 64 * 1024; pub const command_timeout_seconds: u64 = 10; /// Borrowed view exposed by the core while an effect is being drained. -/// An Edit's `<`, `|` and `>` (src/edit_cmd.zig) run a command of their own +/// An Edit's `<`, `|` and `>` (core/edit_cmd.zig) run a command of their own /// per input, each in its file's directory: `commands` and `cwds`, when /// given, name input i's, and `shell` (the session's Shell) runs them, /// /bin/sh when it is empty. diff --git a/src/surface.zig b/core/surface.zig index 73789dce..efc6d3f3 100644 --- a/src/surface.zig +++ b/core/surface.zig @@ -1,6 +1,6 @@ //! The canonical screen every shell draws: cells, their styles and diffs, //! the image placements laid over them, and the Surface that holds a frame. -const pardes = @import("pardes.zig"); +const pardes = @import("root.zig"); const std = @import("std"); const plain = @import("plain"); const layout = @import("layout.zig"); @@ -12,7 +12,7 @@ const MAX_PANES = pardes.MAX_PANES; const Layer = @import("Layer.zig"); const MAX_TAG_LAYERS = pardes.MAX_TAG_LAYERS; -// The plain records (src/plain/plain.zig) both the core and the terminal +// The plain records (abi/plain.zig) both the core and the terminal // name, under the names the core has always called them. pub const Color = plain.Color; pub const FontRole = plain.FontRole; diff --git a/src/syntax.zig b/core/syntax.zig index 3f75c4be..adb0ccfe 100644 --- a/src/syntax.zig +++ b/core/syntax.zig @@ -377,7 +377,7 @@ fn advance(from: ts.Point, text: []const u8) ts.Point { return .{ .row = from.row + @as(u32, @intCast(std.mem.count(u8, text, "\n"))), .column = @intCast(text.len - nl - 1) }; } -/// While a replica's rollback copy is held (src/rollback.zig) a tree parsed +/// While a replica's rollback copy is held (core/rollback.zig) a tree parsed /// is the speculation's, and one freed is put off: trees live on the C /// heap, which the core's allocator cannot see. Null otherwise. pub var held_trees: ?*HeldTrees = null; @@ -495,7 +495,7 @@ fn objectQuery(path: []const u8) ?*ts.Query { return lazyQuery(spec, &spec.objects); } -/// The grammar's indent query for `path` (src/indent.zig) and the +/// The grammar's indent query for `path` (core/indent.zig) and the /// grammar's name; null when it has none. pub fn indentQuery(path: []const u8) ?struct { *ts.Query, []const u8 } { if (!enabled) return null; diff --git a/src/tagline.zig b/core/tagline.zig index d7c657ff..c5e51f23 100644 --- a/src/tagline.zig +++ b/core/tagline.zig @@ -1,7 +1,7 @@ //! The tags (acme's tag half of wind.c): a pane's computed prefix and its //! default and saved tails, going into a tag and out again, the path drafted //! as a new name, and the column and workspace tags above the panes. -const pardes = @import("pardes.zig"); +const pardes = @import("root.zig"); const std = @import("std"); const modal = @import("modal.zig"); const ctlfs = @import("ninep/tree.zig"); diff --git a/src/tape.zig b/core/tape.zig index da9de05b..07bf4fff 100644 --- a/src/tape.zig +++ b/core/tape.zig @@ -18,7 +18,7 @@ //! The local path pays a null check a call: `on` is null unless //! PARDES_RECORD names where to write, `<prefix><pid>.tape`. const std = @import("std"); -const pardes = @import("pardes.zig"); +const pardes = @import("root.zig"); const walk = @import("walk.zig"); const host_io = @import("dev").host_io; const Pardes = pardes.Pardes; @@ -241,7 +241,7 @@ pub const Tape = struct { /// (to find the step a divergence starts at), not only the host's last. every: bool = false, /// A replica applying its own input before the authority has ordered it - /// (src/replica.zig): recorded as the authority would record it, so the + /// (core/replica.zig): recorded as the authority would record it, so the /// two can be compared, but nothing is performed. A host call or a /// syscall stops it (`poisoned`): what the call returns is the /// authority's to say, and the input waits for it. A read of the clock @@ -259,7 +259,7 @@ pub const Tape = struct { /// depends on the emulator, which deltas write (`touchTerminal`). touched: bool = false, /// The allocator of the core a replay makes (a replica's rollback epoch, - /// src/rollback.zig), when it is not the tape's own. + /// core/rollback.zig), when it is not the tape's own. core_gpa: ?std.mem.Allocator = null, /// Where a replay keeps what a core keeps of an input (its options), /// for a tape that is let go; else the tape's allocator, for good. @@ -272,7 +272,7 @@ pub const Tape = struct { dump_check: bool = false, dumps: usize = 0, dump_bytes: usize = 0, - /// Screen-state terminals (src/term/screen_state.zig, docs/next-daemon.md + /// Screen-state terminals (core/term/screen_state.zig, docs/next-daemon.md /// phase 5): an authority recording for replicas, or a replica. A /// terminal's emulator is the authority's alone: its output is recorded /// without its bytes (they cross as screen state), its pty writes are @@ -287,10 +287,10 @@ pub const Tape = struct { /// one a unit, not one after each of its inputs. unit_digests: bool = false, /// A digest record replayed is compared with the core's own; a replica - /// client's compares one now and then (src/replica.zig `check_every`). + /// client's compares one now and then (core/replica.zig `check_every`). checks: bool = true, /// A replica client's guess of the session's clocks for a speculation - /// (src/replica.zig): its clock reads (a message's stamp, a file's + /// (core/replica.zig): its clock reads (a message's stamp, a file's /// mtime) answer this instead of the clocks here. guess: ?Guess = null, /// The same guess, as the client sent it with its input, while the @@ -299,7 +299,7 @@ pub const Tape = struct { /// records (a message's millisecond, an edit's second never miss). stamp: ?Guess = null, /// The replica stream's records by hash (`unit_digests`), until the - /// unit is sent (src/replica.zig `Peers.unit`). + /// unit is sent (core/replica.zig `Peers.unit`). big: std.ArrayListUnmanaged(Big) = .empty, /// A replica's: the last few records by hash it was sent or read. files: std.ArrayListUnmanaged(Big) = .empty, @@ -1074,7 +1074,7 @@ pub fn adoptCore(t: *Tape, p: *Pardes) void { p.host = t.hostOf(t.mask); } -/// A replica joins the session recorded on `t` (src/replica.zig): what the +/// A replica joins the session recorded on `t` (core/replica.zig): what the /// host wrote in the core and which host it is are said again at the next /// input, for a core made from a dump, which has neither. pub fn resync(t: *Tape) void { @@ -1115,7 +1115,7 @@ pub fn stray() void { if (t.speculating) t.poisoned = true else t.diverge("a syscall that is no tape site, made replaying", .{}); } -/// A replica speculating (src/replica.zig): state only the authority +/// A replica speculating (core/replica.zig): state only the authority /// changes (a terminal's emulator) is left alone, and the input waits. pub fn speculating() bool { return if (on) |t| t.speculating else false; @@ -1217,7 +1217,7 @@ fn zeroable(comptime T: type) bool { }; } -// ---- a replica's tapes in memory (src/replica.zig) ---- +// ---- a replica's tapes in memory (core/replica.zig) ---- /// A tape recorded in memory: an authority's stream, taken unit by unit. pub fn memory(gpa: std.mem.Allocator) Tape { diff --git a/src/term/TerminalImages.zig b/core/term/TerminalImages.zig index 1420d9e3..1420d9e3 100644 --- a/src/term/TerminalImages.zig +++ b/core/term/TerminalImages.zig diff --git a/src/term/pager.zig b/core/term/pager.zig index 0cf2ee21..0cf2ee21 100644 --- a/src/term/pager.zig +++ b/core/term/pager.zig diff --git a/src/term/screen_state.zig b/core/term/screen_state.zig index 59085578..ec72a841 100644 --- a/src/term/screen_state.zig +++ b/core/term/screen_state.zig @@ -24,7 +24,7 @@ //! delta against another (one lost) is refused, and the peer started afresh. //! //! The replica writes each delta into a ghostty Terminal, which a replica's -//! terminal pane draws as a local one (src/term/terminal.zig reads only that). +//! terminal pane draws as a local one (core/term/terminal.zig reads only that). //! Rows that scroll off its active area go into its history, made what the //! authority's are by the delta's tail (their addresses, up to a screen of //! them). Older ones it never saw, or saw before they last changed, are @@ -292,7 +292,7 @@ pub const Track = struct { }; /// What the authority knows of one peer of one terminal: a plain record -/// both sides name (src/plain/term.zig), the core keeping one a peer. +/// both sides name (abi/term.zig), the core keeping one a peer. pub const Peer = plain.term.Peer; /// Its replica's holes once it applies a delta to `tr`'s newest version diff --git a/src/term/term.zig b/core/term/term.zig index 87c06611..6e36816a 100644 --- a/src/term/term.zig +++ b/core/term/term.zig @@ -3,8 +3,8 @@ //! the screen state its replicas are sent (screen_state.zig), the kitty //! images it draws (TerminalImages.zig) and the pager's parse (pager.zig). //! It imports std, ghostty-vt, wuffs, zstbi and `plain`, never the core: -//! the core reaches it through `ops` (src/Term.zig), the records of -//! src/plain/term.zig in and out. +//! the core reaches it through `ops` (core/Term.zig), the records of +//! abi/term.zig in and out. const std = @import("std"); const plain = @import("plain"); const iface = plain.term; diff --git a/src/term/terminal.zig b/core/term/terminal.zig index 0178a848..d328748e 100644 --- a/src/term/terminal.zig +++ b/core/term/terminal.zig @@ -1,6 +1,6 @@ //! A terminal: its VT emulator, the OSC 133 cycle its shell marks, its //! text, its view as cells, and the Filter that recolours output to the -//! theme. The core reaches it through src/term/term.zig's `ops`. +//! theme. The core reaches it through core/term/term.zig's `ops`. const std = @import("std"); const plain = @import("plain"); const Key = plain.Key; @@ -17,7 +17,7 @@ const ImagesAt = plain.term.ImagesAt; const PromptCut = plain.term.PromptCut; pub const VtSlot = ghostty_vt.Terminal; -/// A cell of an emulator's pages, as `getCell` reads it (src/term/echo.zig). +/// A cell of an emulator's pages, as `getCell` reads it (core/term/echo.zig). pub const PageCell = ghostty_vt.PageList.Cell; /// Kitty graphics: a program's images are placements, as a kind's are. pub const images_enabled = true; @@ -212,7 +212,7 @@ pub const State = struct { }; /// The emulator as its program has made it, for the replay digest (the -/// core's Term.State.digest, src/walk.zig): the active screen's text, how +/// core's Term.State.digest, core/walk.zig): the active screen's text, how /// much history is above it and, with `view`, where the view is, the /// cursor, the answers not yet written. Not its pages (their addresses are /// its own), nor the history's text (the screen's was all of it once, and @@ -754,7 +754,7 @@ pub fn open(gpa: std.mem.Allocator, cols: u16, rows: u16) !*State { const state = try gpa.create(State); errdefer gpa.destroy(state); // Every other field its default, never what the heap had: a digest - // reads them, and two replicas must agree (src/replica.zig). + // reads them, and two replicas must agree (core/replica.zig). state.* = .{ .gpa = gpa, .vt = try emulator(gpa, cols, rows), .stream = undefined }; state.wire(); return state; @@ -1045,7 +1045,7 @@ pub fn promptCutAt(state: *State, row: i32) ?PromptCut { } /// What a predicted echo reads of cell `x`, `y` of its active area -/// (src/echo.zig): null off it. +/// (core/echo.zig): null off it. pub fn echoCell(state: *const State, x: u16, y: u16) ?Term.EchoCell { if (y >= state.vt.rows) return null; const ci = state.vt.screens.active.pages.getCell(.{ .active = .{ .x = x, .y = y } }) orelse return null; @@ -1092,7 +1092,7 @@ fn dumpedBytes(pin: ghostty_vt.Pin, cell: *const ghostty_vt.Cell) usize { /// Its rows `first` and the `count` after it (from the top of its /// history) as text, a prompt's own cells cut off the rows it starts: -/// `arena`'s. An edit copy's rows as they were (src/ansi.zig). +/// `arena`'s. An edit copy's rows as they were (core/ansi.zig). pub fn editRows(state: *State, arena: std.mem.Allocator, first: usize, count: usize) ![]const []const u8 { const screen = state.vt.screens.active; const tl = screen.pages.pin(.{ .screen = .{ .y = @intCast(first) } }) orelse return error.NoRow; @@ -1191,7 +1191,7 @@ pub fn viewport(state: *State, arena: std.mem.Allocator, cut: bool) ![]const []c } /// Its view's rows as cells, for the core's paint (Term.paint, the core's -/// src/ansi.zig): `rows.len` rows from the view's row `first`, `cols` +/// core/ansi.zig): `rows.len` rows from the view's row `first`, `cols` /// cells each into `cells`, each its style in the theme's colours (through /// the filter when `filtered`), the bytes it spells in the view's text and /// its width; each row whether a prompt starts it, and how much of it that diff --git a/src/themes/acme.zig b/core/themes/acme.zig index 4e4e9a43..4e4e9a43 100644 --- a/src/themes/acme.zig +++ b/core/themes/acme.zig diff --git a/src/themes/alucard.zig b/core/themes/alucard.zig index 1b5695cc..1b5695cc 100644 --- a/src/themes/alucard.zig +++ b/core/themes/alucard.zig diff --git a/src/themes/atelier.zig b/core/themes/atelier.zig index 0ad776fa..0ad776fa 100644 --- a/src/themes/atelier.zig +++ b/core/themes/atelier.zig diff --git a/src/themes/ayu_dark.zig b/core/themes/ayu_dark.zig index 62fb29ed..62fb29ed 100644 --- a/src/themes/ayu_dark.zig +++ b/core/themes/ayu_dark.zig diff --git a/src/themes/ayu_light.zig b/core/themes/ayu_light.zig index 22436be7..22436be7 100644 --- a/src/themes/ayu_light.zig +++ b/core/themes/ayu_light.zig diff --git a/src/themes/ayu_mirage.zig b/core/themes/ayu_mirage.zig index 23aff67f..23aff67f 100644 --- a/src/themes/ayu_mirage.zig +++ b/core/themes/ayu_mirage.zig diff --git a/src/themes/catppuccin_frappe.zig b/core/themes/catppuccin_frappe.zig index 7a97ee2c..7a97ee2c 100644 --- a/src/themes/catppuccin_frappe.zig +++ b/core/themes/catppuccin_frappe.zig diff --git a/src/themes/catppuccin_latte.zig b/core/themes/catppuccin_latte.zig index 259198b4..259198b4 100644 --- a/src/themes/catppuccin_latte.zig +++ b/core/themes/catppuccin_latte.zig diff --git a/src/themes/catppuccin_macchiato.zig b/core/themes/catppuccin_macchiato.zig index 918c3257..918c3257 100644 --- a/src/themes/catppuccin_macchiato.zig +++ b/core/themes/catppuccin_macchiato.zig diff --git a/src/themes/catppuccin_mocha.zig b/core/themes/catppuccin_mocha.zig index fb34a923..fb34a923 100644 --- a/src/themes/catppuccin_mocha.zig +++ b/core/themes/catppuccin_mocha.zig diff --git a/src/themes/clay.zig b/core/themes/clay.zig index ba76ad35..ba76ad35 100644 --- a/src/themes/clay.zig +++ b/core/themes/clay.zig diff --git a/src/themes/dark.zig b/core/themes/dark.zig index e93fd489..e93fd489 100644 --- a/src/themes/dark.zig +++ b/core/themes/dark.zig diff --git a/src/themes/dark_plus.zig b/core/themes/dark_plus.zig index 9c1cb689..9c1cb689 100644 --- a/src/themes/dark_plus.zig +++ b/core/themes/dark_plus.zig diff --git a/src/themes/daybreak.zig b/core/themes/daybreak.zig index e032b994..e032b994 100644 --- a/src/themes/daybreak.zig +++ b/core/themes/daybreak.zig diff --git a/src/themes/doom_one.zig b/core/themes/doom_one.zig index 9db8bdee..9db8bdee 100644 --- a/src/themes/doom_one.zig +++ b/core/themes/doom_one.zig diff --git a/src/themes/doom_one_light.zig b/core/themes/doom_one_light.zig index c95b5c17..c95b5c17 100644 --- a/src/themes/doom_one_light.zig +++ b/core/themes/doom_one_light.zig diff --git a/src/themes/dracula.zig b/core/themes/dracula.zig index 16c6ba43..16c6ba43 100644 --- a/src/themes/dracula.zig +++ b/core/themes/dracula.zig diff --git a/src/themes/dracula_soft.zig b/core/themes/dracula_soft.zig index 9a8d5788..9a8d5788 100644 --- a/src/themes/dracula_soft.zig +++ b/core/themes/dracula_soft.zig diff --git a/src/themes/duckbones.zig b/core/themes/duckbones.zig index c4f86997..c4f86997 100644 --- a/src/themes/duckbones.zig +++ b/core/themes/duckbones.zig diff --git a/src/themes/dusk.zig b/core/themes/dusk.zig index 06f90ab2..06f90ab2 100644 --- a/src/themes/dusk.zig +++ b/core/themes/dusk.zig diff --git a/src/themes/forestbones_dark.zig b/core/themes/forestbones_dark.zig index 11825525..11825525 100644 --- a/src/themes/forestbones_dark.zig +++ b/core/themes/forestbones_dark.zig diff --git a/src/themes/forestbones_light.zig b/core/themes/forestbones_light.zig index e227d6a9..e227d6a9 100644 --- a/src/themes/forestbones_light.zig +++ b/core/themes/forestbones_light.zig diff --git a/src/themes/forge.zig b/core/themes/forge.zig index 0effa742..0effa742 100644 --- a/src/themes/forge.zig +++ b/core/themes/forge.zig diff --git a/src/themes/forge_black.zig b/core/themes/forge_black.zig index f51e8594..f51e8594 100644 --- a/src/themes/forge_black.zig +++ b/core/themes/forge_black.zig diff --git a/src/themes/forge_soft.zig b/core/themes/forge_soft.zig index a0cf141b..a0cf141b 100644 --- a/src/themes/forge_soft.zig +++ b/core/themes/forge_soft.zig diff --git a/src/themes/harvest.zig b/core/themes/harvest.zig index b0ad57c7..b0ad57c7 100644 --- a/src/themes/harvest.zig +++ b/core/themes/harvest.zig diff --git a/src/themes/helix.zig b/core/themes/helix.zig index 61dc8e63..61dc8e63 100644 --- a/src/themes/helix.zig +++ b/core/themes/helix.zig diff --git a/src/themes/ink.zig b/core/themes/ink.zig index 4151df7a..4151df7a 100644 --- a/src/themes/ink.zig +++ b/core/themes/ink.zig diff --git a/src/themes/kanagawabones.zig b/core/themes/kanagawabones.zig index 94e5aab0..94e5aab0 100644 --- a/src/themes/kanagawabones.zig +++ b/core/themes/kanagawabones.zig diff --git a/src/themes/lagoon.zig b/core/themes/lagoon.zig index 66473c46..66473c46 100644 --- a/src/themes/lagoon.zig +++ b/core/themes/lagoon.zig diff --git a/src/themes/lapis.zig b/core/themes/lapis.zig index 95fc86bd..95fc86bd 100644 --- a/src/themes/lapis.zig +++ b/core/themes/lapis.zig diff --git a/src/themes/monokai.zig b/core/themes/monokai.zig index 13e72336..13e72336 100644 --- a/src/themes/monokai.zig +++ b/core/themes/monokai.zig diff --git a/src/themes/monokai_pro.zig b/core/themes/monokai_pro.zig index 46a5d58b..46a5d58b 100644 --- a/src/themes/monokai_pro.zig +++ b/core/themes/monokai_pro.zig diff --git a/src/themes/monokai_pro_classic.zig b/core/themes/monokai_pro_classic.zig index 69f26327..69f26327 100644 --- a/src/themes/monokai_pro_classic.zig +++ b/core/themes/monokai_pro_classic.zig diff --git a/src/themes/monokai_pro_light.zig b/core/themes/monokai_pro_light.zig index ef638731..ef638731 100644 --- a/src/themes/monokai_pro_light.zig +++ b/core/themes/monokai_pro_light.zig diff --git a/src/themes/monokai_pro_light_sun.zig b/core/themes/monokai_pro_light_sun.zig index 2d023deb..2d023deb 100644 --- a/src/themes/monokai_pro_light_sun.zig +++ b/core/themes/monokai_pro_light_sun.zig diff --git a/src/themes/monokai_pro_machine.zig b/core/themes/monokai_pro_machine.zig index 5e4c6885..5e4c6885 100644 --- a/src/themes/monokai_pro_machine.zig +++ b/core/themes/monokai_pro_machine.zig diff --git a/src/themes/monokai_pro_octagon.zig b/core/themes/monokai_pro_octagon.zig index 62bb8c15..62bb8c15 100644 --- a/src/themes/monokai_pro_octagon.zig +++ b/core/themes/monokai_pro_octagon.zig diff --git a/src/themes/monokai_pro_ristretto.zig b/core/themes/monokai_pro_ristretto.zig index 88b1788c..88b1788c 100644 --- a/src/themes/monokai_pro_ristretto.zig +++ b/core/themes/monokai_pro_ristretto.zig diff --git a/src/themes/monokai_pro_spectrum.zig b/core/themes/monokai_pro_spectrum.zig index 3abd67ee..3abd67ee 100644 --- a/src/themes/monokai_pro_spectrum.zig +++ b/core/themes/monokai_pro_spectrum.zig diff --git a/src/themes/neobones_dark.zig b/core/themes/neobones_dark.zig index b0167da2..b0167da2 100644 --- a/src/themes/neobones_dark.zig +++ b/core/themes/neobones_dark.zig diff --git a/src/themes/neobones_light.zig b/core/themes/neobones_light.zig index b24fcef5..b24fcef5 100644 --- a/src/themes/neobones_light.zig +++ b/core/themes/neobones_light.zig diff --git a/src/themes/nord.zig b/core/themes/nord.zig index f74785b3..f74785b3 100644 --- a/src/themes/nord.zig +++ b/core/themes/nord.zig diff --git a/src/themes/nordbones.zig b/core/themes/nordbones.zig index e7ec64b3..e7ec64b3 100644 --- a/src/themes/nordbones.zig +++ b/core/themes/nordbones.zig diff --git a/src/themes/orchard.zig b/core/themes/orchard.zig index b4a35c1f..b4a35c1f 100644 --- a/src/themes/orchard.zig +++ b/core/themes/orchard.zig diff --git a/src/themes/orchard_black.zig b/core/themes/orchard_black.zig index d9e026bd..d9e026bd 100644 --- a/src/themes/orchard_black.zig +++ b/core/themes/orchard_black.zig diff --git a/src/themes/paper.zig b/core/themes/paper.zig index c86482f7..c86482f7 100644 --- a/src/themes/paper.zig +++ b/core/themes/paper.zig diff --git a/src/themes/rose_pine.zig b/core/themes/rose_pine.zig index 8409af9b..8409af9b 100644 --- a/src/themes/rose_pine.zig +++ b/core/themes/rose_pine.zig diff --git a/src/themes/rose_pine_dawn.zig b/core/themes/rose_pine_dawn.zig index 304df52b..304df52b 100644 --- a/src/themes/rose_pine_dawn.zig +++ b/core/themes/rose_pine_dawn.zig diff --git a/src/themes/rose_pine_moon.zig b/core/themes/rose_pine_moon.zig index f90975f1..f90975f1 100644 --- a/src/themes/rose_pine_moon.zig +++ b/core/themes/rose_pine_moon.zig diff --git a/src/themes/rosebones_dark.zig b/core/themes/rosebones_dark.zig index bd3ae169..bd3ae169 100644 --- a/src/themes/rosebones_dark.zig +++ b/core/themes/rosebones_dark.zig diff --git a/src/themes/rosebones_light.zig b/core/themes/rosebones_light.zig index 314424a6..314424a6 100644 --- a/src/themes/rosebones_light.zig +++ b/core/themes/rosebones_light.zig diff --git a/src/themes/seoul256.zig b/core/themes/seoul256.zig index d51ec310..d51ec310 100644 --- a/src/themes/seoul256.zig +++ b/core/themes/seoul256.zig diff --git a/src/themes/seoulbones_dark.zig b/core/themes/seoulbones_dark.zig index 74cdf1ff..74cdf1ff 100644 --- a/src/themes/seoulbones_dark.zig +++ b/core/themes/seoulbones_dark.zig diff --git a/src/themes/seoulbones_light.zig b/core/themes/seoulbones_light.zig index 7b897be5..7b897be5 100644 --- a/src/themes/seoulbones_light.zig +++ b/core/themes/seoulbones_light.zig diff --git a/src/themes/solarium.zig b/core/themes/solarium.zig index 316113eb..316113eb 100644 --- a/src/themes/solarium.zig +++ b/core/themes/solarium.zig diff --git a/src/themes/solarized_dark.zig b/core/themes/solarized_dark.zig index c7c43892..c7c43892 100644 --- a/src/themes/solarized_dark.zig +++ b/core/themes/solarized_dark.zig diff --git a/src/themes/solarized_light.zig b/core/themes/solarized_light.zig index 124d6d59..124d6d59 100644 --- a/src/themes/solarized_light.zig +++ b/core/themes/solarized_light.zig diff --git a/src/themes/spectrum.zig b/core/themes/spectrum.zig index f7c25c3d..f7c25c3d 100644 --- a/src/themes/spectrum.zig +++ b/core/themes/spectrum.zig diff --git a/src/themes/tokyobones_dark.zig b/core/themes/tokyobones_dark.zig index 6a05e456..6a05e456 100644 --- a/src/themes/tokyobones_dark.zig +++ b/core/themes/tokyobones_dark.zig diff --git a/src/themes/tokyobones_light.zig b/core/themes/tokyobones_light.zig index f57287ce..f57287ce 100644 --- a/src/themes/tokyobones_light.zig +++ b/core/themes/tokyobones_light.zig diff --git a/src/themes/tokyonight_day.zig b/core/themes/tokyonight_day.zig index 3d188454..3d188454 100644 --- a/src/themes/tokyonight_day.zig +++ b/core/themes/tokyonight_day.zig diff --git a/src/themes/tokyonight_moon.zig b/core/themes/tokyonight_moon.zig index 04c1bccc..04c1bccc 100644 --- a/src/themes/tokyonight_moon.zig +++ b/core/themes/tokyonight_moon.zig diff --git a/src/themes/tokyonight_night.zig b/core/themes/tokyonight_night.zig index eeb7e5a5..eeb7e5a5 100644 --- a/src/themes/tokyonight_night.zig +++ b/core/themes/tokyonight_night.zig diff --git a/src/themes/tokyonight_storm.zig b/core/themes/tokyonight_storm.zig index 5fadf177..5fadf177 100644 --- a/src/themes/tokyonight_storm.zig +++ b/core/themes/tokyonight_storm.zig diff --git a/src/themes/vimbones.zig b/core/themes/vimbones.zig index 1823c40d..1823c40d 100644 --- a/src/themes/vimbones.zig +++ b/core/themes/vimbones.zig diff --git a/src/themes/zenbones_dark.zig b/core/themes/zenbones_dark.zig index 89f5a934..89f5a934 100644 --- a/src/themes/zenbones_dark.zig +++ b/core/themes/zenbones_dark.zig diff --git a/src/themes/zenbones_light.zig b/core/themes/zenbones_light.zig index 8d5cc2b8..8d5cc2b8 100644 --- a/src/themes/zenbones_light.zig +++ b/core/themes/zenbones_light.zig diff --git a/src/themes/zenburned.zig b/core/themes/zenburned.zig index 3c8baa82..3c8baa82 100644 --- a/src/themes/zenburned.zig +++ b/core/themes/zenburned.zig diff --git a/src/themes/zenwritten_dark.zig b/core/themes/zenwritten_dark.zig index 76b7047e..76b7047e 100644 --- a/src/themes/zenwritten_dark.zig +++ b/core/themes/zenwritten_dark.zig diff --git a/src/themes/zenwritten_light.zig b/core/themes/zenwritten_light.zig index 42e1623a..42e1623a 100644 --- a/src/themes/zenwritten_light.zig +++ b/core/themes/zenwritten_light.zig diff --git a/src/tracy.zig b/core/tracy.zig index 3b0b8621..3b0b8621 100644 --- a/src/tracy.zig +++ b/core/tracy.zig diff --git a/src/tree_sitter_heap.h b/core/tree_sitter_heap.h index 66083be8..66083be8 100644 --- a/src/tree_sitter_heap.h +++ b/core/tree_sitter_heap.h diff --git a/src/tutor.txt b/core/tutor.txt index 5b0fd23d..5b0fd23d 100644 --- a/src/tutor.txt +++ b/core/tutor.txt diff --git a/src/views.zig b/core/views.zig index 3cdbc8aa..ba232ab3 100644 --- a/src/views.zig +++ b/core/views.zig @@ -18,7 +18,7 @@ //! shows when its view is live again. A view drawn out of turn (`drawOne`, //! `within`) is put back after exactly as it was. const std = @import("std"); -const pardes = @import("pardes.zig"); +const pardes = @import("root.zig"); const Pardes = pardes.Pardes; const View = Pardes.View; const Pane = pardes.Pane; diff --git a/src/walk.zig b/core/walk.zig index 0f181cfa..6d7c594d 100644 --- a/src/walk.zig +++ b/core/walk.zig @@ -75,7 +75,7 @@ threadlocal var blobs_out: ?*std.ArrayListUnmanaged([]const u8) = null; /// Every blob of `v` a digest takes as one (`blob_min` bytes and up), as /// its bytes, onto `out` (the C heap's): a replica client's, which knows -/// its blobs by content (src/replica.zig `Have`). +/// its blobs by content (core/replica.zig `Have`). pub fn blobs(comptime T: type, v: *const T, out: *std.ArrayListUnmanaged([]const u8)) void { blobs_out = out; defer blobs_out = null; @@ -304,7 +304,7 @@ fn hashSlice(comptime E: type, items: []const E, h: *Hasher) void { for (items) |*e| hash(E, e, h); } -/// The value as bytes, the same walk: what the tape carries (src/tape.zig), +/// The value as bytes, the same walk: what the tape carries (core/tape.zig), /// to a replica of another build too (a window of a terminal's session, a /// Linux client of a FreeBSD one). Native byte order, which every machine /// pardes runs on shares, and an error by its name: its number is its @@ -825,7 +825,7 @@ pub fn Dump(comptime roots: []const type) type { /// Set: a `.blob`'s bytes (of `blob_min` and up) are not written but /// noted, where they go and what they are; the dump with them put /// back in place is the dump. A replica's join streams them from - /// its writer thread (src/replica.zig), the session's step paying + /// its writer thread (core/replica.zig), the session's step paying /// for the rest alone. deferred: ?*std.ArrayListUnmanaged(Deferred) = null, in_blob: bool = false, diff --git a/dev/gui/gui.zig b/dev/gui/gui.zig index 595e867d..b7698015 100644 --- a/dev/gui/gui.zig +++ b/dev/gui/gui.zig @@ -1350,7 +1350,7 @@ const OwnView = struct { /// `pardes-gui --attach=<where>:<session>`: the window, made as a session's /// is, a replica client of that session (docs/next-daemon.md, "Phase 6: GUI /// replica notes"). Its own core, loaded from the session's dump, applies -/// its input at once (src/replica.zig) and draws its own view; the +/// its input at once (core/replica.zig) and draws its own view; the /// session's units are the truth it rolls back to. The tty's `runClient`, with /// a window for a terminal. fn clientSession(init: std.process.Init, g: *Gui, opts_in: pardes.Options, test_mode: bool, to: Dial) !void { @@ -2467,7 +2467,7 @@ const Shell = struct { upgrade_asked: ?u8 = null, /// This window a replica client of a session elsewhere (`runClient`). client: ?*Client = null, - /// The session's replica clients (src/replica.zig), on sockets: views + /// The session's replica clients (core/replica.zig), on sockets: views /// of their own with no window here. peers: replica.Peers = .{}, /// This wait took only a replica's post (its input, its join): the pump diff --git a/dev/macos/Info.plist b/dev/macos/Info.plist index 3cb2e488..c4141826 100644 --- a/dev/macos/Info.plist +++ b/dev/macos/Info.plist @@ -18,7 +18,7 @@ <string>3</string> <!-- No extension: Launch Services appends .icns and looks in Contents/Resources, where build.zig installs the pardes.icns - src/macos/icon.swift draws. Without this key the Dock shows the blank + dev/macos/icon.swift draws. Without this key the Dock shows the blank generic app even though the icon is sitting right there in the bundle. --> <key>CFBundleIconFile</key> <string>pardes</string> diff --git a/dev/macos/Sources/AppDelegate.swift b/dev/macos/Sources/AppDelegate.swift index dbc0fbc9..767d3766 100644 --- a/dev/macos/Sources/AppDelegate.swift +++ b/dev/macos/Sources/AppDelegate.swift @@ -423,7 +423,7 @@ final class AppDelegate: NSObject, NSApplicationDelegate, PardesViewDelegate { } // Look's operand is the whole tail of the line (executeBuiltinLine in - // src/pardes.zig splits on the first space and trims the rest), so a path + // core/root.zig splits on the first space and trims the rest), so a path // with spaces in it needs no quoting and must not get any — quotes would // become part of the filename. private func look(_ path: String) { run("Look \(path)") } @@ -558,7 +558,7 @@ final class AppDelegate: NSObject, NSApplicationDelegate, PardesViewDelegate { // Exec did something, so it gets .generic, the definite tap of a // committed action; Look went somewhere, so it gets .alignment, the // lighter detent AppKit uses when a dragged guide snaps into place. - // Same distinction the core draws in Haptic (src/pardes.zig). + // Same distinction the core draws in Haptic (core/root.zig). // // No capability check on purpose. perform() is a silent no-op on a Mac // with no Force Touch trackpad and when the user has turned feedback diff --git a/dev/macos/Sources/PardesView.swift b/dev/macos/Sources/PardesView.swift index 23cd0f78..11818e10 100644 --- a/dev/macos/Sources/PardesView.swift +++ b/dev/macos/Sources/PardesView.swift @@ -2,7 +2,7 @@ // CoreGraphics pass per frame back. // // This file keeps no model of the screen. The core owns the grid and hands it -// over whole through src/macos/pardes.h, so everything here is translation, and +// over whole through abi/pardes.h, so everything here is translation, and // the only state worth holding is the font metrics — expensive to measure and // replaced only by Font/TaglineSize/zoom — plus the gesture state remembered // between events: which button a click started with, and how hard it is being @@ -79,7 +79,7 @@ enum Trackpad { static let forceClickButton: pardes_mouse_button_e = PARDES_MOUSE_RIGHT } -// Matches bg_default/fg_default in src/gui/gui.zig. Two shells render the +// Matches bg_default/fg_default in dev/gui/gui.zig. Two shells render the // same core; if these drift, comparing // a screenshot across backends stops meaning anything. let pardesDefaultFG: UInt32 = 0xCC_CC_CC @@ -162,7 +162,7 @@ private func resolve( var bg = decodeColor(cell.bg, ground) // The block cursor is a second reverse, so a cell that is already reversed // cancels back to normal underneath it. Same rule as emitInstance in - // src/gui/gui.zig; the two must not drift. + // dev/gui/gui.zig; the two must not drift. var reverse = block if cell.attrs & UInt16(PARDES_ATTR_REVERSE) != 0 { reverse = !reverse } if reverse { swap(&fg, &bg) } @@ -2537,7 +2537,7 @@ final class PardesView: NSView { } /// What the trackpad actually delivered, under PARDES_LOG — the same - /// variable the Zig side gates its logger on (src/macos.zig). + /// variable the Zig side gates its logger on (runtime/macos.zig). /// /// This is not scaffolding left behind. Which events a trackpad produces is /// decided by the hardware and by four different System Settings switches diff --git a/dev/tui/tui.zig b/dev/tui/tui.zig index df2d0016..142e56bf 100644 --- a/dev/tui/tui.zig +++ b/dev/tui/tui.zig @@ -661,7 +661,7 @@ fn linkReader(gpa: std.mem.Allocator, fd: posix.fd_t, rest: *replica.Framer, loo /// `pardes --attach=<socket>:<session>` (and `<host>:<session>`, through /// ssh, main.zig): this terminal a replica client of a session elsewhere /// (docs/next-daemon.md, "Phase 5 part B notes"). Its own core, loaded -/// from the session's dump, applies its keys at once (src/replica.zig); +/// from the session's dump, applies its keys at once (core/replica.zig); /// the session's units are the truth it rolls back to. Its own view of the /// session is drawn here, as the session draws its terminals'. pub fn runClient(init: std.process.Init, opts: pardes.Options, path: []const u8, session: []const u8, far_link: bool) !void { @@ -1242,7 +1242,7 @@ const Shell = struct { upgrade_asked: ?u8 = null, /// Its pty readers stopped for it: their end of file is not a shell's. upgrading: bool = false, - /// The session's replica clients (src/replica.zig), on sockets. + /// The session's replica clients (core/replica.zig), on sockets. peers: replica.Peers = .{}, /// This wait took only a replica's post (its input, its join): the /// pump after it reads no new time, so it moves nothing the replicas' @@ -1590,7 +1590,7 @@ const Shell = struct { // an RTT later). // Detached, its clients' echo is the frame's after an input: what a // flood says after that goes a unit a frame (their own echo is - // predicted, src/echo.zig), not a unit and a delta a read for a second. + // predicted, core/echo.zig), not a unit and a delta a read for a second. const echo_ns: u64 = if (s.detached()) pardes.frame_ns else std.time.ns_per_s; while (!paced and s.output_seen and !s.input_seen and !s.core.quit and s.test_clock == null) { if (s.input_ns > s.drawn_ns) break; diff --git a/docs/diff-pager-proposals.md b/docs/diff-pager-proposals.md index f75361df..2edb950a 100644 --- a/docs/diff-pager-proposals.md +++ b/docs/diff-pager-proposals.md @@ -52,7 +52,7 @@ pager at the top of the work tree even when run from a subdirectory (checked), so `<cwd>` is already the base git's repository-relative paths need. -A pane that is a diff is read by `src/diff.zig`. It is already at delta's +A pane that is a diff is read by `core/diff.zig`. It is already at delta's level, or past it: - A hunk's end comes from its `@@` counts, as patch reads it, so a removed @@ -122,7 +122,7 @@ delta's marks exist because less cannot search by structure. In pardes in a diff pane's tag. Or an `Index` exec writes a +Index pane with one line per file or hunk, each a look: - @p12:345 src/look.zig +12 -3 + @p12:345 core/look.zig +12 -3 ### E. A diff you can act on diff --git a/docs/ghostty-macos-notes.md b/docs/ghostty-macos-notes.md index 3974d0d8..830d4b1f 100644 --- a/docs/ghostty-macos-notes.md +++ b/docs/ghostty-macos-notes.md @@ -30,7 +30,7 @@ constant with no Zig tag. This is the single most transferable thing in the repository, it costs about ten lines of build plumbing, and it runs on Linux. pardes now does the same thing in -`src/macos.zig`, extended to compare exported function arity and scalar widths as +`runtime/macos.zig`, extended to compare exported function arity and scalar widths as well, because a hand-written header drifts in signatures too. ## Zig→host is one callback, not N @@ -56,7 +56,7 @@ comptime { The payoff is that adding a feature adds an enum case, not a struct field: hosts that do not implement it return `false` and the ABI never changed. Worth copying the day a fixed callback list starts growing. pardes has three callbacks today -— `wakeup`, `set_clipboard`, `read_clipboard` (`Runtime` in `src/macos.zig:153`) +— `wakeup`, `set_clipboard`, `read_clipboard` (`Runtime` in `runtime/macos.zig:153`) — and does not need it yet. Two userdata scopes, worth noting: the runtime struct's `userdata` is @@ -102,7 +102,7 @@ there Swift owns an `MTKView` and passes a command buffer *into* Zig (`ghostty_inspector_metal_render`, `macos/Sources/Ghostty/Surface View/InspectorView.swift:417`). pardes inverts this deliberately — see `docs/macos.md`. The short version: a -terminal grid rendered by a hand-written Metal atlas is what `src/gui/gui.zig` +terminal grid rendered by a hand-written Metal atlas is what `dev/gui/gui.zig` already spends thousands of lines on, and a cell grid is exactly what CoreText draws natively. diff --git a/docs/helix-keys.md b/docs/helix-keys.md index 86c50722..f3dd2dc3 100644 --- a/docs/helix-keys.md +++ b/docs/helix-keys.md @@ -20,21 +20,21 @@ injected `comment` layer) touches the editing code, and it needs tree-sitter, which the harness runs without. Code map, by SYMBOL — line numbers rot, names do not. Body-normal key -RECOGNITION is `modal.Normal` in `src/modal.zig`: a state machine over `Role` (one -per bound command, named as `src/config.zig` binds it and matched against its -chord lists by `normalInput` in `src/normal.zig`), the pending prefix and `m` +RECOGNITION is `modal.Normal` in `core/modal.zig`: a state machine over `Role` (one +per bound command, named as `core/config.zig` binds it and matched against its +chord lists by `normalInput` in `core/normal.zig`), the pending prefix and `m` sub-key (each the role of the key read) and a count, emitting an `Action`: the role and what it was given (a count, a literal, `]` or `[`). The roles are grouped by the context a key is read in and tried in their order there. The text's executor (`executeNormalAction`) and a PDF's (`pdf_view.applyNormal`) both switch on the role. It knows nothing about panes or text. Then it is -EXECUTED: `Key` and `handleKey` in `src/pardes.zig` (intercept order is +EXECUTED: `Key` and `handleKey` in `core/root.zig` (intercept order is load-bearing, see the comment there); `handleNormal` (parses directly into `Pane.normal`), `executeNormalAction`, `replaySels` and `multiOnce` in -`src/normal.zig`; and `enterInsert`, `handleInsert` / `insertKey`, `insertTab`, -`normalDelete`, `normalYank`, `pasteText`, `normalChange` in `src/edit.zig`. Undo +`core/normal.zig`; and `enterInsert`, `handleInsert` / `insertKey`, `insertTab`, +`normalDelete`, `normalYank`, `pasteText`, `normalChange` in `core/edit.zig`. Undo and redo live in `panes.File` and `panes.Terminal`. Pure text math: -`src/modal.zig` (the `hx*` family is the helix-semantics layer: gap offsets + +`core/modal.zig` (the `hx*` family is the helix-semantics layer: gap offsets + ranges over the flat text). Differential harness: `test/hxdiff.zig` + `test/hxcases/*.jsonl` — see "Differential testing" at the bottom. @@ -117,7 +117,7 @@ language-backend queries, and the shell pipe. | `zm` | scroll the unwrapped view so the cursor's column is in its middle | helix `align_view_middle`; with soft wrap on there is no horizontal scroll, and nothing happens | out of corpus (the harness's text never scrolls sideways) | | `i` `a` | insert at selection start / after selection end | helix semantics: `i` before the selection, `a` selects and appends after it | helix-verified | | `I` `A` | insert at first non-ws / line end | matches `insert_at_line_start` / `insert_at_line_end` | helix-verified | -| `o` `O` | open line below / above, with helix's indent from the syntax tree where the file's grammar has an indent query (src/indent.zig, as Enter), else the current line's indent as it is (acme's autoindent, tabs and all); `<n>o` opens n | `open_below`/`open_above`, except that helix's no-language fallback rounds the indent down to whole units: under its 4-space unit, two spaces open a line with none (waiver `o-partial-indent-drops`) | helix-verified (whole units) / pardes-specific (partial) | +| `o` `O` | open line below / above, with helix's indent from the syntax tree where the file's grammar has an indent query (core/indent.zig, as Enter), else the current line's indent as it is (acme's autoindent, tabs and all); `<n>o` opens n | `open_below`/`open_above`, except that helix's no-language fallback rounds the indent down to whole units: under its 4-space unit, two spaces open a line with none (waiver `o-partial-indent-drops`) | helix-verified (whole units) / pardes-specific (partial) | | `v` | select (extend) mode: motions extend from the fixed anchor; `v` again exits KEEPING the selection | mode "select" is reported only while this is on (helix keeps mode normal for x/%/mi selections) | helix-verified | | `x` / `<n>x` | select current line / extend one (n) line(s) down, char-range through the newline, cursor ON the `\n` | col-0 vim-ism removed (phase 5); matches `extend_line_below`, mode stays normal | helix-verified | | `d` | delete selection (implicit or explicit); bare cursor = the 1-wide selection | always yanks (`Alt-d` noyank in B); terminals: drops typed runs only | helix-verified | @@ -137,11 +137,11 @@ language-backend queries, and the shell pipe. | `Space` (normal, body) | starts the pardes LEADER: a key path runs the same builtin words used by tags and the topbar. The main groups are `f` files, `h` docs, `c` columns, `t` toggles/effects, `a` panel animations, `s` session, `j` jumps, `l` language, and `w` directional focus; `SPC ?` lists every path and `<prefix> ?` lists one group in `+Help`. Neither `Exit` (quits the editor, acme's Exit) nor `Kill` (stops the commands pardes typed into terminals, acme's Kill) has a leader path: both are the topbar's and the root `ctl`'s. The pending path appears on the active pane's transient body/message row. Esc or an unmapped key abandons it. Paths, Help rows, and dispatch are all generated from the builtin registry at comptime; the leader applies only to a BODY in normal mode because tags and tty programs own their input | pardes-specific; helix spends Space on pickers/LSP (section C), while pardes uses acme-style executable words | | `SPC y` `SPC Y` `SPC p` `SPC P` `SPC R` | helix's clipboard menu on helix's own letters: yank the selection to the system clipboard (`ClipYank`) or the PRIMARY selection alone (`ClipYankMain`), paste the system clipboard after (`ClipPaste`) / before (`ClipPasteBefore`) the selection, replace the selection with it (`ClipReplace`) | the same as `"+y`, `"+p`, `"+P`, `"+R`: register `+` (and `*`) IS the desktop's clipboard, the only register that reaches it. `SPC y` writes `+` alone, as helix's does, not the default register too. Builtins rather than bare chords because a leader path names a builtin: they land in Help's index and are executable words like every other verb. The clipboard holds one text, so N values go out joined by newlines, as helix sends them. On a tty the write is OSC 52 out and the READ is OSC 52 back, which many terminals refuse or gate — so `SPC y` works there and `SPC p` can be a no-op | out of corpus | | a paste from the OUTER terminal | one `Event.paste`, spliced in at the cursor | the tui shell enables bracketed paste and coalesces `paste_start`..`paste_end` into a single event; before that the bytes arrived as individual key presses and normal mode RAN them, which is how a pasted `d` deleted a line. The bytes deliberately never enter the yank register — clipboard and default register are separate stores in both directions | pardes-specific | -| `/` (a text) | a query pane under the pane (`src/Query.zig`): a `+Search` whose line 1 is the query, typed into; helix's regex with smart case, every match tinted and ticked on the rail as you type (the pane's places, `src/Places.zig`), the first after the cursor selected (helix's incremental preview). `Ctrl-n`/`Ctrl-p` step while typing; Enter lands, fills `/` and keeps the rows as text; Esc while typing restores the text and closes the pane. Line 1's first word names the source (`/`, `Find`, `Grep`, `Recent`, `Panes`, `Symbols`, `All`, `Refs`, `Def`, `Impl`, `Diagnostics`), helix's pickers as one pane. A terminal's and a PDF's `/` keep the notice-band prompt and its `+Search` | helix's `/` semantics (regex, smart case, preview); the pane is pardes' | pardes-specific | +| `/` (a text) | a query pane under the pane (`core/Query.zig`): a `+Search` whose line 1 is the query, typed into; helix's regex with smart case, every match tinted and ticked on the rail as you type (the pane's places, `core/Places.zig`), the first after the cursor selected (helix's incremental preview). `Ctrl-n`/`Ctrl-p` step while typing; Enter lands, fills `/` and keeps the rows as text; Esc while typing restores the text and closes the pane. Line 1's first word names the source (`/`, `Find`, `Grep`, `Recent`, `Panes`, `Symbols`, `All`, `Refs`, `Def`, `Impl`, `Diagnostics`), helix's pickers as one pane. A terminal's and a PDF's `/` keep the notice-band prompt and its `+Search` | helix's `/` semantics (regex, smart case, preview); the pane is pardes' | pardes-specific | | `n` / `N` | next / previous match of the text's places when a query pane fed them (a `/`, a list's places in this text: refs, diagnostics, a Grep's hits), round the ends without a message; else the last search register's regex in the current text, as before; counts repeat | only the primary selection is replaced; in select mode each match is added and becomes primary. Named registers work. `*` sets the pattern from selections with word boundaries (`Alt-*` without) and seeds the text's query pane with it, the keyboard staying. The former Look ring is `LookNext` / `LookPrev`, `SPC j n` / `SPC j p`. PDFs retain their location-result navigation | helix-verified | | insert: printable text | file: real edit; terminal: typed run splice | | helix-verified (file) | -| insert: `Enter` | newline; where the file's grammar has an indent query (vendor/queries/*/indents.scm), helix's `indent_for_newline` over the syntax tree (src/indent.zig, the reference's containment engine, `hybrid` heuristic); else keeps the current line's indent as it is and adds one 4-space logical tab (a tab where the indent is tabs) when the text before the cursor ends in `(`, `[`, `{`, or `)` (including `})`). Between a pair (helix's default auto-pairs) the closer gets a line of its own at that indent and the cursor one a level in (`insert_newline`'s `on_auto_pair`) | plain lines match `insert_newline` at whole indent units (helix drops a partial one, as for `o`); delimiter heuristic is pardes-specific; with a grammar, `test/hxcases/indent.jsonl` against the reference `hx` and its grammars (`hx_indent.py`) | helix-verified (plain, grammar) / pardes-specific (partial indent, delimiter) | +| insert: `Enter` | newline; where the file's grammar has an indent query (vendor/queries/*/indents.scm), helix's `indent_for_newline` over the syntax tree (core/indent.zig, the reference's containment engine, `hybrid` heuristic); else keeps the current line's indent as it is and adds one 4-space logical tab (a tab where the indent is tabs) when the text before the cursor ends in `(`, `[`, `{`, or `)` (including `})`). Between a pair (helix's default auto-pairs) the closer gets a line of its own at that indent and the cursor one a level in (`insert_newline`'s `on_auto_pair`) | plain lines match `insert_newline` at whole indent units (helix drops a partial one, as for `o`); delimiter heuristic is pardes-specific; with a grammar, `test/hxcases/indent.jsonl` against the reference `hx` and its grammars (`hx_indent.py`) | helix-verified (plain, grammar) / pardes-specific (partial indent, delimiter) | | insert: `Backspace` (+ `Shift-Backspace`) | delete prev char, joins lines at col 0; in a line's leading blanks, back to the previous 4-column indent stop (a whole unit when on one; a tab still goes alone) | matches `delete_char_backward` and its dedent; `Ctrl-h` alias in B | helix-verified | | insert: `Up` `Down` `Left` `Right` | move cursor | matches helix's "not recommended" insert arrows | helix-verified | | `gd` `gD` `gy` `gi` `gr` | LSP definition / declaration / type-definition / implementation / references. One answer jumps straight there; several (definition, implementation, references) fill the text's query pane, line 1 `Def`/`Impl`/`Refs`, their places in the text tinted and stepped by `n`/`N`; the others fill `+Search`, where `LookNext` / `LookPrev` walk and Enter opens | Ctrl+left-click is the mouse spelling of `gd`; language support depends on the configured backend | out of corpus | @@ -271,7 +271,7 @@ with what is on screen. Pressed in a tag, column tag or workspace tag they select in that tag's own text, and so does `|` pipe it; `/` searches the body wherever it is pressed (`Pane.prompt_for`). Engine: **mvzr** (`build.zig.zon`), a bytecode VM that compiles a runtime pattern with no allocator, called the way sam searches -(`src/regexp.zig`, shared with a pane's `addr` file): each line is its own +(`core/regexp.zig`, shared with a pane's `addr` file): each line is its own haystack, so `^` and `$` match at every line's start and end and `.` never crosses a newline, and a pattern naming `\n` runs over the whole selection. Where helix's `^` is only the selection's start, this is sam's. mvzr @@ -285,8 +285,8 @@ keeps the matches it found so far. | `S<pat>` Enter | split each range on its matches | helix `split_on_matches`; the pieces BETWEEN the matches, including the empty one a leading match produces | helix-verified | | `s`/`S` then Esc | back to the selection the prompt opened on | the empty pattern applies nothing, so cancelling IS the restore — one path, not a second one | helix-verified | | an all-lowercase pattern | matches case-blind | helix's smart-case. mvzr has no such flag, so the surface is lowercased instead (ASCII folding is byte-for-byte, so the offsets are identical) | helix-verified | -| `^` and `$` | hold at every line's start and end | helix compiles with `multi_line(true)`; pardes gets the same by searching each line as its own haystack (`src/regexp.zig`) | helix-verified | -| `.` | never matches a newline | as the Rust regex crate: a pattern without `\n` searches line by line, and one that names `\n` has its `.`s made `[^\n]` (`src/regexp.zig`) | helix-verified | +| `^` and `$` | hold at every line's start and end | helix compiles with `multi_line(true)`; pardes gets the same by searching each line as its own haystack (`core/regexp.zig`) | helix-verified | +| `.` | never matches a newline | as the Rust regex crate: a pattern without `\n` searches line by line, and one that names `\n` has its `.`s made `[^\n]` (`core/regexp.zig`) | helix-verified | | `\s`, `[^...]` | never match a newline unless the pattern names `\n` | the same line-by-line search; helix's `\s` and negated classes do match one, so its `S\s+` also splits at every newline, the last line's too, where pardes keeps a newline inside its piece unless the pattern is `\s+\|\n` (waivers `split-regex-ws`, `split-regex-ws-tty`) | pardes-specific | | many matches | up to `memory.limits.selections` ranges, 1024; matches past it are dropped | helix has no limit. The room for them is allocated when a second range appears and given back at one range, so a single cursor costs nothing | helix-verified up to the limit | | `K<pat>` / `Alt-K<pat>` Enter | keep only the ranges a match starts inside / only those none does; primary 0, and keeping none leaves the selection alone | helix `keep_selections` / `remove_selections`, on the same prompt as `s`/`S` (markers `Keep /`, `Remove /`). The range is searched as `s` searches it, line by line with its lines' context, where helix matches the range's text alone: a `^` right at a range that starts mid-line matches in helix and not here | helix-verified | @@ -300,7 +300,7 @@ keeps the matches it found so far. | … with mixed indents | the token goes in at the SHALLOWEST indent in the set | helix's `min`, quirks included: a deeper line is commented mid-whitespace | helix-verified | | … uncommenting | one space after the token goes too, unless some line lacks it | helix's `margin` | helix-verified | | … blank lines | skipped entirely, and they do not vote on commented-or-not | helix | helix-verified | -| which token | by file EXTENSION, from `config.comment_tokens` | the same notion of "language" `src/syntax.zig` picks grammars with. No extension (a terminal, an output buffer) or an unlisted one gets `config.comment_token_default` = `#`, which is helix's own `DEFAULT_COMMENT_TOKEN` and therefore what the oracle answers | helix-verified | +| which token | by file EXTENSION, from `config.comment_tokens` | the same notion of "language" `core/syntax.zig` picks grammars with. No extension (a terminal, an output buffer) or an unlisted one gets `config.comment_token_default` = `#`, which is helix's own `DEFAULT_COMMENT_TOKEN` and therefore what the oracle answers | helix-verified | | block comments (`/* */`) | **skipped**: helix only reaches them when a language declares block tokens and no line tokens; every language in the table has a line comment | ### Match mode (`m` prefix) — plain-text, no tree-sitter diff --git a/docs/lsp-evaluation.md b/docs/lsp-evaluation.md index 8f7c0266..b7916ef6 100644 --- a/docs/lsp-evaluation.md +++ b/docs/lsp-evaluation.md @@ -1,6 +1,6 @@ # Three language backends, measured -Same core, same seam (`src/lsp/lsp.zig`), same harness (`zig build lspbench`) +Same core, same seam (`core/lsp/lsp.zig`), same harness (`zig build lspbench`) over the same corpus — 17 probes at the time, 22 today. Three jj workspaces, three independent implementations, one function each. C landed first and went in 0.6; the tree has B's kind of client alone, for every language. See @@ -11,7 +11,7 @@ went in 0.6; the tree has B's kind of client alone, for every language. See > because renumbering a comparison nobody can re-run turns a record into a > guess. What has moved since, re-checked 2026-08-26: `lspbench` now has **22** > probes rather than 17 (the dot-completion work added five), -> `src/lsp/lsp_zls.zig` had grown from 540 lines to **1 432** (1 522 when it +> `core/lsp/lsp_zls.zig` had grown from 540 lines to **1 432** (1 522 when it > went, 2026-09-29), > `test/snapshots/` holds **95** scripts rather than 56 (`.snap` + `.golden` > pairs), and the differential suites are `hxdiff` **481** (`cases.jsonl`) and @@ -101,9 +101,9 @@ real binary through the helix keymap, and pass `hxdiff` (360) and `hxparity` ## Decision **One protocol client, for every language, Zig's included.** C landed first -(`src/lsp/lsp_zls.zig`, ZLS a fetched dependency pinned in `build.zig.zon`). +(`core/lsp/lsp_zls.zig`, ZLS a fetched dependency pinned in `build.zig.zon`). The multi-language argument below won on 2026-09-01, when a protocol client, -`src/lsp/lsp_client.zig`, arrived beside it, and on 2026-09-29 (change +`dev/lsp/lsp_client.zig`, arrived beside it, and on 2026-09-29 (change `kvlpprms`, released in 0.6) the in-process backend went: Zig files ask a `zls` found on `PATH` as every other language asks its server, the ZLS source and its build wiring left the tree, and the binaries shrank (ReleaseFast @@ -131,7 +131,7 @@ A (`nvqpknzm`), B (`stuurqqt`) and C's last state (the parent of **2026-11-05: an index first, the server second.** The words ask the nearest `index.scip` above the file (SCIP, scip-code.org: a protobuf file an indexer writes at the project's root) before any server: -`src/lsp/Scip.zig` reads it, about 350 lines with its tests, keeping each +`dev/lsp/Scip.zig` reads it, about 350 lines with its tests, keeping each document's occurrences and each symbol's information in a fixed region (an index of 512 MiB at most, its tables 512 MiB, two indexes at once). Def, type definition, Refs, SelectRefs, `gi`, Subtypes, Supertypes, Symbols, @@ -158,7 +158,7 @@ second process, and its weakest number is a cache that does not exist rather than a limit that cannot be lifted. The one thing that should override that: **pardes ships tree-sitter grammars for -28 languages** — `src/grammar_manifest.zig`'s `all` has 29 entries, but +28 languages** — `core/grammar_manifest.zig`'s `all` has 29 entries, but `markdown_inline` carries `.exts = &.{}` on purpose: no filename ever selects it, and the block grammar re-enters it by name for its `inline` nodes. So 29 grammars, 28 buffers a language server could ever be asked about. C is diff --git a/docs/macos.md b/docs/macos.md index 17294520..44b77d67 100644 --- a/docs/macos.md +++ b/docs/macos.md @@ -2,7 +2,7 @@ Zig owns the core, the ptys, every effect and the worker threads. Swift owns `NSApplication`, the window, input translation, and drawing. They meet at a -hand-written C ABI, `src/macos/pardes.h`, built as a static library that the app +hand-written C ABI, `abi/pardes.h`, built as a static library that the app links; the Swift half is ordinary AppKit that pumps events in and reads one packed cell buffer out. There is exactly one core per process, so the ABI has no handles — the state is a file-scoped singleton and every function names it @@ -32,8 +32,8 @@ Pardes goes the other way because its frame is *already* a cell grid. draw one: attributed runs, the system font stack, and Apple's own subpixel and color-emoji handling, for free. The alternative is a hand-rolled glyph atlas, and the SDL backend is the measurement of what that costs — a large part of -`src/gui/gui.zig`'s 6,348 lines is a 2048² FreeType-hinted R8 atlas (`atlas_w` -and `atlas_h`, `src/gui/gui.zig:140`), GPU pipelines, transfer buffers and +`dev/gui/gui.zig`'s 6,348 lines is a 2048² FreeType-hinted R8 atlas (`atlas_w` +and `atlas_h`, `dev/gui/gui.zig:140`), GPU pipelines, transfer buffers and shaders. Writing a second one, blind, buys nothing the grid needs. Blind is the operative word: this backend was scaffolded on a Linux machine. A @@ -68,18 +68,18 @@ the glyph. IO stays on the Zig side: macOS has `forkpty`, `read` and `write` right there, so almost no effect crosses the boundary at all: `pardes_tick` runs -`while (core.nextEffect()) |e| core.perform(e)` (`src/macos.zig:1154`) and each +`while (core.nextEffect()) |e| core.perform(e)` (`runtime/macos.zig:1154`) and each effect lands on this host's own `Host.VTable`, of whose twenty-one methods -fourteen are filled in (`src/macos.zig:1761`). +fourteen are filled in (`runtime/macos.zig:1761`). The machine-local half of those methods is no longer this file's. `forkShell`, -`writeFileBytes` and `writeFd` live in `src/host_io.zig` and are shared with -the tui shell and the SDL shell; `src/macos.zig` calls +`writeFileBytes` and `writeFd` live in `dev/host_io.zig` and are shared with +the tui shell and the SDL shell; `runtime/macos.zig` calls them (`:1807`, `:1823`, `:1848`, `:1863`) and its own copies, together with the four `extern "c"` declarations they needed (`forkpty`, `execv`, `chdir`, `_exit`), are gone. Two `extern "c"` declarations remain here: `setenv`, and `pardes_host_watch_file`, which FileWatcher.swift satisfies -(`src/macos.zig:40`, `:45`). The bug all four hosts' private `forkShell` +(`runtime/macos.zig:40`, `:45`). The bug all four hosts' private `forkShell` copies had in common is the argument for the shared file existing: none set `FD_CLOEXEC` on the pty master, so a program in one pane could read and write another pane's @@ -117,7 +117,7 @@ full mask is passed anyway to keep the signature whole. `pardes_scroll` carries fractional row and column deltas from a trackpad; the Zig side accumulates each axis separately and synthesizes whole `wheel_up`/`wheel_down`/`wheel_left`/`wheel_right` presses, because the core -scrolls on button events. `src/gui/gui.zig` (`takeScrollTicks`) does +scrolls on button events. `dev/gui/gui.zig` (`takeScrollTicks`) does exactly this already. A real mouse notch skips the smoothing and goes through `pardes_mouse`. `pardes_rotate` is the same shape for a two-finger twist, spent as `n`/`N` — see the trackpad section. @@ -142,7 +142,7 @@ pasteboard", with no payload either way, because the host answers by calling `pardes_paste` — and NSPasteboard being synchronous, that usually happens inside the callback itself, before it returns. Both are main thread, inside `pardes_tick`. There is no `open_url` callback because the core already opens -links itself through `/usr/bin/open` (`src/look.zig`), and no file callbacks +links itself through `/usr/bin/open` (`core/look.zig`), and no file callbacks because it owns the filesystem side too. **Lifecycle.** `pardes_init` returns 0 or an opaque nonzero code, @@ -156,7 +156,7 @@ Ordinary input and pty pumps never count as elapsed animation frames. The ordering contract is the part a header cannot enforce. **Init with the real grid size.** The core defers each integrated shell's greeting until it has seen -a resize: `sync()` in `src/pardes.zig` only emits the opening `ls` once +a resize: `sync()` in `core/root.zig` only emits the opening `ls` once `resize_count > 0` and parsed OSC 133 B says the prompt has handed the cursor to input. An unintegrated shell has no reliable readiness signal, so it skips the cosmetic greeting; an explicit command still releases after its successful @@ -484,7 +484,7 @@ has none: compares each member's `proc_pidpath` against the shell's own. A nested interactive shell is therefore still a prompt, and `bash -c 'sleep 30'` is still taken — the wrapper wears the shell's binary, but `sleep` shares its - group. The occupancy suite in `src/host_io.zig` runs on both platforms. + group. The occupancy suite in `dev/host_io.zig` runs on both platforms. ## Fonts and zoom @@ -493,7 +493,7 @@ reached differently on purpose. `Font <name>` and the `Fonts` picker are ordinary core builtins, enabled by `pardes.font_picker` — the frontends that draw their own text, which is now the -SDL shell and this one. `src/fonts.zig` moved out of `gui/` for that reason. It +SDL shell and this one. `dev/fonts.zig` moved out of `gui/` for that reason. It walks the platform's font directories and reads four small sfnt tables per file to decide whether every glyph has the same advance; no fontconfig and no CoreText, so both shells agree about which faces exist and disagree only about @@ -853,10 +853,10 @@ already do (`install_app_bin`, `install_plist`, `install_scene_kernel`, `install_icon`). - **The plist.** `plutil -replace LSMinimumSystemVersion` reads the committed - `src/macos/Info.plist` and writes a stamped copy into the cache. The source + `dev/macos/Info.plist` and writes a stamped copy into the cache. The source file is never mutated, which is what the old in-place `PlistBuddy` call did. - **The icon.** The mark is **Glenda**, the Plan 9 rabbit — pardes is an acme, - and acme is Plan 9's. `src/macos/icon.swift` is compiled alone (it is + and acme is Plan 9's. `dev/macos/icon.swift` is compiled alone (it is top-level code: one file, one module) and run with the bundle's `Resources` as its output directory. She is *drawn*, not traced: four overlapping ellipses filled as one path under nonzero winding for the silhouette, three @@ -886,9 +886,9 @@ already do (`install_app_bin`, `install_plist`, `install_scene_kernel`, ```sh swiftc <-O|-Osize|-Onone> -target <arch>-apple-macos13.0 \ - -import-objc-header src/macos/pardes.h \ + -import-objc-header abi/pardes.h \ -o <cache>/pardes \ - src/macos/Sources/{main,AppDelegate,PardesView,ScenePostprocessor,FileWatcher}.swift \ + dev/macos/Sources/{main,AppDelegate,PardesView,ScenePostprocessor,FileWatcher}.swift \ <cache>/libpardes.a -lc++ \ -framework AppKit -framework CoreText -framework CoreGraphics \ -framework CoreImage -framework Metal @@ -946,9 +946,9 @@ it goes. **The Linux dev loop.** The Zig half of this backend is plain POSIX, and most of it is no longer even this backend's: `forkShell`, `writeFileBytes` and -`writeFd` are `src/host_io.zig`'s, byte-identical on both systems, and what is +`writeFd` are `dev/host_io.zig`'s, byte-identical on both systems, and what is left that differs is `ioctl(TIOCSWINSZ)` (absent from `std.c.T` on darwin), -`/usr/bin/open` against `/usr/bin/xdg-open` (`src/look.zig:33-37`), and libproc +`/usr/bin/open` against `/usr/bin/xdg-open` (`core/look.zig:33-37`), and libproc against `/proc`. So `-Dplatform=macos` compiles on a Linux host, and its tests run there: @@ -962,7 +962,7 @@ functions precisely so that "how many notches is a 180° twist" is answerable on a machine with no trackpad in it. The header is kept honest with ghostty's trick. `build.zig` runs `translate-C` -over `src/macos/pardes.h` into the unit-test build, and `src/macos.zig` +over `abi/pardes.h` into the unit-test build, and `runtime/macos.zig` asserts every constant and every struct layout against the Zig side — the color tags, the attribute bits, the key codepoints, the mouse, modifier and haptic ordinals, `@sizeOf(pardes_cell_s)` and each field offset. A hand-written header @@ -1099,7 +1099,7 @@ used for the table and is not folded into the direct-path claim. `lsp`, one more response type. - **Detached sessions.** `Detach` (`SPC s D`), `Adopt` and `Upgrade` are compiled into the tui's and the window's builds alone (`enabled` is - `pardes.can_attach`, `src/builtins.zig`), and there is no daemon on macOS + `pardes.can_attach`, `core/builtins.zig`), and there is no daemon on macOS (`daemon.supported` is Linux and FreeBSD): this build's session is the one process it started, and closing it ends it. The `Attach` word and `src/detached/` it went through are gone (`docs/next-daemon.md`, "Phase 3 @@ -1125,7 +1125,7 @@ used for the table and is not folded into the direct-path claim. which is not where the time is, so the escalation is still not warranted. When it is, it is ghostty's: a `CAMetalLayer` installed into the view and driven from Zig, with the ABI growing one `platform` pointer field. -- **A Tahoe icon asset.** `src/macos/icon.swift` emits a full-colour `.icns`, +- **A Tahoe icon asset.** `dev/macos/icon.swift` emits a full-colour `.icns`, every one of the ten sizes, and that is the correct and only format at a 13.0 deployment target. macOS 26's Dock defaults to the `ClearAutomatic` icon style, which desaturates any icon that does not ship the new appearance diff --git a/docs/next-daemon.md b/docs/next-daemon.md index 382b3098..d93cbbea 100644 --- a/docs/next-daemon.md +++ b/docs/next-daemon.md @@ -60,7 +60,7 @@ smallest common grid across them. - **Processes.** - The daemon is subreaper, spawner, fd holder, registry and 9P root. *Built otherwise:* fd holder and registry only, and the switchboard of - the replica socket; no subreaper, no spawner, no 9P (`src/daemon.zig` + the replica socket; no subreaper, no spawner, no 9P (`runtime/daemon.zig` "It spawns nothing and is nobody's parent"). - Every session is a child of the daemon: a GUI window, a tty session behind a stub, or a headless session. *Built otherwise:* none is; a @@ -115,7 +115,7 @@ smallest common grid across them. metadata. Blobs are pinned rather than copied. A file's text and its line index are neither: an edit writes them in place, and the copy's allocator notes what each write into one that was there took out, which - a rollback writes back, the newest first (src/rollback.zig `wrote`). + a rollback writes back, the newest first (core/rollback.zig `wrote`). - On a divergence it restores that copy, then replays the confirmed events and its own pending ones. - The authority never rolls back. @@ -203,7 +203,7 @@ open. ## Phase 3 notes -Built 2026-10-29 (`src/daemon.zig`, the tty and GUI hosts, `main.zig`). +Built 2026-10-29 (`runtime/daemon.zig`, the tty and GUI hosts, `main.zig`). Decisions taken at the forks, with the ponytail lens: - **Sessions are not the daemon's children; every one registers.** The @@ -308,7 +308,7 @@ child; `std.posix.tcgetattr` (an ioctl on that layout) is the right one. a view is indexed now, and a second local terminal or window is a replica client; the in-process extra views described here are gone.) -Built 2026-10-29 (`src/views.zig`, the tty and GUI hosts, `daemon.zig`, +Built 2026-10-29 (`core/views.zig`, the tty and GUI hosts, `daemon.zig`, the snapshot harness and the monkey). Decisions taken at the forks, with the ponytail lens: @@ -644,7 +644,7 @@ Everything of ours lives in `/root/pardes-test`, nothing outside it. ## Phase 1 notes -Built 2026-10-29 (`src/walk.zig`, `src/tape.zig`, the hooks across the +Built 2026-10-29 (`core/walk.zig`, `core/tape.zig`, the hooks across the core; `pardes-snap --tape`, `pardes-monkey --tape`, `zig build replay`). Decisions taken at the forks, with the ponytail lens: @@ -790,7 +790,7 @@ thread start in the render). ## Tty throughput notes -Found and fixed 2026-10-29 (`src/tui/tui.zig`, `waitInput`). +Found and fixed 2026-10-29 (`dev/tui/tui.zig`, `waitInput`). - **What the 1 GB `yes` cell measures is mostly the kernel.** A pty's output processing (ONLCR, a `\n` made `\r\n`) costs the writer about @@ -982,7 +982,7 @@ against that tty, is the Tty throughput notes' keystroke-to-present. ## Phase 5 groundwork notes Built 2026-10-29: the delay relay (`test/delay_relay.py`), the replica -socket (`src/daemon.zig`, `src/detached/wire.zig`), and two measurements +socket (`runtime/daemon.zig`, `src/detached/wire.zig`), and two measurements for open points 3 and 5 (`zig build rollback-bench`, which runs `test/rollback_bench.zig`, and `test/fork_stall.py`). Decisions taken at the forks, with the ponytail lens: @@ -1175,14 +1175,14 @@ What proved wrong in the design: ## Phase 5 part A notes Built 2026-10-29, in one process and with no transport: the rollback copy -(`src/rollback.zig`), the replica engine (`src/replica.zig`), the tape's -speculation mode (`src/tape.zig`), and an in-process harness +(`core/rollback.zig`), the replica engine (`core/replica.zig`), the tape's +speculation mode (`core/tape.zig`), and an in-process harness (`test/replicas.zig`, `zig build replicas`). `zig build rollback-bench` now times the real copy. Decisions taken at the forks, with the ponytail lens: - **The copy saves bytes and puts them back where they were.** Its walk - is the digest's (src/walk.zig): views, buffers, registers, counters and + is the digest's (core/walk.zig): views, buffers, registers, counters and terminal metadata. It saves the bytes of every allocation the walk reaches, and puts each back over its allocation. That works because the replica core's allocator (`rollback.Epoch`) changes three things while @@ -1220,7 +1220,7 @@ lens: and their answers, digests aside), the head goes: that is the fast path. The digests are left out of the comparison because the starting states are equal by induction. A digest checks every unit a replica replays. -- **Each client has its own view** (src/views.zig). The authority goes +- **Each client has its own view** (core/views.zig). The authority goes into the client's view before its input (`toView`, which is taped), and the replica's speculation does the same. So a unit records the switch only when another view was live, alike on both sides. The views not @@ -1345,7 +1345,7 @@ Not done, and why: ## Phase 2 notes -Built 2026-10-29 (`src/walk.zig` Dump/Load, `src/dump.zig`, terminal.zig's +Built 2026-10-29 (`core/walk.zig` Dump/Load, `core/dump.zig`, terminal.zig's dump hooks; `pardes-snap --dump`, `pardes-monkey --dump`, and both in `zig build replay`). Decisions taken at the forks, with the ponytail lens: @@ -1602,7 +1602,7 @@ output); a dump is off the hot path. ## Phase 5 part B terminal notes Built 2026-10-29: screen-state terminals wired into the replicas -(`src/screen_state.zig`, `src/replica.zig`, `src/tape.zig`, +(`src/screen_state.zig`, `core/replica.zig`, `core/tape.zig`, `src/terminal.zig`; `zig build replicas`). Transport-free: bytes in, bytes out, proven in part A's in-process harness; the remote agent's stream carries them. Decisions taken at the forks, with the ponytail lens: @@ -1902,7 +1902,7 @@ Follow-ups (2026-10-29): ## Phase 5 part B notes -Built 2026-10-29 and 30: the stream over the replica socket (src/replica.zig +Built 2026-10-29 and 30: the stream over the replica socket (core/replica.zig `Peers`, and its client half, `dial` and `readStream`; detached/wire.zig version 15), the client process (`pardes --attach=<socket>:<name>` and `--attach=<host>:<name>`, tty.zig `remote`), the session's side of it in @@ -1958,7 +1958,7 @@ replica clients. Decisions taken at the forks, with the ponytail lens: - A dump-loaded client's emulators are on the C heap, as `terminal.create` makes a screen replica's (walk.zig `.alloc` of a pane's `terminal`, dump.zig `terminal_gpa`). -- **Predicted echo is the echo agent's** (src/echo.zig), wired as its +- **Predicted echo is the echo agent's** (core/echo.zig), wired as its notes say: the client's core points at its replica's `echo`, a frame judges it before drawing, and a wake comes a frame later while predictions are out. PARDES_NO_ECHO turns it off. @@ -2276,7 +2276,7 @@ Not done, and why: ## Phase 6: upgrade notes -Built 2026-10-29 (`src/upgrade.zig`, the tty and GUI hosts, `daemon.zig`, +Built 2026-10-29 (`runtime/upgrade.zig`, the tty and GUI hosts, `daemon.zig`, `main.zig`, `dump.resumeFromDump`; `test/daemon.py --upgrade`). A running session, and the daemon, move onto the pardes installed since they started, in place: text, undo, views and layout, terminals with their @@ -2536,8 +2536,8 @@ Not done, and why: ## Phase 6: 9P round trips notes -Built 2026-10-30 (`src/9p_io.zig` Client, `src/fs.zig`, the Mount word in -`src/builtins.zig`, a paragraph of `docs/typ/reference.typ`). pardes's own +Built 2026-10-30 (`runtime/9p_io.zig` Client, `core/fs.zig`, the Mount word in +`core/builtins.zig`, a paragraph of `docs/typ/reference.typ`). pardes's own 9P client is what mounts, the Mount word, the forwarding CLI, `--wait` and Handover use; scripting clients (9p(1), 9ns, test/ninep.py) are not changed here. Decisions at the forks, with the ponytail lens: @@ -2592,7 +2592,7 @@ changed here. Decisions at the forks, with the ponytail lens: 2 s budget again, as each Twrite already did. Found on the way: on main, every read of one operation shared one 2 s budget, so a remote file of 1.3 MB failed to open (`dial failed: timed out`) at 80 and 207 ms. On - the box without `-C`, the 77 KB `src/fs.zig` failed too. + the box without `-C`, the 77 KB `core/fs.zig` failed too. - **A mount keeps its connection** (`kept`), as Plan 9's mount keeps its channel: an operation through it is the flight alone, with no dial, version or attach. @@ -2719,7 +2719,7 @@ Not done, and why: ## Phase 6: predicted echo notes -Built 2026-10-30 (`src/echo.zig`; hooks in `src/replica.zig`; a field on +Built 2026-10-30 (`core/echo.zig`; hooks in `core/replica.zig`; a field on the core and one call at the end of `body_layer.renderBody`; `zig build replicas -- --echo`). Transport-free like part B: proven in part A's in-process harness, carried by the remote client. A key typed into a @@ -3028,7 +3028,7 @@ Installed 2026-10-30 05:27 into ~/.local/bin: pardes and pardes-gui ## Phase 6: content cache and zstd notes -Built 2026-10-30 (`src/replica.zig`: `Peer.farJoin`, the `Framer`'s +Built 2026-10-30 (`core/replica.zig`: `Peer.farJoin`, the `Framer`'s envelopes, `Have` and `Cache`; detached/wire.zig version 16; `walk.blobs`; tty.zig `remote`; main.zig `remoteAttach`; libzstd in build.zig). A far client, one through ssh, is sent a join's blobs by hash and only those it @@ -3315,8 +3315,8 @@ Not done, and why: ## Phase 6: GUI replica notes -Built 2026-10-30 (`src/gui/gui.zig` `remote` and the window session's -`Peers`, `src/replica.zig` `Link`, `src/views.zig` `within`, the +Built 2026-10-30 (`dev/gui/gui.zig` `remote` and the window session's +`Peers`, `core/replica.zig` `Link`, `core/views.zig` `within`, the `builtins.zig` registry's `here`, `Event.frontend`, wire 16; `test/daemon.py --window-clients`). A window is now a replica client, of a terminal's session or a window's, and a window's session serves replicas of @@ -3716,7 +3716,7 @@ both the rule already written above, broken at one site each. leader) ran with `ops == null` and defaulted its outcome, where the authority's was the kind's: mispredicted every time. Fix: one line at the top of `Kind.reopen`, which a Look's open, a revived placeholder and a - kind's reload all pass through. Test at the end of `src/replica.zig`. + kind's reload all pass through. Test at the end of `core/replica.zig`. - **A view's facts read derived state a joiner had not derived.** `Kind.viewOf` told a kind its view's body rows minus its bands, read from `Pane.notices` (the live view) or `Pane.pv[k].notices` (another), both @@ -3731,7 +3731,7 @@ both the rule already written above, broken at one site each. view and `collectNotices` assigns it. Replicating the notices was rejected: `draw.place` writes `pane.notices` outside a step, a divergence of its own waiting; it still does, harmless now that no fact - reads it. No wire or digest cost. Test at the end of `src/replica.zig`. + reads it. No wire or digest cost. Test at the end of `core/replica.zig`. - The rule, restated: a fact told to a kind, or to anything a digest covers, is derived again from dumped state at the call, never read from a copy a step or a park left behind. @@ -3884,7 +3884,7 @@ the session's step and its replicas' replay disagreed. None was a lag. ThemeFile, DumpThemes, Config, DumpConfig, an init file saved). **The model:** what only the authority holds stays the authority's, and a - step reads it through `tape.authority` (src/tape.zig): a `value` read, + step reads it through `tape.authority` (core/tape.zig): a `value` read, its answer taped; a replay takes the answer, and a speculation that reaches one waits for it, as at a host call (one RTT, never wrong). A replica's own store and Recent are never read by a step. Rejected: the @@ -3968,13 +3968,13 @@ the session's step and its replicas' replay disagreed. None was a lag. before the second write's clunk was answered, an `EOFError` the test takes for no `OSError`; twice again it passed. -Tests, each failing before its fix: src/rollback.zig ("a rollback leaves the +Tests, each failing before its fix: core/rollback.zig ("a rollback leaves the store and Recent as a speculation left them", "a view drawn outside a step -leaves the live view's slot holding nothing"), src/replica.zig ("a replica +leaves the live view's slot holding nothing"), core/replica.zig ("a replica joined after a pane closed", with the variant hunt's Recent written by another window; "a replica's Del of a file its session's Recent knows"; "a -client leaves, and one joins"), src/Places.zig ("a lowered copy's pieces not -searched yet are the same in every process"; src/replica.zig's "a step +client leaves, and one joins"), core/Places.zig ("a lowered copy's pieces not +searched yet are the same in every process"; core/replica.zig's "a step that reads a terminal's rows as the core keeps them"). The hunt's repros (`panes_closed.py`, `del_file.py`, `recent_store.py` with the client's own @@ -4207,10 +4207,10 @@ before it. ## Phase 6: instant interaction notes -Built 2026-10-30 (`src/replica.zig`, `src/tape.zig`, `src/terminal.zig`, -`src/echo.zig`, `src/detached/wire.zig`'s `stamp`, one line in -`src/pardes.zig`; PARDES_TEST_LATENCY's `I` and `U` lines in -`src/gui/gui.zig`). The user: "make sure to use the mosh +Built 2026-10-30 (`core/replica.zig`, `core/tape.zig`, `src/terminal.zig`, +`core/echo.zig`, `src/detached/wire.zig`'s `stamp`, one line in +`core/root.zig`; PARDES_TEST_LATENCY's `I` and `U` lines in +`dev/gui/gui.zig`). The user: "make sure to use the mosh tricks so that user interaction to type/scroll/move the cursor feels instant specially when they don't require a request going to the daemon", and "measure it too since I don't want to catch those myself". The @@ -4252,7 +4252,7 @@ Decisions at the forks, with the ponytail lens: - **No digest in a speculation.** A first version kept a terminal speculation's digest to check its unit's against; but a blob born under the copy and digested keeps its word past the epoch's free of - it (src/walk.zig), and a later blob at that address read as it (the + it (core/walk.zig), and a later blob at that address read as it (the harness's Debug blob check, seed 11 at 207 ms). Gone: it is confirmed by its records, as any speculation is. - **Never kept to replay later.** A unit confirmed on the fast path @@ -4446,7 +4446,7 @@ After the line, the hunt's H21 (a client's normal end aborted): 2.5 min, both end 0; 4 min at seed 32, four clients, none aborts (its one breach, a window's panes gone from its view, is not this one). -**A rejoin's view is its own again** (2026-10-30; `src/views.zig`'s +**A rejoin's view is its own again** (2026-10-30; `core/views.zig`'s `away`, `Pardes.awayView`/`rejoinView`, wire 19). Every rejoin gave the client a new view, a copy of the session's: a divergence's, and above all an Upgrade's, which every client makes after each install (the hunt's diff --git a/docs/next-drag.md b/docs/next-drag.md index 5871f785..cfaa6c69 100644 --- a/docs/next-drag.md +++ b/docs/next-drag.md @@ -42,7 +42,7 @@ window it goes to is found by asking every registry session. - `mouse.handleMouse`: a `.move` (pane grip) or `.column_move` (column grip) released outside goes to `Handover.begin` instead of the layout move. Inside the window the grip drag is exactly as before. -- `src/Handover.zig` (`Pardes.handover`), the core half: the pane with the +- `core/Handover.zig` (`Pardes.handover`), the core half: the pane with the panes attached to it (an attachment dragged alone goes alone, unattached), or the column, is dumped alone: `dump.dumpBytes(p, keep, carried)`, which `dumpState` now calls with no mask; `State.carried` (`pane`/`column`) diff --git a/docs/next-editor.md b/docs/next-editor.md index fdb656cb..120b4c09 100644 --- a/docs/next-editor.md +++ b/docs/next-editor.md @@ -11,7 +11,7 @@ same files with `pardes_config.lib` set; nothing is copied for it. ## The calls, as built -`library()` exports `pardes-editor` (src/lib_editor.zig) to a package that +`library()` exports `pardes-editor` (core/lib_editor.zig) to a package that passes `.editor = true` (it then fetches uucode, mvzr and vaxis, of which it compiles the grapheme width); a `pardes-syntax` package fetches what it did. The module has `pardes-syntax` in it as `.syntax`. @@ -92,7 +92,7 @@ share 0.5666 before, 0.5658 after. The Debug core-test binary grew from ## The seam, as built -- `Editor` (src/Editor.zig) is gathered per call: `p.editor()` in pardes, +- `Editor` (core/Editor.zig) is gathered per call: `p.editor()` in pardes, `Live.context` in the library. No field of `Pardes`, `View` or `Text` moved, so the dump is as it was (an embedded field would have renamed `registers` in it). diff --git a/docs/next-plumber.md b/docs/next-plumber.md index 178814b3..247d9928 100644 --- a/docs/next-plumber.md +++ b/docs/next-plumber.md @@ -43,7 +43,7 @@ including the user's uncommitted edits. No user rule exists today: the user's init has no `Plumb` line. Two tests pin the word: look.zig:2688 and test/behaviour/addons.zig:188. - **The design.** - - `src/Plumb.zig` owns the rules as text, which is replicated and dumped core + - `core/Plumb.zig` owns the rules as text, which is replicated and dumped core state, plus the ports this session has named. - Its matcher is a pure function of the rules and a message. The exceptions are `isfile`/`isdir`, which resolve a name exactly as Look does, through @@ -306,7 +306,7 @@ The hover, the n/N walk and lineSpan ask `resolve` what is lookable (look.zig:13 ### 3.1 Where the rules live -`src/Plumb.zig` is one type file owning its fields, with its tests at its end. +`core/Plumb.zig` is one type file owning its fields, with its tests at its end. ```zig //! The plumber (Plan 9's plumber(4), windows/plumb/): the rules, and a @@ -533,7 +533,7 @@ plumb to image ### 4.3 Where the default rules live -- **Location.** `src/plumbing`, the default rules file, compiled in with +- **Location.** `core/plumbing`, the default rules file, compiled in with `@embedFile`. `include basic` names it, as Plan 9's `include basic` names `/lib/plumb/basic`. - **Other includes.** Any other relative include is read from the configuration @@ -547,7 +547,7 @@ plumb to image - `plumb/rules`; - the `Plumb` pane (after `include basic`, the flattened rules are in `plumb/rules`); - - the reference, which quotes `src/plumbing` whole (§6). + - the reference, which quotes `core/plumbing` whole (§6). ## 5. Look after the plumber @@ -582,7 +582,7 @@ plumb to image - the `.diff` hook goes from the `.file` arm; - lookCommit goes from lookUnresolved. -### 5.2 The default rule file (`src/plumbing`), in full +### 5.2 The default rule file (`core/plumbing`), in full ``` # pardes's plumbing rules, in plumb(6)'s language. The first rule set @@ -712,9 +712,9 @@ no rule), Incl, `@p`, addresses, and the search. | the one definition | its sinks | |---|---| -| `src/plumbing` (embedded) | `include basic`; the boot rules; the reference's plumber section, which quotes the file. Typst reading `src/` from docs/typ is not verified; otherwise build.zig copies it next to the generated builtins JSON | +| `core/plumbing` (embedded) | `include basic`; the boot rules; the reference's plumber section, which quotes the file. Typst reading `src/` from docs/typ is not verified; otherwise build.zig copies it next to the generated builtins JSON | | `Plumb.text` (the rules in force) | `plumb/rules`; the `Plumb` pane's file after a save; a dump | -| Plumb.zig's table of pardes's own ports, each with a line saying what it does | `plumb/` readdir (with the ports rules named); the reference's port table; fs-help.txt's `plumb/` line (one line, as every directory has there, src/fs-help.txt:20-23) | +| Plumb.zig's table of pardes's own ports, each with a line saying what it does | `plumb/` readdir (with the ports rules named); the reference's port table; fs-help.txt's `plumb/` line (one line, as every directory has there, core/fs-help.txt:20-23) | | Plumb.zig's error words (Plan 9's) | `plumb/send` and `plumb/rules` write errors; the `Plumb` pane's save error; the reference | | the message's text form (one pack, one unpack in Plumb.zig) | `plumb/send`, the ports, a later `pardes plumb [-s src] [-d dst] [-w wdir] [-t type] [-a attr] -i \| data…` (plumb(1); PLAN.md §7 C+L's `fs write` over the tree) | @@ -727,7 +727,7 @@ lines of tests. - What it builds: - Plumb.zig: pack and unpack; parse, print, variables and include; expand; match, including click; dispose to `start` and to pardes's own ports; - - `src/plumbing`; + - `core/plumbing`; - `plumb/rules` and `plumb/send` in the tree; - the field `Core.plumber`. - Nothing calls the plumber from Look yet. External ports answer `no such plumb @@ -824,7 +824,7 @@ Decided 2026-11-17 by the coordinator, the user asked where marked: stays byte-identical. 3. **The `Plumb` word: (a).** Bare, it opens `<config>/plumbing` as `Config` opens the init; Save applies it; an argument is refused in words. Without - that file the rules are `include basic`, the embedded `src/plumbing`. + that file the rules are `include basic`, the embedded `core/plumbing`. 4. **`plumb start` of a program: (a).** It runs as pardes's exec does: a builtin in place, a command as a command does today. The user has been asked whether a started program should run detached with no pane, as Plan @@ -909,7 +909,7 @@ The options as round 1 put them: - **Dumps and boot.** - How walk.Load treats the removed `plumb` field of an old dump. - Whether the init-file reapply call at host_io.zig:3006 is a taped input. - - Whether Typst can read `src/plumbing` from docs/typ. + - Whether Typst can read `core/plumbing` from docs/typ. - **Replicas.** That a replica's pushes to its own `p.fs` port queues are harmless. That is assumed from events.noteAction's pattern; replica.zig was not read for it. diff --git a/docs/next-run.md b/docs/next-run.md index 084f7c26..dc189bc6 100644 --- a/docs/next-run.md +++ b/docs/next-run.md @@ -37,8 +37,8 @@ The figure is `docs/next-run.typ`, drawn by `docs/typ/figures.typ` docs/next-run.svg`). Today `pardes attach` is four mechanisms, picked by the daemon's `find` -(`src/daemon.zig:901-972`) and by `main.zig`'s `attachTo` -(`src/main.zig:1774-1810`): a terminal handed to a detached terminal's +(`runtime/daemon.zig:901-972`) and by `main.zig`'s `attachTo` +(`runtime/main.zig:1774-1810`): a terminal handed to a detached terminal's session, which draws on it in its own process while the attach process waits as its stub; a window's detached session asked to open its own window again, while the attach process exits; a client here, when the diff --git a/docs/next-searchrows.md b/docs/next-searchrows.md index 79ffc444..2a139254 100644 --- a/docs/next-searchrows.md +++ b/docs/next-searchrows.md @@ -53,8 +53,8 @@ panes like @p1 but that resolves a Look". Change `tsyvmpux`, on ## Numbers -`zz grep rows timings` (src/Stream.zig, `GREP_TIMES=<path>`): Debug, a -TestShell worker, 160x50, the stress file (src/layout.zig x17, 1.22 MB, +`zz grep rows timings` (core/Stream.zig, `GREP_TIMES=<path>`): Debug, a +TestShell worker, 160x50, the stress file (core/layout.zig x17, 1.22 MB, 29002 lines), typing `pane` three times with 400 ms of frames after each key, then Enter on 2000 rows. Load 2.4-3.0 before, 2.7-2.8 after; after is three runs. diff --git a/docs/next-store.md b/docs/next-store.md index 3c8a2f7d..c8c2a6db 100644 --- a/docs/next-store.md +++ b/docs/next-store.md @@ -8,7 +8,7 @@ ## The decision (2026-11-05, the persistence step): everything on disk through xitdb -What pardes keeps on disk goes through xitdb (`src/Db.zig`; architecture +What pardes keeps on disk goes through xitdb (`core/Db.zig`; architecture §14): two files, both BLAKE3-keyed, both with xitdb's header-last commit, so a kill or a full disk leaves the last commit whole. diff --git a/docs/next-terminal.md b/docs/next-terminal.md index 2a8b61c3..26996897 100644 --- a/docs/next-terminal.md +++ b/docs/next-terminal.md @@ -22,7 +22,7 @@ Phase 2 (the terminal on the addon C ABI) and Phase 3 (shipping it as a `.so`) a ## What "leaner" means -"The core" is the `core_module` in build.zig: `src/pardes.zig` and everything it reaches. It is what `core-test`, hxdiff, perf, the benches and the test runners are compiled from, about 15 artifacts, each its own compilation. +"The core" is the `core_module` in build.zig: `core/root.zig` and everything it reaches. It is what `core-test`, hxdiff, perf, the benches and the test runners are compiled from, about 15 artifacts, each its own compilation. **Today `wireCore` (build.zig:835) gives it:** - cloud9, uucode, mvzr, xitdb, zstd; @@ -107,11 +107,11 @@ Items 1 and 3 were tried and reverted by the user's ruling (2026-11-16, "just ke - The undo of the edit copy is the core's, so its type moves to its user. This also clears the way for `pardes-editor` (the text library, reports/editor-lib.md:313). - Gate: core-test and hxdiff. -After 2 and the pager's move behind the interface, ghostty-vt is imported by the terminal's own files alone (terminal.zig, screen_state.zig, TerminalImages.zig, and the pager's parse in src/term/). +After 2 and the pager's move behind the interface, ghostty-vt is imported by the terminal's own files alone (terminal.zig, screen_state.zig, TerminalImages.zig, and the pager's parse in core/term/). ## Phase 0: the narrow module (no behaviour change, no ABI) -`src/term/` takes: +`core/term/` takes: - terminal.zig (3,422 lines); - screen_state.zig (1,664); - echo.zig (834); @@ -119,7 +119,7 @@ After 2 and the pager's move behind the interface, ghostty-vt is imported by the That is about 6,300 lines moved, not rewritten. -The rest of the core calls only the functions of one interface file. Its records are plain data: rows, numbers, bytes to write, cells. `src/Term.zig` is the suggested name: the core declares the interface and the module implements it. +The rest of the core calls only the functions of one interface file. Its records are plain data: rows, numbers, bytes to write, cells. `core/Term.zig` is the suggested name: the core declares the interface and the module implements it. **Today the core calls 62 terminal functions** (outside tests, by grep). They shrink as follows: @@ -156,7 +156,7 @@ The ptys stay host resources: ## Phase 1: the module leaves the core module - **The module.** - - `term` is a Zig module of its own, rooted in `src/term/`. Its imports are `std`, ghostty-vt, wuffs, zstbi, uucode and the interface module. + - `term` is a Zig module of its own, rooted in `core/term/`. Its imports are `std`, ghostty-vt, wuffs, zstbi, uucode and the interface module. - It does not import `pardes`. Zig refuses a file outside a module's root, so the build graph enforces the seam in both directions: the core cannot name ghostty, and the terminal cannot name the core. - The records the terminal writes (cells, placements) live in the interface module, or in a leaf module surface.zig's types are moved into. surface.zig today imports `pardes.zig` (surface.zig:3), so its cell types have to be lifted out. - **Registration.** @@ -183,20 +183,20 @@ The ptys stay host resources: What differs from the plan above, and why: - **The ops are a compile-time constant, not handed over at start.** - `Term.ops` (src/Term.zig:18) is `&@import("term").ops` when the build's + `Term.ops` (core/Term.zig:18) is `&@import("term").ops` when the build's `term_options.terminal` says the core has a terminal, null otherwise. Every core module but core-test's is given `term`; core-test's (`core_lean` in build.zig) is not, and its `term_options` say so. A run-time `Pardes.Options.terminal` would have put the table in every test's options and every host's start for no gain: no build ever has two terminals, and a null known at compile time drops the dead code. -- **The table**, `plain.term.Ops` (src/plain/term.zig): about 60 entries +- **The table**, `plain.term.Ops` (abi/term.zig): about 60 entries in the groups of Phase 0's table (lifecycle, output and view, input, prompt, text, the pager, draw, replicas), each taking and giving plain records or one of four opaque handles (`State`, `Encoder`, `Track`, `Replica`). The module fills it through a cast refused at compile time - unless each entry's signature matches (src/term/term.zig). -- **`Term.State` is a small struct around the handle** (src/Term.zig:55), + unless each entry's signature matches (core/term/term.zig). +- **`Term.State` is a small struct around the handle** (core/Term.zig:55), not the handle itself: walk.zig allocates a pane's terminal on load and hooks its digest and dump, and needs a type of the core's to do it on. The dump keeps a terminal as before (its `Parts` by name, then ghostty's @@ -205,7 +205,7 @@ What differs from the plan above, and why: name on load, so dumps of either build load in the other (checked: test/daemon.py --upgrade from a build of main, fc38c73c5, and from the Phase 0 base into this one, and from this one back to main's). -- **Predicted echo came back to the core** (src/echo.zig): it is the +- **Predicted echo came back to the core** (core/echo.zig): it is the replica's presentation, and reads the emulator through five entries (`grid`, `modes`, `prompt`, `echoCell`, `markRead`). - **The draw group is plain data** (Phase 0 left it typed in the core's @@ -213,10 +213,10 @@ What differs from the plan above, and why: the view's rows the body shows (painting the whole view cost a frame of the perf harness's `render` 82 -> 127 µs: a 3-row pane over a terminal still 37 rows tall, until the next update resized it), the - core lays it over the body (src/ansi.zig), and `Term.images` gives + core lays it over the body (core/ansi.zig), and `Term.images` gives placements. The colour filter stays the terminal's, as it wraps ghostty's `generate256Color`. A finished command pane's diff colours - (`DiffOutput`, `recolorDiffOutput`) moved beside it in src/ansi.zig. + (`DiffOutput`, `recolorDiffOutput`) moved beside it in core/ansi.zig. - **The no-terminal core** boots a scratch pane where a shell would be (Core.zig, `initSession`). `Term.open` refuses with `error.NoTerminal`, which a word says as "no terminal in this build" (`Term: …`, `exec: …` diff --git a/docs/next-tests.md b/docs/next-tests.md index 838202eb..2266b06a 100644 --- a/docs/next-tests.md +++ b/docs/next-tests.md @@ -13,7 +13,7 @@ agent's survey. The `e2e` line (kbdin, mousein) is its first step. `mousein`), the process (flags, daemon, attach, signals, terminal bytes), and files on disk and effects. A rewrite that keeps those keeps its tests. - **T1, in-process 9P, is the main tier.** The core is driven only through - `serveFs` (src/ninep/testing.zig's `call`, `rd`, `wr`): as behavioural + `serveFs` (core/ninep/testing.zig's `call`, `rd`, `wr`): as behavioural as a client on a socket, and milliseconds a case. - **One process runner, not Python (the user, 2026-11-04):** test/process.zig's `Process` starts `pardes` detached (over its socket), in a pty, or as the @@ -68,7 +68,7 @@ agent's survey. The `e2e` line (kbdin, mousein) is its first step. - **Fixed, found by running each case on the window:** - **A new terminal's first pty/run waited for ever:** after a resize, which a window always has, its greeting `ls` was typed at the same - first prompt (src/ninep/pty.zig). The run is now the shell's first + first prompt (core/ninep/pty.zig). The run is now the shell's first command. - **The canary's Newcol was refused:** the runner's 80x24 terminal had shrunk the window. @@ -193,9 +193,9 @@ test/behaviour/, plus the first process test. | area | moved | M left (most excluded: effects, T2, images, LSP) | X kept | |---|---|---|---| -| src/ninep/ctl.zig | 9 + 29 + 62 | 37 | 14 | -| src/ninep/pane.zig, test/panes.zig | 30 + 27 | 16 | 19 | -| src/pardes.zig, test/output.zig, test/pdf.zig | 28 + 14 + 21 | 13 | 51 | +| core/ninep/ctl.zig | 9 + 29 + 62 | 37 | 14 | +| core/ninep/pane.zig, test/panes.zig | 30 + 27 | 16 | 19 | +| core/root.zig, test/output.zig, test/pdf.zig | 28 + 14 + 21 | 13 | 51 | What the M left need, most first: - **Effects performed:** Session counts a save and drops it; a save diff --git a/docs/search-proto-converge.md b/docs/search-proto-converge.md index 7a3e361a..ddc41196 100644 --- a/docs/search-proto-converge.md +++ b/docs/search-proto-converge.md @@ -15,11 +15,11 @@ only the prompts that are not search. | piece | file | lifted from | |---|---|---| -| attached panes: a group under its owner, rows from the owner alone, moving/folding/closing with it, seam drag, Dump/Restore, `Unattach` | `src/layout.zig` "Attached panes", `Pane.attached_to` | attached | -| places: every match tinted, rail ticks (B1 on a tick goes there), current selected and in view, smart-case regex, view-first sliced scan, silent wrap | `src/Places.zig`, `Pane.places` | incsearch (MatchSet) | -| the query pane: line 1, its first word the source, live rows, preview, Enter/Esc/Del, reuse, settings | `src/Query.zig`, `Pane.query` | queryline, pick, live, preview, everywhere | -| fuzzy names (files, recent, panes, declarations) | `src/Names.zig` | pick (its scorer, whole) | -| the disk engine: Grep and Find's listing on a worker, rg or the walk, generations, debounce, cap + `More`; and the declarations parse | `src/Stream.zig`, `Pardes.stream` | stream | +| attached panes: a group under its owner, rows from the owner alone, moving/folding/closing with it, seam drag, Dump/Restore, `Unattach` | `core/layout.zig` "Attached panes", `Pane.attached_to` | attached | +| places: every match tinted, rail ticks (B1 on a tick goes there), current selected and in view, smart-case regex, view-first sliced scan, silent wrap | `core/Places.zig`, `Pane.places` | incsearch (MatchSet) | +| the query pane: line 1, its first word the source, live rows, preview, Enter/Esc/Del, reuse, settings | `core/Query.zig`, `Pane.query` | queryline, pick, live, preview, everywhere | +| fuzzy names (files, recent, panes, declarations) | `core/Names.zig` | pick (its scorer, whole) | +| the disk engine: Grep and Find's listing on a worker, rg or the walk, generations, debounce, cap + `More`; and the declarations parse | `core/Stream.zig`, `Pardes.stream` | stream | | the finder column (`SearchPlace column`) | `src/Finder.zig`, `Pardes.finder` | column | ## Semantics @@ -136,7 +136,7 @@ preview at the key that asked. ## Storyboards -Text: `/` in the 1.2 MB stress file (playground `src/layout.zig` x23), +Text: `/` in the 1.2 MB stress file (playground `core/layout.zig` x23), cursor on line 15000. | step | the screen | @@ -156,10 +156,10 @@ playground's root (the snapshot `find.snap` runs the same steps). | step | the screen | |---|---| | `SPC f f` | The query pane under the pane with its +Preview under it, both out of that pane's rows; line 1 `Find `; the 15 files below the directory listed at once (rg `--files` on the worker; dot-files like `.fill-section.py` and .gitignore'd ones passed over), the first current; tag `1/15`. | -| keystroke 1, `l` | The names scored fuzzily (pick's scorer: segment starts, basename, camel humps), best first, the matched letters tinted: `src/layout.zig`, `src/locations.zig`, `open-all.sh`, `notes/helix-keys.md`, ...; the best current, its head in the +Preview; tag `1/7`. | -| keystroke 2, `a` | `la`: `src/layout.zig`, `src/locations.zig`; tag `1/2`, layout.zig's head in the preview. Nothing moves. | -| Ctrl-n / Ctrl-p | `src/locations.zig` current, its head in the preview. | -| Enter | The preview becomes `src/locations.zig`'s pane where it stands (same rect and serial); the list frozen above it. | +| keystroke 1, `l` | The names scored fuzzily (pick's scorer: segment starts, basename, camel humps), best first, the matched letters tinted: `core/layout.zig`, `core/locations.zig`, `open-all.sh`, `notes/helix-keys.md`, ...; the best current, its head in the +Preview; tag `1/7`. | +| keystroke 2, `a` | `la`: `core/layout.zig`, `core/locations.zig`; tag `1/2`, layout.zig's head in the preview. Nothing moves. | +| Ctrl-n / Ctrl-p | `core/locations.zig` current, its head in the preview. | +| Enter | The preview becomes `core/locations.zig`'s pane where it stands (same rect and serial); the list frozen above it. | | `n` / `N` | In the query pane: the next / previous name current, shown in a new preview under it (or in its pane when open). In the opened file: helix's register search (a list of names has no places in a text). | | Esc (typing) | The query pane and its preview closed, their rows back to the pane that asked; nothing opened. | diff --git a/docs/selections.md b/docs/selections.md index f1d899a8..d8ad54c9 100644 --- a/docs/selections.md +++ b/docs/selections.md @@ -8,7 +8,7 @@ at `694e7dfdd`, upstream `278b24389`. ## What a selection is -Every `Text` (src/Text.zig) has its own: a pane's body, its tag, a prompt's +Every `Text` (core/Text.zig) has its own: a pane's body, its tag, a prompt's answer, a column's or the workspace's tag. A selection is one primary range plus others, up to `memory.limits.selections` in all (1024). diff --git a/docs/shared-libs.md b/docs/shared-libs.md index 79d393e7..79058973 100644 --- a/docs/shared-libs.md +++ b/docs/shared-libs.md @@ -105,8 +105,8 @@ and gui columns are the two binaries. | Regex | mvzr | pardes | 1 → 1 | 17 KiB | Zig | | Parsing | tree-sitter | pardes | 1 → 1 | | `ts_set_allocator` → c_heap | | Window, input, GPU | SDL 3.4.18 | gui | 1 → 1 | 1009 KiB | `SDL_SetMemoryFunctions` | -| Compress and decompress a far replica's stream (2026-10-30) | zstd 1.5.7 (the upstream tarball; build.zig compiles its lib/: no assembly, no threads, the dfast and lazy block compressors alone) | src/replica.zig | 0 → 1 | 380 KiB tty (516 with every block compressor) | `ZSTD_customMem` → c_heap | -| On-disk databases: the state file (Recent, the dumps) and a far client's blob cache (2026-11-05) | xitdb (pure Zig, a pinned commit of github.com/xit-vcs/xitdb, MIT) | src/Db.zig | 0 → 1 | | Zig: it allocates through the allocators it is given (a database's buffer, a read's), so it has no hook of its own; no C | +| Compress and decompress a far replica's stream (2026-10-30) | zstd 1.5.7 (the upstream tarball; build.zig compiles its lib/: no assembly, no threads, the dfast and lazy block compressors alone) | core/replica.zig | 0 → 1 | 380 KiB tty (516 with every block compressor) | `ZSTD_customMem` → c_heap | +| On-disk databases: the state file (Recent, the dumps) and a far client's blob cache (2026-11-05) | xitdb (pure Zig, a pinned commit of github.com/xit-vcs/xitdb, MIT) | core/Db.zig | 0 → 1 | | Zig: it allocates through the allocators it is given (a database's buffer, a read's), so it has no hook of its own; no C | Text section: tty 61,369,343 → 61,294,855 bytes (**−74,488**); gui 67,336,392 → 67,182,000 bytes (**−154,392**). diff --git a/docs/typ/README b/docs/typ/README index 641343f1..88f24343 100644 --- a/docs/typ/README +++ b/docs/typ/README @@ -14,7 +14,7 @@ docs/typ: the Typst documentation corpus file imports the figure it shows from here. cheatsheet-a4.typ output wrapper: the one-page A4 cheatsheet. book.typ output wrapper: an A4 book, title page, contents, - every chapter, then the tutor (src/tutor.txt). + every chapter, then the tutor (core/tutor.txt). ../site/site.typ output wrapper: the website, a page per chapter plus the landing page and the tutor, in one Typst bundle run (see docs/site/README). @@ -36,7 +36,7 @@ Build (from the repo root): typst compile --root . --ignore-system-fonts docs/typ/book.typ typst compile --root . --format bundle --features bundle,html docs/site/site.typ OUT zig build site -Dplatform=tui --prefix DIR # DIR/share/doc/pardes/site/ -(--root . because book and HTML read the tutor from src/tutor.txt.) +(--root . because book and HTML read the tutor from core/tutor.txt.) The contract for content files ------------------------------ @@ -113,7 +113,7 @@ builtins-tui.json and builtins-gui.json are every builtin of the terminal and the window build (name, leader, Help's other shortcuts, arg, scope, setting, choices, doc), written by `zig build builtins-json -Dplatform=tui` and `-Dplatform=gui` from the registry and the Help rows -(src/builtins_json.zig). style.typ merges them, marking each word "both", +(core/builtins_json.zig). style.typ merges them, marking each word "both", "tui" or "gui". The doc steps refresh their build's file first, and each build's unit-test fails when its file is stale. #word takes a name from either file. builtins.typ draws it as the @@ -123,7 +123,7 @@ in what order. The drift test -------------- The unit test "docs/typ names only words, keys and default tags that -exist" (src/config.zig) reads every .typ here and fails when a word(), +exist" (core/config.zig) reads every .typ here and fails when a word(), key(), keys() or tag() names a builtin, key binding or default tag that pardes no longer has. Pass these functions string literals, so the test can read them. diff --git a/docs/typ/book.typ b/docs/typ/book.typ index b2245372..668b47a3 100644 --- a/docs/typ/book.typ +++ b/docs/typ/book.typ @@ -1,7 +1,7 @@ // The book: every topic in reading order, then the tutor. Facts live in the // content files named by `chapters` in style.typ; this is layout only. // typst compile --root . --ignore-system-fonts docs/typ/book.typ -// (--root . because the tutor is read from src/tutor.txt.) +// (--root . because the tutor is read from core/tutor.txt.) #import "style.typ": palette, mono, chapters, tutor-path, doc-links, tagline #set document(title: "pardes") diff --git a/docs/typ/building.typ b/docs/typ/building.typ index 9026aa4f..5273298e 100644 --- a/docs/typ/building.typ +++ b/docs/typ/building.typ @@ -76,7 +76,7 @@ must share with its session; `pardes --help` lists every flag. == As a library <library> A Zig package that depends on pardes is given one module and nothing of -the editor: `pardes-syntax` (`src/lib_syntax.zig`), for a program that +the editor: `pardes-syntax` (`core/lib_syntax.zig`), for a program that draws source text itself and wants it parsed and coloured as pardes has it. @@ -118,7 +118,7 @@ package, and `zig build lib-test` builds and runs it. === The editor -`pardes-editor` (`src/lib_editor.zig`) is the text pane as a library: +`pardes-editor` (`core/lib_editor.zig`) is the text pane as a library: helix's keys on a text kept in memory, no files, commands, builtins, prompts or views. A package asks for it, and is then given uucode, mvzr and vaxis's grapheme width besides; one that does not fetches nothing more. @@ -161,7 +161,7 @@ zig build core-test core tests on the core without a terminal (no ghostty that needs a terminal skips; the one to iterate on zig build shell-test the same tests and the native shell's, with the terminal, without the perf gate -zig build term-test the terminal module's own tests (src/term/) +zig build term-test the terminal module's own tests (core/term/) zig build pane-test pane, output and namespace integration tests zig build kitty-test kitty graphics conformance of terminal panes, at the core zig build kitty-harness kitty graphics through a pane end to end (a fake kitty @@ -209,7 +209,7 @@ zig build cheatsheet render the cheatsheet PDF (needs typst) [--replay-with=<pardes-gui>]` records and replays the tty cases' real sessions, their shells' and files' answers on the tape. - The tutor's practice blocks (`# keys:`, `# before`, `# after` in - `src/tutor.txt`) are typed by hand; nothing runs them. What pins that + `core/tutor.txt`) are typed by hand; nothing runs them. What pins that behaviour is `hxdiff`, which replays `test/hxcases` against goldens recorded from a real helix, and its `--parity`, which runs each case in a file pane and in a shell and demands they agree. @@ -278,12 +278,12 @@ effects such as spawning processes. decides who serves it. - The root module is chosen by platform: `main.zig` (tui, gui), `macos.zig`. The macOS shell is a library whose host owns `main()`. -- The terminal is a module of its own, `term` (`src/term/`): the +- The terminal is a module of its own, `term` (`core/term/`): the emulator (ghostty-vt), kitty images (wuffs, zstbi), the pager's parse and the replicas' screen state. It never imports the core; the core - reaches it through one table of plain-data entries (`src/plain/term.zig`, - through `src/Term.zig`), chosen at compile time. The records both name - (cells, colours, keys) are `plain` (`src/plain/plain.zig`, std only). + reaches it through one table of plain-data entries (`abi/term.zig`, + through `core/Term.zig`), chosen at compile time. The records both name + (cells, colours, keys) are `plain` (`abi/plain.zig`, std only). Every product is built with the terminal; core-test's core is built without it, so its compile names no ghostty, wuffs, zstbi or C++. - `memory.limits` is the one home for the core's capacities (selections, @@ -291,13 +291,13 @@ effects such as spawning processes. allocator is a DebugAllocator over its arena's reserved region, thread safe, its checks in Debug builds only. -Code map: `src/panes.zig` and the pane kinds it names (`src/File.zig`, -`src/Terminal.zig`, ...), `src/layout.zig`, `src/fs.zig` (host access, -mounts and resolution) and `src/pardes.zig` (input), with one file per +Code map: `core/panes.zig` and the pane kinds it names (`core/File.zig`, +`src/Terminal.zig`, ...), `core/layout.zig`, `core/fs.zig` (host access, +mounts and resolution) and `core/root.zig` (input), with one file per thing beside them (`edit.zig`, `normal.zig`, `look.zig`, `exec.zig`, -`mouse.zig`, ...). `src/ninep/` is the control tree, `src/daemon.zig` the -per-user daemon and a terminal's stub, `src/wire.zig` the input -wire a remote client will speak, `src/lsp/` the +`mouse.zig`, ...). `core/ninep/` is the control tree, `runtime/daemon.zig` the +per-user daemon and a terminal's stub, `abi/wire.zig` the input +wire a remote client will speak, `core/lsp/` the language-server client; `test/` holds harnesses, goldens and helix cases, `build/` the process tests' build steps. @@ -318,7 +318,7 @@ edit) the file's revision reject a stale reply. A process that never calls == The daemon and detached sessions -One `pardes --daemon` per user (`src/daemon.zig`) listens on +One `pardes --daemon` per user (`runtime/daemon.zig`) listens on `pardes-daemon.sock` in the runtime directory, its `.lock` flocked for its life; the first session that finds none starts it (a double fork and an exec) and it exits a second after it holds nothing. It is nobody's parent: @@ -343,7 +343,7 @@ own process, ended by its hangup. A replica (a client running its own copy of the core, phase 5 of `docs/next-daemon.md`) connects to `pardes-replica.sock`, a stream socket -beside it that `ssh -L` can forward. `src/wire.zig` is its +beside it that `ssh -L` can forward. `abi/wire.zig` is its protocol (its `version`): fixed-width little-endian fields, a 5-byte header (tag, then a u32 length), the hello, a ping, the input events. The hello names a session and carries the client's semantics hash (the protocol, @@ -354,9 +354,9 @@ nobody has, in words, and hands an accepted connection to its session (`SCM_RIGHTS`), which welcomes it and from then on is the one it talks to: the session sends the dump the client loads, then each step's tape and its terminals' screens, and the client sends its inputs -(`src/replica.zig`; #doc("running") draws it). +(`core/replica.zig`; #doc("running") draws it). -#word("Upgrade") (`src/upgrade.zig`) execs the path the session was started +#word("Upgrade") (`runtime/upgrade.zig`) execs the path the session was started from, at a step boundary, after asking it `--version`: the session's dump is committed to the state file as `upgrade-<pid>` (the build before wrote `pardes-upgrade-<pid>.dump`, which this one still reads, for one release), and its pty masters, @@ -383,10 +383,10 @@ shared code. - The engine (`fs.Server`) owns fids, permissions, directory reads, flushes and what a hangup releases; it allocates nothing and makes no OS - calls. The control tree in `src/ninep/` is its backend: `tree.zig` + calls. The control tree in `core/ninep/` is its backend: `tree.zig` (nodes, dispatch), `pane.zig`, `ctl.zig`, `cols.zig`, `addr.zig`, `pty.zig`, `events.zig` (event and log), `screen.zig`, `sources.zig`. - `src/9p.zig` names the editor's engine settings: msize 65536, 256 fids, + `runtime/9p.zig` names the editor's engine settings: msize 65536, 256 fids, 128 held reads a connection, names up to 255 bytes. - A read, write, open, clunk, remove or truncating wstat can park; a walk, attach, stat, create or rename cannot. Every Rread is clamped to the diff --git a/docs/typ/guide.typ b/docs/typ/guide.typ index 9bbdba65..e69c756a 100644 --- a/docs/typ/guide.typ +++ b/docs/typ/guide.typ @@ -395,7 +395,7 @@ Shell zsh #word("DumpConfig") opens every live setting as the line that sets it. #word("Dump") saves the workspace and #word("Restore") brings it back (what a dump keeps is in the reference). Keys are compile-time, in -`src/config.zig`. +`core/config.zig`. = Questions <questions> @@ -409,6 +409,6 @@ Shell zsh pass kitty's protocols, #key("Shift-Esc") is a plain Esc and images draw as glyph art. / Does my helix config carry over?: No. The keys are compiled in - (`src/config.zig`); `~/.config/helix` is not read. + (`core/config.zig`); `~/.config/helix` is not read. / How do I quit?: #key("SPC q"), or #word("Exit") in any tag. / What does "pardes" mean?: The name of the four levels of reading a text in rabbinical exegesis (#link("https://en.wikipedia.org/wiki/Pardes_(exegesis)")[Wikipedia]). diff --git a/docs/typ/reference.typ b/docs/typ/reference.typ index 47014d1b..2562c91b 100644 --- a/docs/typ/reference.typ +++ b/docs/typ/reference.typ @@ -17,7 +17,7 @@ it names, or else run it as a shell line. The files #file("look") and = The tree <tree> #fstree(``` -README the one-screen summary (src/fs-help.txt) @other-files +README the one-screen summary (core/fs-help.txt) @other-files index a line per pane: serial kind dirty name column @rules status pid, version, panes @other-files look write a line: a #word("Look") at the pane with the keyboard; read: the serials touched @look-and-exec @@ -378,7 +378,7 @@ takes (#word("Theme") `orchard`, #word("Verbose") `on`, #word("DumpDir") `<dir>` frontend lacks as a comment (`# GripWidth unsupported`), so writing back what it reads changes nothing. Writes take settings and session builtins (`scope = .session` in -`src/builtins.zig`), acting at the pane with the keyboard: +`core/builtins.zig`), acting at the pane with the keyboard: - A setting written bare steps to its next value (a switch flips). A value it does not take is `bad value in control message; ...` naming what it takes; @@ -487,9 +487,9 @@ rows) and the window's caret eases to its place. may lower the contrast of text, the selection or a focus indicator. Resting the pointer on text for about 32 ms (`look_preview_delay_frames`, -2 frames, in `src/config.zig`; `null` turns it off) tints what #word("Look") would take, with no other effect. A terminal's or a `+Pager`'s +2 frames, in `core/config.zig`; `null` turns it off) tints what #word("Look") would take, with no other effect. A terminal's or a `+Pager`'s #word("Filter") keeps each foreground at least `tty_filter_min_contrast` -(WCAG 1.5, `src/config.zig`) against its background. +(WCAG 1.5, `core/config.zig`) against its background. = Columns and tags <columns-and-tags> @@ -735,7 +735,7 @@ over the match where the search starts. Patterns are mvzr's (classes, `\d\w\s`, `{m,n}`, lazy `*?`), searched as sam searches, line by line: `^` and `$` match at any line's start and end, `.`, `\s` and `[^...]` never match a newline (helix's `\s` and `[^...]` do: -there `S\s+` splits off a line's newline, here `S\s+|\n` does). The same code (`src/regexp.zig`) +there `S\s+` splits off a line's newline, here `S\s+|\n` does). The same code (`core/regexp.zig`) serves addresses, #word("Edit"), and normal mode's #key("s") and #key("S"). The ceiling: @@ -1040,7 +1040,7 @@ own: a file or directory opened, else the word searched for. place. A session starts with the plumbing file's rules, #word("Plumb") (`plumbing` in the configuration directory, beside `init`; saved, its rules are in force), or without one `include basic`, pardes's own - (`src/plumbing`, below). A write adds rule sets, each + (`core/plumbing`, below). A write adds rule sets, each read as its blank line comes, the rest at the close (refused there, it is an `err` in the log alone; Plan 9's loses it); `>` replaces them all. One open writes at a time (`file in use`). Kept in a dump. @@ -1050,7 +1050,7 @@ own: a file or directory opened, else the word searched for. were. `$1`-`$9` are refused: pardes's regular expressions (#doc("reference", section: "regexp")) have no submatches; write `$0` and several `matches`, as Pike's two patterns do. `include basic` is - `src/plumbing`; another name is the configuration directory's file, an + `core/plumbing`; another name is the configuration directory's file, an absolute one where it says. - #file("/plumb/send") takes a message, plumb(6)'s six lines (`src`, `dst`, `wdir`, `type`, `attr`, the data's length) and then the data, @@ -1095,7 +1095,7 @@ own: a file or directory opened, else the word searched for. that wants one says `sh -c '...'`); a failure to start it is said, and logged as an `err`. Its directory and words fit in 256 bytes. -The default rules, `src/plumbing`, keep #word("Look")'s ways: a URL to +The default rules, `core/plumbing`, keep #word("Look")'s ways: a URL to the browser; a bare `.diff` or `.patch` stacked in a +Diff (#word("Diff") with the file, which declines one with no hunk, opened as text then); an existing directory or file to `edit`, Look's own open (a kind's file in @@ -1106,18 +1106,18 @@ sends to `edit` (`src` `pager`, `type` `text/x-diff`, `action=showdata` and the +Pager's `filename`), made `showdiff`: stacked in a +Diff in the +Pager's place. Text paged that is no diff is not sent: -#raw(read("../../src/plumbing"), block: true) +#raw(read("../../core/plumbing"), block: true) = Addons <addons> An addon is a shared library that brings one kind of pane: a picture, a -game, a plot. It is written against one header, `src/kinds/pardes_addon.h`, +game, a plot. It is written against one header, `abi/pardes_addon.h`, in C or anything that speaks C, and links nothing of pardes: the records are the header's, and what pardes does for it (an allocation from the pane's arena, memory that outlives a call, a job off the loop, a Look or an Exec, a message, a new text pane, its selection) it is handed at load. `addons/fake/fake.c` uses every function; a kind with only a head and -`paint` is a valid one. In Zig, `src/kinds/addon.zig` (over the same +`paint` is a valid one. In Zig, `abi/addon.zig` (over the same header, and nothing of the core) makes the `pa_ops` from a struct of the functions a kind has (`pub const pardes_addon = addon.ops(Snake);`, and `addon.exportLib(&pardes_addon)` in a `comptime` block, which exports it @@ -1129,7 +1129,7 @@ and views, a window to `put` text in (column first, where the header's every tick, a body written (at most 4 KiB) or held (any length), an `init` at load, a struct's bytes as its record, and its own `zig test` (`zig build addon-test` runs them); a Zig kind outside the tree runs `zig -translate-c src/kinds/pardes_addon.h` once for the header: +translate-c abi/pardes_addon.h` once for the header: `addons/snake/snake.zig` is a game in it. Pictures are an addon too, `addons/image/image.zig` (PNG, JPEG, GIF, BMP, PPM, PGM and TGA through stb_image, at most 1280 pixels a side), which `zig build image` diff --git a/docs/typ/running.typ b/docs/typ/running.typ index 01fb7f32..7e0d16d4 100644 --- a/docs/typ/running.typ +++ b/docs/typ/running.typ @@ -185,7 +185,7 @@ of the session or a divergence of its own. `pardes attach /run/x.sock:work` // only); main.zig:1544-1560 (no daemon reached: no fork); tui.zig:1352-1353, // gui.zig:2483, host_io.zig:227 (Detach and Adopt refused); // replica.zig:1900-1905 (a client only through the daemon); -// pardes.zig:113 (can_attach); main.zig:1498-1500 (a far attach needs no +// core/root.zig:117 (can_attach); runtime/main.zig:1498-1500 (a far attach needs no // daemon here). With `PARDES_DAEMON=off`, in a window under test (`PARDES_TEST`), where none could start, and in the Mac's own build, the session is the process diff --git a/docs/typ/style.typ b/docs/typ/style.typ index 5a482cd8..bf005c63 100644 --- a/docs/typ/style.typ +++ b/docs/typ/style.typ @@ -5,7 +5,7 @@ // elements and classes for a stylesheet. Page geometry and fonts belong to // the output wrappers beside this file. -/// The `atelier` theme (src/themes/atelier.zig): pardes's acme homage, +/// The `atelier` theme (core/themes/atelier.zig): pardes's acme homage, /// butter paper and blue-green tags. #let palette = ( paper: rgb("#fffdeb"), @@ -67,7 +67,7 @@ #let tagline = "acme's tags and three buttons, helix's keys, terminals as panes, the editor as a virtual filesystem over 9P" /// The tutor, shown as it is in the editor (`Tutor`), from the repo root. -#let tutor-path = "/src/tutor.txt" +#let tutor-path = "/core/tutor.txt" /// How much room tables and shell lines get: "roomy" (the book, the HTML) /// or "tight" (the A4 sheet sets it). @@ -180,13 +180,13 @@ /// A tag word or builtin, drawn as a thing to click: the tag's ground and /// ink in the tag's monospace, over a rule. Look and Exec take acme's look -/// and exec sweep colours (green and red, src/themes/acme.zig) for the +/// and exec sweep colours (green and red, core/themes/acme.zig) for the /// rule; every other word the tag's box colour. In HTML a <code /// class="word">, so a text browser still shows the plain word. #let word-accent = (Look: rgb("#006600"), Exec: rgb("#aa0000")) /// Every builtin of either build, written by `zig build builtins-json` -/// from the registry and the Help rows (src/builtins_json.zig), a file per +/// from the registry and the Help rows (core/builtins_json.zig), a file per /// build: name, leader, also (Help's other shortcuts), arg, scope, setting, /// choices, doc, and for a shipped addon's word its addon first. Merged here, each with `platforms`: "both", "tui" (the /// terminal only) or "gui" (the window only). @@ -310,7 +310,7 @@ (name: "git.0x4200.cafe", web: "https://git.0x4200.cafe/pardes", clone: "https://git.0x4200.cafe/pardes.git"), ), license: "ISC", - changes: "https://git.sr.ht/~gbrls/pardes/tree/main/item/src/CHANGELOG.md", + changes: "https://git.sr.ht/~gbrls/pardes/tree/main/item/core/CHANGELOG.md", // built binaries to download: the version they are, where the // checksums are, and a file per program (install.typ shows them) download: ( @@ -473,7 +473,7 @@ /// ends in `/`), two or more spaces, a one-line description, and an /// optional `@label` naming the section that documents it, which becomes /// a link wherever that section is in the same output. A description may -/// call #word, #key, #keys or #btn. src/config.zig's +/// call #word, #key, #keys or #btn. core/config.zig's /// test reads the same block in reference.typ against the served tree. #let fstree(spec, root: "/") = { // a description is text, unless it calls #word, #key or #btn diff --git a/features.txt b/features.txt index 312c51c6..d0d499b7 100644 --- a/features.txt +++ b/features.txt @@ -75,7 +75,7 @@ Tcreate that replaced it has a real wart: a pane is named by a server-assigned s /pane/12. Replace it with /pane/clone (open allocates, read answers the serial) and keep Tremove, which is unambiguously right. TODO, deferred: ligatures on the sdl backend. macOS got them with the first-class-host commit because CoreText shapes for free; sdl rasterises one glyph per -codepoint through FreeType (src/gui/font.c calls FT_Get_Char_Index then FT_Load_Glyph) and FreeType does no shaping, so this means adding HarfBuzz. It is not the +codepoint through FreeType (dev/gui/font.c calls FT_Get_Char_Index then FT_Load_Glyph) and FreeType does no shaping, so this means adding HarfBuzz. It is not the whole renderer, but it is most of the text path: the glyph atlas is keyed by codepoint (GlyphKey{codepoint, role, decoration}) and a ligature has no codepoint, so the cache rekeys to glyph indices; a shaping stage has to run over runs of same-styled text within a row; and the per-cell instance emit has to place one glyph across several columns and remember which columns a ligature consumed (macOS does this with ligatureShaped/ligatureCovered). The GPU batching, atlas upload and @@ -161,7 +161,7 @@ Found by adversarial review and NOT fixed, because they are upstream or macOS-on - Surface.mark_hover is never assigned true anywhere in the tree, so the whole macOS hover ABI is inert: PARDES_CELL_HOVER is never emitted, encodeCellFlags always contributes 0, and PardesView's liquid-glass affordance never draws. The tests pass only because they set the flag by hand. The comment in the look_hover_preview paint block claims it carries those cells out to the hosts; it does not. -- -Dworkspace-tag is read only in src/macos.zig, and core.settings.workspace_tag is assigned only there, so the option builds cleanly for gui/tty/web and is +- -Dworkspace-tag is read only in runtime/macos.zig, and core.settings.workspace_tag is assigned only there, so the option builds cleanly for gui/tty/web and is silently ignored. (taglineBandOffset no longer takes it: every band is centred since 2026-09-23.) gui.zig still uses raw TOPBAR_H at five sites. - The detached wire encodes the pointer shape in the frame header variant (full_link/diff_link), so the newer `.target` shape collapses to `.arrow` for an attached frontend. Fixing it means a new header variant, i.e. a protocol change. diff --git a/runtime/9p.zig b/runtime/9p.zig index 61715750..67bfe900 100644 --- a/runtime/9p.zig +++ b/runtime/9p.zig @@ -26,7 +26,7 @@ pub const errmax = cloud9.fs.errmax; pub const errString = cloud9.fs.errString; pub const msize_min = cloud9.fs.msize_min; -/// The smallest msize a native listener offers (src/9p_io.zig). +/// The smallest msize a native listener offers (runtime/9p_io.zig). pub const min_msize: u32 = 4096; /// What a native listener negotiates. pub const msize: u32 = 65536; @@ -34,7 +34,7 @@ pub const msize: u32 = 65536; /// The editor's engine: native fid count, native file names, and room to /// park a write of any size a frame can carry -- a request that would change /// a pane while the editor is out in a syscall waits in the engine -/// (src/9p_io.zig, `serve`), and a write it cannot keep would fail instead. +/// (runtime/9p_io.zig, `serve`), and a write it cannot keep would fail instead. /// The largest write is msize less the Twrite header, 23 bytes (the test /// below asks a client), one byte more than `iohdrsz` allows for. /// Up to 128 reads held on one connection (a follower each of the log or diff --git a/runtime/daemon.zig b/runtime/daemon.zig index 4f770a3a..0d860918 100644 --- a/runtime/daemon.zig +++ b/runtime/daemon.zig @@ -402,7 +402,7 @@ pub const Note = union(enum) { /// stub's pipe; for a window session, both -1: open a window. attach: struct { tty: c_int, stub: c_int }, adopted: struct { pids: [max_fds]libc.pid_t, fds: [max_fds]c_int, n: usize }, - /// A replica's connection, its hello taken (src/replica.zig `Peers`), + /// A replica's connection, its hello taken (core/replica.zig `Peers`), /// and the view it joins again for, if it does. replica: Joining, }; diff --git a/runtime/main.zig b/runtime/main.zig index 61e9f3fd..11aceaeb 100644 --- a/runtime/main.zig +++ b/runtime/main.zig @@ -1114,7 +1114,7 @@ fn parseCtrlKey(raw: []const u8) ?u21 { fn nativeMain(std_init: std.process.Init) !void { var init = std_init; if (builtin.mode != .debug) init.gpa = pardes.memory.host(std.heap.c_allocator); - // A recorded session's tape replayed, no session of its own (src/tape.zig). + // A recorded session's tape replayed, no session of its own (core/tape.zig). if (init.environ_map.get("PARDES_REPLAY")) |tape| std.process.exit(pardes.tape.replayMain(tape)); var stderr_probe: [64]u8 = undefined; _ = std.debug.lockStderr(&stderr_probe); @@ -1917,7 +1917,7 @@ test { _ = pardes.config.User; // The rest this block collected is collected where it lives now: the // runtime's files by runtime/root.zig's test block, the core's by - // pardes.zig's, the devices' (the frontends) by dev/root.zig's. The + // core/root.zig's, the devices' (the frontends) by dev/root.zig's. The // window stays named: its C's allocator (ui_malloc and the rest) is // gui.zig's. if (comptime pardes.platform == .tui) { diff --git a/test/behaviour/addons.zig b/test/behaviour/addons.zig index 49dfce79..e36b088c 100644 --- a/test/behaviour/addons.zig +++ b/test/behaviour/addons.zig @@ -1,6 +1,6 @@ //! docs/typ/reference.typ, Addons <addons>: a library that brings a kind //! of pane, driven here through addons/fake/fake.c (every function of -//! src/kinds/pardes_addon.h) and the copies of it built wrong. +//! abi/pardes_addon.h) and the copies of it built wrong. const std = @import("std"); const Session = @import("session").Session; const fake = Session.fake_addons; diff --git a/test/behaviour/language_servers.zig b/test/behaviour/language_servers.zig index da7b3d59..ab9585ed 100644 --- a/test/behaviour/language_servers.zig +++ b/test/behaviour/language_servers.zig @@ -1,6 +1,6 @@ //! docs/typ/setup.typ, Language servers <language-servers>: a file's //! language words ask the nearest `index.scip` above it first (SCIP, -//! read by src/lsp/Scip.zig) and its language server when the index has +//! read by dev/lsp/Scip.zig) and its language server when the index has //! nothing to say, here the scripted one (test/lspmock.zig). The indexes //! are made by the protobuf writer below, but for the one a real indexer //! wrote (test/scipfixture). diff --git a/test/daemon.py b/test/daemon.py index 5bdf1fc4..e600beb7 100644 --- a/test/daemon.py +++ b/test/daemon.py @@ -229,7 +229,7 @@ def semantics(binary): class Replica: - """A replica's connection (src/wire.zig): length-prefixed + """A replica's connection (abi/wire.zig): length-prefixed messages, a tag byte and a little-endian u32 length. It is a near client: its first word after the hello says so.""" WIRE = 23 diff --git a/test/deck/replay.zig b/test/deck/replay.zig index 778f4191..0b449503 100644 --- a/test/deck/replay.zig +++ b/test/deck/replay.zig @@ -1,5 +1,5 @@ //! Replays slices of real Steam Deck recordings (deckcap .zon captures) -//! through src/gui/deck.zig and checks the aggregate actions, so the deck +//! through dev/gui/deck.zig and checks the aggregate actions, so the deck //! control mapping is exercised without the device. const std = @import("std"); diff --git a/test/e2e_harness.zig b/test/e2e_harness.zig index 396de8c5..f7d65b03 100644 --- a/test/e2e_harness.zig +++ b/test/e2e_harness.zig @@ -176,7 +176,7 @@ pub const Harness = struct { /// The app's output into the emulator. The one query answered is the /// device status request (`CSI 5 n` → `CSI 0 n`), as every terminal /// does: the tty asks it after each frame and draws no other until the - /// answer (FrameAck in src/tui/tui.zig). + /// answer (FrameAck in dev/tui/tui.zig). fn feed(self: *Harness, bytes: []const u8) void { self.stream.nextSlice(bytes); const request = "\x1b[5n"; diff --git a/test/hxdiff.zig b/test/hxdiff.zig index f18f498b..a368ba26 100644 --- a/test/hxdiff.zig +++ b/test/hxdiff.zig @@ -5,13 +5,13 @@ const std = @import("std"); const pardes = @import("pardes"); const hxkeys = @import("hxkeys.zig"); -// Its own root, so src/main.zig's logFn does not apply here: the core it +// Its own root, so runtime/main.zig's logFn does not apply here: the core it // drives feeds every case's text through ghostty-vt, which narrates each // sequence it does not implement. Cut the libraries back to errors; the // per-case report goes through std.debug, so a mismatch stays loud. // The regex engine is dropped outright rather than cut back: an `s`/`S` case // types its pattern one key at a time, so mvzr is HANDED every incomplete -// prefix of it and logs each one at error level. src/main.zig drops the same +// prefix of it and logs each one at error level. runtime/main.zig drops the same // scope for the same reason. pub const std_options: std.Options = .{ .log_level = .err, .logFn = logFn }; diff --git a/test/hxlib.zig b/test/hxlib.zig index b6c1bfd3..da0cfb11 100644 --- a/test/hxlib.zig +++ b/test/hxlib.zig @@ -1,4 +1,4 @@ -//! hxdiff's cases on the library (`pardes-editor`, src/lib_editor.zig): +//! hxdiff's cases on the library (`pardes-editor`, core/lib_editor.zig): //! each case's keys typed into an editor value, its result printed as //! hxdiff prints a pane's, one line a case, for `hxdiff --actual` to hold //! against helix's goldens or the file pane (`zig build hxlib`). The diff --git a/test/kitty.zig b/test/kitty.zig index 1ba96745..6db6e8fc 100644 --- a/test/kitty.zig +++ b/test/kitty.zig @@ -1305,7 +1305,7 @@ test "kitty: a dumped and restored terminal keeps its images" { const restored = try pardes.dump.restore(r.p, r.p.dump_out.?, "/tmp/pardes-kitty.dump"); defer restored.deinit(); const pane = restored.panes[0].?; - // ghostty's snapshot of the emulator (src/term/terminal.zig) carries them. + // ghostty's snapshot of the emulator (core/term/terminal.zig) carries them. try std.testing.expect(pardes.Term.emulatorOf(pane.terminal.?).vt.screens.active.kitty_images.placements.count() > 0); } diff --git a/test/kitty_client.zig b/test/kitty_client.zig index 03ad629e..4f8d5f57 100644 --- a/test/kitty_client.zig +++ b/test/kitty_client.zig @@ -19,7 +19,7 @@ const sync = "\x1b_Gi=999,s=1,v=1,a=q,t=d,f=24;AAAA\x1b\\"; // The kernel's ioctls on Linux: glibc's tcgetattr writes its 60-byte // termios into Zig's 44-byte kernel one, and std.posix's calls glibc's in a -// program linking libc (src/main.zig exports kernel ones; this has none). +// program linking libc (runtime/main.zig exports kernel ones; this has none). const linux = @import("builtin").os.tag == .linux; fn getTermios() !std.posix.termios { diff --git a/test/lspbench.zig b/test/lspbench.zig index 4b107b25..b257b4f3 100644 --- a/test/lspbench.zig +++ b/test/lspbench.zig @@ -22,25 +22,25 @@ const Anchor = struct { }; const anchors = [_]Anchor{ - .{ .file = "src/edit.zig", .needle = "modal.cursorLineCount(text)", .at = 6, .kind = .definition, .expect = "modal.zig" }, - .{ .file = "src/lsp/lsp.zig", .needle = "lineCol(source", .at = 0, .kind = .definition, .expect = "lsp.zig" }, - .{ .file = "src/lsp/lsp.zig", .needle = "std.mem.count(u8", .at = 8, .kind = .definition, .expect = "mem.zig" }, - .{ .file = "src/lsp/lsp.zig", .needle = "lineCol(source", .at = 0, .kind = .hover, .expect = "" }, - .{ .file = "src/lsp/lsp.zig", .needle = "pub const Kind", .at = 11, .kind = .document_symbols, .expect = "Kind" }, - .{ .file = "src/modal.zig", .needle = "pub fn ", .at = 7, .kind = .document_symbols, .expect = "" }, - .{ .file = "src/lsp/lsp.zig", .needle = "pub const Kind", .at = 11, .kind = .references, .expect = "" }, + .{ .file = "core/edit.zig", .needle = "modal.cursorLineCount(text)", .at = 6, .kind = .definition, .expect = "modal.zig" }, + .{ .file = "core/lsp/lsp.zig", .needle = "lineCol(source", .at = 0, .kind = .definition, .expect = "lsp.zig" }, + .{ .file = "core/lsp/lsp.zig", .needle = "std.mem.count(u8", .at = 8, .kind = .definition, .expect = "mem.zig" }, + .{ .file = "core/lsp/lsp.zig", .needle = "lineCol(source", .at = 0, .kind = .hover, .expect = "" }, + .{ .file = "core/lsp/lsp.zig", .needle = "pub const Kind", .at = 11, .kind = .document_symbols, .expect = "Kind" }, + .{ .file = "core/modal.zig", .needle = "pub fn ", .at = 7, .kind = .document_symbols, .expect = "" }, + .{ .file = "core/lsp/lsp.zig", .needle = "pub const Kind", .at = 11, .kind = .references, .expect = "" }, .{ .file = "test/lspfixture/broken.zig", .needle = "unused_local", .at = 0, .kind = .diagnostics, .expect = "broken.zig" }, - .{ .file = "src/lsp/lsp.zig", .needle = "lineCol(source", .at = 0, .kind = .declaration, .expect = "" }, - .{ .file = "src/lsp/lsp.zig", .needle = "out: *std.Io.Writer", .at = 0, .kind = .type_definition, .expect = "" }, - .{ .file = "src/lsp/lsp.zig", .needle = "pub const Kind", .at = 11, .kind = .implementation, .expect = "" }, - .{ .file = "src/lsp/lsp.zig", .needle = "pub const Kind", .at = 11, .kind = .select_refs, .expect = "" }, + .{ .file = "core/lsp/lsp.zig", .needle = "lineCol(source", .at = 0, .kind = .declaration, .expect = "" }, + .{ .file = "core/lsp/lsp.zig", .needle = "out: *std.Io.Writer", .at = 0, .kind = .type_definition, .expect = "" }, + .{ .file = "core/lsp/lsp.zig", .needle = "pub const Kind", .at = 11, .kind = .implementation, .expect = "" }, + .{ .file = "core/lsp/lsp.zig", .needle = "pub const Kind", .at = 11, .kind = .select_refs, .expect = "" }, .{ .file = "test/lspfixture/broken.zig", .needle = "badly_spaced", .at = 0, .kind = .format, .expect = "" }, - .{ .file = "src/lsp/lsp.zig", .needle = "pub fn query", .at = 7, .kind = .code_action, .expect = "" }, - .{ .file = "src/lsp/lsp.zig", .needle = "pub fn query", .at = 7, .kind = .rename, .expect = "" }, - .{ .file = "src/lsp/lsp.zig", .needle = "pub const Kind", .at = 11, .kind = .workspace_symbols, .expect = "" }, + .{ .file = "core/lsp/lsp.zig", .needle = "pub fn query", .at = 7, .kind = .code_action, .expect = "" }, + .{ .file = "core/lsp/lsp.zig", .needle = "pub fn query", .at = 7, .kind = .rename, .expect = "" }, + .{ .file = "core/lsp/lsp.zig", .needle = "pub const Kind", .at = 11, .kind = .workspace_symbols, .expect = "" }, .{ .file = "test/lspfixture/broken.zig", .needle = "unused_local", .at = 0, .kind = .workspace_diagnostics, .expect = "broken.zig" }, - .{ .file = "src/lsp/lsp.zig", .needle = "std.mem.count(u8", .at = 4, .kind = .completion, .expect = "std.zig" }, - .{ .file = "src/normal.zig", .needle = ".definition => .definition,", .at = 1, .kind = .completion, .expect = "" }, + .{ .file = "core/lsp/lsp.zig", .needle = "std.mem.count(u8", .at = 4, .kind = .completion, .expect = "std.zig" }, + .{ .file = "core/normal.zig", .needle = ".definition => .definition,", .at = 1, .kind = .completion, .expect = "" }, // The repeated name proves the result includes the declaration, not just the cursor line. .{ .file = "test/lspfixture/dotcomplete.zig", .needle = "return switch (s) {\n .", .at = 29, .kind = .completion, .expect = "verdigris verdigris," }, // Indentation keeps the fixture header from becoming the first needle match. diff --git a/test/macos_e2e.swift b/test/macos_e2e.swift index 2b0eedad..74a03200 100644 --- a/test/macos_e2e.swift +++ b/test/macos_e2e.swift @@ -5,7 +5,7 @@ // zig build macos-e2e -Dplatform=macos -- --update regenerate goldens // zig build macos-e2e -Dplatform=macos -- test/macos-snapshots/boot.snap // -// This is the only test the Swift half has. src/macos.zig's ABI guard proves +// This is the only test the Swift half has. runtime/macos.zig's ABI guard proves // the header and the Zig side agree, and it runs on Linux; nothing there ever // constructs a PardesView, translates a gesture, or asks CoreText to paint a // glyph. So the harness links the SHIPPING view — not a stub, and with no test diff --git a/test/monkey9p.zig b/test/monkey9p.zig index a4bf92a3..1f213a3b 100644 --- a/test/monkey9p.zig +++ b/test/monkey9p.zig @@ -16,7 +16,7 @@ //! tape of what its sessions consumed and replaying it, as `PARDES_REPLAY` //! replays a real session's: into two replicas at different addresses and //! one that never draws, every digest checked, and each session's dump -//! loaded to its digest and dumped to its bytes again (src/tape.zig). +//! loaded to its digest and dumped to its bytes again (core/tape.zig). //! //! A step's op is drawn from the seed alone: the panes, columns and held //! files it names are tokens (`{p3}`: /index's 4th serial, mod its length, diff --git a/test/process.zig b/test/process.zig index 254aac22..8bcbddeb 100644 --- a/test/process.zig +++ b/test/process.zig @@ -608,7 +608,7 @@ pub const Detached = struct { try eh.writeFile(path, "initial\n"); break :blk path; }; - // The session's socket, as its 9P service links it (src/9p_io.zig). + // The session's socket, as its 9P service links it (runtime/9p_io.zig). const sock_path = try std.fmt.bufPrint(&d.socket_buf, "{s}/9p/pardes/{s}", .{ dir, opts.socket orelse name }); d.socket_len = sock_path.len; // A window takes no --detach: it is its own session, named by --9p. diff --git a/test/process/tty_boot.zig b/test/process/tty_boot.zig index 1d49dc8e..a5f42074 100644 --- a/test/process/tty_boot.zig +++ b/test/process/tty_boot.zig @@ -205,7 +205,7 @@ fn builtins(gpa: std.mem.Allocator, exe: [:0]const u8) !void { } // Dump writes the whole session to this fixture's $DUMP path, a dump of the -// walk (src/walk.zig), and `-l` of it is that session again: the text typed +// walk (core/walk.zig), and `-l` of it is that session again: the text typed // into a terminal over its history comes back where it was. fn dump(gpa: std.mem.Allocator, exe: [:0]const u8) !void { var t = try Tty.init(gpa, exe, "dump"); diff --git a/test/record_demos.py b/test/record_demos.py index 22dc8b7e..975991f7 100644 --- a/test/record_demos.py +++ b/test/record_demos.py @@ -12,7 +12,7 @@ stops, and presses and releases still, a ring and the button's name drawn. ffmpeg encodes the timeline to docs/site/media/<clip>.webm and .mp4, with <clip>.png as its poster and captions.txt beside them (clips.toml, which the site reads, is kept by hand). `themes` instead writes -docs/site/media/themes/<theme>.png for each theme of src/themes, in the +docs/site/media/themes/<theme>.png for each theme of core/themes, in the Themes builtin's order, and themes.toml. Needs a Wayland display for the hidden window, gcc and git for the demo @@ -857,7 +857,7 @@ def theme_scene(s): def theme_order(s): """The themes as the Themes builtin lists them, up to the imported - ones: pardes's own, the ports and the legacy pair (src/themes).""" + ones: pardes's own, the ports and the legacy pair (core/themes).""" s.write('/ctl', 'Themes\n') s.wait(lambda: any(s.read(f'/pane/{n}/name').strip().endswith('+Themes') for n in s.panes()), '+Themes') pane = next(n for n in s.panes() if s.read(f'/pane/{n}/name').strip().endswith('+Themes')) @@ -888,7 +888,7 @@ def save_theme_png(data, path): def record_themes(binary, work): - """docs/site/media/themes/<theme>.png for every theme of src/themes, in + """docs/site/media/themes/<theme>.png for every theme of core/themes, in the Themes builtin's order, and themes.toml listing them.""" make_project() s = Session(binary, work / 'themes', 'rec-themes', [PROJECT / 'src/main.c'], rows=22) diff --git a/test/replicas.zig b/test/replicas.zig index 07557924..a122ac9f 100644 --- a/test/replicas.zig +++ b/test/replicas.zig @@ -1,5 +1,5 @@ //! pardes-replicas: a session and its clients in one process -//! (src/replica.zig), each a process of its own for what a process holds +//! (core/replica.zig), each a process of its own for what a process holds //! (`Proc`): the session's own frontend typing in its view and drawing it, //! and each client (a terminal's loop or a window's, by turns) joined from //! the session's dump for a view of its own, typing at once over its own @@ -10,7 +10,7 @@ //! and joins again for its view, and those past the views a session has //! are refused until one is let go. //! -//! Terminals cross as screen state (src/term/screen_state.zig): the session's +//! Terminals cross as screen state (core/term/screen_state.zig): the session's //! shell pane runs a full-screen program and then a `yes` flood (`--flood` //! MB of it) while the clients type, its output stepped by the authority //! and sent to each replica as deltas, once a frame and before any input @@ -22,7 +22,7 @@ //! zig build replicas -Dplatform=tui -Doptimize=ReleaseFast -- --screen-state <dir> //! //! `--echo` types a corpus into a shell instead, with and without the -//! predicted echo (src/term/echo.zig), and gates what it draws: below, at +//! predicted echo (core/term/echo.zig), and gates what it draws: below, at //! "predicted echo". `--screen-state` runs recorded pty streams through //! screen_state's soak and measures its encoder: below, at screenState. //! @@ -1280,7 +1280,7 @@ fn run(r: Run, dir: []const u8, totals: *Totals) !void { } } // ...and every file's text the authority's, byte for byte: a digest - // takes a text of 4 KiB and up by its length (src/walk.zig). + // takes a text of 4 KiB and up by its length (core/walk.zig). for (a.core.panes, 0..) |slot, pid| { const f = (slot orelse continue).file orelse continue; const mine = if (rp.core().panes[pid]) |pane| pane.file else null; @@ -1380,7 +1380,7 @@ fn diffCase(dir: []const u8) !bool { return ok; } -/// Looks the plumber takes (src/plumbing), each as the authority's input +/// Looks the plumber takes (core/plumbing), each as the authority's input /// and as a replica's own: a URL (its web port: no disk asked, so a /// replica's own look speculates whole and is confirmed with no rollback), /// and a commit hash in a git work tree (Diff's `git show`, its `.git` @@ -1557,7 +1557,7 @@ fn sendUnit(q: *std.PriorityQueue(Msg, void, Msg.order), n: *u64, unit: []const // plain echo, no marks). Each key's echo comes back 2 ms after the authority // writes it, as a shell's. The client types at a typist's pace and in bursts; // each of its frames (60 Hz, a phase of its own) is what its screen shows: -// the predicted echo where it is drawn (src/term/echo.zig), the screen state +// the predicted echo where it is drawn (core/term/echo.zig), the screen state // under it. Per key the shell echoed at a prompt or in cat: the time from // the key to its character on that screen, with prediction and without. Per // key predicted: whether the authority's screen, right after its echo, diff --git a/test/rollback_bench.zig b/test/rollback_bench.zig index d734f5cf..796f7135 100644 --- a/test/rollback_bench.zig +++ b/test/rollback_bench.zig @@ -1,5 +1,5 @@ //! What a replica's rollback copy costs (docs/next-daemon.md, open point -//! 3, src/rollback.zig), and what a fork of the authority stalls it for +//! 3, core/rollback.zig), and what a fork of the authority stalls it for //! (open point 5). A typical session and a big one are built in process, on //! a rollback epoch's allocator as a replica's core is; for each: //! - the copy taken and let go: its time, the bytes it saves, the bytes @@ -8,8 +8,8 @@ //! the copy put back: the apply's time and the restore's. //! Then a fork of the big one, child gone at once, and the authority's //! copy-on-write after it. Last, a session's authority with a 100 MB file -//! open (src/replica.zig): a key into it, a unit as a replica is sent it, -//! and a digest (src/walk.zig: a big text by its length). +//! open (core/replica.zig): a key into it, a unit as a replica is sent it, +//! and a digest (core/walk.zig: a big text by its length). //! //! zig build rollback-bench -Dplatform=tui -Doptimize=ReleaseFast const std = @import("std"); diff --git a/test/session.zig b/test/session.zig index cd04ecb8..844ea2fe 100644 --- a/test/session.zig +++ b/test/session.zig @@ -51,7 +51,7 @@ pub const Session = struct { watches: pardes.file_watch.Table = @splat(null), /// A session showing one file pane holding `text`, keeping what outlives - /// it in a database in memory (src/Db.zig). + /// it in a database in memory (core/Db.zig). pub fn initFile(gpa: std.mem.Allocator, text: []const u8) !Session { const p = try Pardes.init(gpa, .{ .tty_only = true, .cols = 80, .rows = 24, .state = .memory }); errdefer p.deinit(); @@ -208,7 +208,7 @@ pub const Session = struct { /// Every session started from here on records what it consumes as a /// tape in memory, as PARDES_RECORD has a real one record it - /// (src/tape.zig); `replayTape` replays it once the session is gone. + /// (core/tape.zig); `replayTape` replays it once the session is gone. pub fn recordTape(gpa: std.mem.Allocator) !void { const t = try gpa.create(pardes.tape.Tape); t.* = pardes.tape.memory(gpa); @@ -270,7 +270,7 @@ pub const Session = struct { s.tag += 1; q.tag = s.tag; const r = pardesOf(s).serveFs(q); - // As the server does (src/9p_io.zig): a clunk's held lines run then. + // As the server does (runtime/9p_io.zig): a clunk's held lines run then. if (q.op == .release) pardes.ctlfs.runClosedLines(pardesOf(s)); s.drain(); // A Restore asked for is performed once its write is answered (the diff --git a/test/terminal.zig b/test/terminal.zig index cfc58e52..fafaa605 100644 --- a/test/terminal.zig +++ b/test/terminal.zig @@ -1,8 +1,8 @@ //! The terminal through the core (docs/next-terminal.md, Phase 1): what -//! were src/term/terminal.zig's and screen_state.zig's tests of a terminal +//! were core/term/terminal.zig's and screen_state.zig's tests of a terminal //! pane, moved as they were. They boot a core and read the emulator behind //! it, so they need both modules, which only a suite outside both has: -//! pane-test's (test/panes.zig). The emulator's own tests stay in src/term/. +//! pane-test's (test/panes.zig). The emulator's own tests stay in core/term/. const std = @import("std"); const pardes = @import("pardes"); const plain = @import("plain"); diff --git a/test/tty.zig b/test/tty.zig index d41159a0..a6e37c6c 100644 --- a/test/tty.zig +++ b/test/tty.zig @@ -46,7 +46,7 @@ pub var goldens: []const u8 = "test/snapshots"; /// (`--lspmock=`); empty leaves every language client off. pub var lspmock: []const u8 = ""; /// `--replay`: every session a case starts records its tape -/// (PARDES_RECORD, src/tape.zig), and the case fails unless each replays +/// (PARDES_RECORD, core/tape.zig), and the case fails unless each replays /// (PARDES_REPLAY) into its three replicas, the session's dump at its end /// loaded to its digest: what a real session's host answered (its shells, /// ptys and files) replayed, as the T1 runner's `--replay` replays an diff --git a/tools/demos/jumps.txt b/tools/demos/jumps.txt index 97189105..d87e087b 100644 --- a/tools/demos/jumps.txt +++ b/tools/demos/jumps.txt @@ -97,5 +97,5 @@ 104480 paste a pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\na pasted line, one of two hundred\n 105080 key escape 105780 phase look-new-pane -105780 exec Look ../../src/layout.zig:9000 +105780 exec Look ../../core/layout.zig:9000 107280 end diff --git a/tools/gen_themes.zig b/tools/gen_themes.zig index 3293349d..4f3946ad 100644 --- a/tools/gen_themes.zig +++ b/tools/gen_themes.zig @@ -1,6 +1,6 @@ //! Build-time generator: a vendored helix or zed theme in, one `.zig` file per //! theme out. build.zig runs it before anything compiles and hands the output -//! directory to src/pardes.zig as the `generated_themes` module, so a theme is +//! directory to core/root.zig as the `generated_themes` module, so a theme is //! an ordinary source file by the time the compiler sees it. //! //! ADDING A THEME IS DROPPING A FILE INTO `vendor/themes/`: a helix `.toml` or @@ -14,7 +14,7 @@ //! both projects ship — helix's runtime themes and zed's three families — //! because "which ones are worth having" is not a question a build tool gets //! to answer on the user's behalf. The one exception is helix's copy of a -//! theme pardes ports by hand (src/themes/: dracula, nord, ...): not vendored. +//! theme pardes ports by hand (core/themes/: dracula, nord, ...): not vendored. //! //! NAMES. A helix theme is its file stem; a zed variant is its `name` slugged //! with `_zed` on the end. Both projects ship gruvbox, ayu and one, so the @@ -26,7 +26,7 @@ //! `ayu_dark` and `nord` as `<name>_helix.toml`, kept (unlike helix's other //! copies of themes ported here) because helix themes inherit them; those //! `inherits` lines name the renamed file. Two themes answering to -//! one name is a bug (`Theme <name>` would silently pick one), so src/colors.zig +//! one name is a bug (`Theme <name>` would silently pick one), so core/colors.zig //! asserts the ring's names are distinct at comptime. //! //! Provenance: vendor/themes/*.toml are helix's own runtime themes (from @@ -54,7 +54,7 @@ const Rgb = [3]u8; /// pardes's Theme, minus the type: the generated file spells an anonymous /// `.{...}` because a theme file deliberately imports NOTHING (it is data, not -/// code) — src/colors.zig's `fold` is what turns it into a real Theme. +/// code) — core/colors.zig's `fold` is what turns it into a real Theme. const Theme = struct { name: []const u8, bg: ?Rgb, diff --git a/tools/shared_libs_check.zig b/tools/shared_libs_check.zig index d475f631..9634ce24 100644 --- a/tools/shared_libs_check.zig +++ b/tools/shared_libs_check.zig @@ -45,7 +45,7 @@ const always = [_]Family{ .{ .what = "a second zlib", .symbols = &.{ "inflate_table", "inflate_fast", "deflate_slow" }, .most = 1 }, // One FreeType: the build's, which MuPDF is compiled against. .{ .what = "a second FreeType", .symbols = &.{ "FT_Init_FreeType", "FT_New_Library" }, .most = 1 }, - // One zstd: the build's, a far replica's stream (src/replica.zig). + // One zstd: the build's, a far replica's stream (core/replica.zig). .{ .what = "a second zstd", .symbols = &.{ "ZSTD_compressStream2", "ZSTD_decompressStream", "ZSTD_createCCtx_advanced" }, .most = 1 }, }; diff --git a/vendor/queries/README.md b/vendor/queries/README.md index 2977e1cc..db80b763 100644 --- a/vendor/queries/README.md +++ b/vendor/queries/README.md @@ -18,7 +18,7 @@ grammars have no textobjects, and the keys do nothing there, as in helix without a query. `<grammar>/indents.scm` is helix's indent query for that grammar, vendored -the same way from the same commit, for src/indent.zig: the indent a new line +the same way from the same commit, for core/indent.zig: the indent a new line takes on Enter, `o` and `O`. Vendored for bash, c, c_sharp, clojure, cpp (with c's inlined), css, elixir, fortran, go, html, java, javascript (ecma's inlined), json, kotlin, ocaml, php, python, ruby, rust, scala and zig. diff --git a/vendor/queries/rust/indents.scm b/vendor/queries/rust/indents.scm index 0d63f197..6217c20c 100644 --- a/vendor/queries/rust/indents.scm +++ b/vendor/queries/rust/indents.scm @@ -1,6 +1,6 @@ ; Vendored from helix (https://github.com/helix-editor/helix) at 278b24389: ; runtime/queries/rust/indents.scm, MODIFIED: its three #match? patterns -; open with \A, which mvzr (src/regexp.zig) reads as a letter A; written +; open with \A, which mvzr (core/regexp.zig) reads as a letter A; written ; with ^, which a predicate here matches at the node's start alone. ; Licensed under the Mozilla Public License 2.0 (vendor/queries/helix.LICENSE, ; https://mozilla.org/MPL/2.0/). |
