Skip to content

About

The shared Tauri app-shell + release tooling for warden, curator, and lector

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

shell-core

The shared Tauri app-shell + release tooling for curator, warden, and lector — one release pipeline, many apps.

Platform Rust License

curator (browser keeper-tabs), warden (terminals), and lector (local doc sites) are sibling macOS Tauri apps. shell-core holds their shared build/release tooling and Tauri runtime setup, alongside chrome-core (the view) and config-core (config primitives).

It has two parts, split by Cargo feature:

  • Build/release tooling (default, zero-dependency). The scripts in scripts/: release.sh (the one-command release — build + notarize, then tag, fast-forward main, push and publish the GitHub release with its assets), the updater-manifest, install and launch helpers, and core-patch.sh (switches an app between a local checkout of a shared core and its pinned git rev). A consuming app's build.rs writes them into its own scripts/ (git-ignored) via materialize_scripts. App-specific values are read from a tracked per-app scripts/tooling.env (template: scripts/tooling.env.example). The second build-time helper, build_stamp(), stamps the git sha and date for the About box. This feature set also exports tabs::pick_live_neighbour, which picks the tab that becomes active after one unloads.
  • Runtime (runtime feature). The shared app-shell:
    • register_plugins(builder, config_path, skip_labels) installs the shared plugins — geometry, the updater, and the process plugin (for the updater's relaunch) — and the custom protocols that serve the home and detach windows (below).
    • geometry persists each window's size and position in AppKit points, clamped to the target monitor's work area on restore, and never recorded while a window is fullscreen or minimized. Each config file gets its own saved geometry (geometry_filename). Restored geometry is correct across monitors with different scale factors.
    • menu::build_spine() builds the menu spine — the App submenu (About, Check for Updates…), the Config submenu (Edit Config / Reveal in Finder), and the Window submenu (a checked per-window selector), plus the Close Tab / Pop Out Tab / Find in Sidebar items, with constants for the close shortcuts all three apps share (⌘W closes a tab, ⌘⇧W the window). It returns the submenus and items for the app to interleave with its own per-app items; it does not set the menu. menu::build_tab_nav() builds the tab-navigation block (Previous/Next Tab, ⌘1–⌘9).
    • home::{home_state, show_home, close_home} is the home surface: the window an app shows when no other window is open. It shows the window list, a load error, or (with no config) a prompt to create one, so a fresh install never launches to nothing. The app wires the actions, including the "Create a starter config" button.
    • detach pops a tab out into its own window: shell-core provides the window and its banner; the app moves the tab's content into it.
    • compositing positions content webviews in the area the sidebar leaves free (HoleRect, layout_webviews). Used by curator and lector.
    • watch is the config-file hot-reload watcher (it ignores the app's own format-on-save writes); the app re-parses the file. Used by curator and lector.
    • mouse_nav drives WKWebView back/forward from the mouse side buttons, and progress_bar draws the page-load bar on each content webview. Used by curator and lector.

Status

In use by warden, curator, and lector. Kept in each app, not here: sending events to the app's webviews, warden's config watcher and native compositing, each app's own menu items, and curator's check that only its sidebar can call certain commands.

How it's consumed

Each app pins shell-core by git rev twice: with no features (no Tauri) as a build-dependency for build.rs, and with the runtime feature for the app itself:

[build-dependencies]
shell-core = { git = "https://github.com/Lockyc/shell-core", rev = "<commit>", default-features = false }

[dependencies]
shell-core = { git = "https://github.com/Lockyc/shell-core", rev = "<commit>", features = ["runtime"] }

build.rs materializes the scripts + stamps the build:

shell_core::materialize_scripts(std::path::Path::new("../scripts"))?; // path from the crate to repo scripts/
shell_core::build_stamp();

and the app commits its scripts/tooling.env (see scripts/tooling.env.example).

Development

just gate       # pre-merge: zero-dep + fmt check + clippy + tests
just test       # the test suite
just zero-dep   # prove the default feature set still pulls no dependencies

License

MIT © Lachlan Collins

About

The shared Tauri app-shell + release tooling for warden, curator, and lector

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages