Windows hosts for Tish: the Windows counterpart of tish-apple.
| Crate | What |
|---|---|
crates/tish-windows (tishlang_windows, tish:windows) |
Native UI host for Tish JSX plus Windows services (windows.run, windows.whenSettled, …) |
crates/tish-ms-common (tishlang_ms_common) |
The node tree and layout both hosts share (tish-macos's layout rules), tag names and prop helpers. Platform-free and tested anywhere |
crates/tish-ms |
The window and notifications tish_desktop uses behind its platform-ms feature |
import { windows, useState } from 'tish:windows'
fn App() {
let [q, setQ] = useState('')
return <div padding={12}><textinput value={q} onChange={setQ} placeholder="Search" /><text>{q}</text></div>
}
windows.run(App, { title: 'Hello', width: 480, height: 320, backdrop: 'mica' })
Shaped like tish-macos's, so an app's platform layer changes little between the two:
windows.pasteboard (read, write, watch), windows.workspace (open, reveal, Recycle Bin),
windows.shell.run (PowerShell, arguments as $args), windows.credentials (Credential
Manager), windows.hotkeys (system-wide), windows.statusItem (tray icon and menu),
windows.apps.installed() (Start menu), windows.icons (shell icons and image files) and
windows.window (show, hide, toggle, size). They work before windows.run too. A launcher-style
panel is windows.run(App, { borderless: true, toolWindow: true, topmost: true, hideOnBlur: true }).
The host is plain Win32: a DWM-backdrop window (Mica or Acrylic, dark mode, rounded corners) drawn
with Direct2D and DirectWrite, with a native EDIT control per textinput, and nothing to install.
Measured on windows-latest it paints first in 100–190 ms and re-renders a 1,000-item filtered list
in about 3 ms per keystroke at about 28 MB.
A WinUI 3 host (a XAML island on the same window) was built for comparison behind the winui
feature. It doesn't render yet, needs the Windows App SDK runtime installed, and loaded about a
second slower, so Win32 is the host; the WinUI code stays for reference. src/winui/bindings.rs is
generated by windows-bindgen 0.65 from the SDK's metadata for the types in src/winui/types.txt.
crates/tish-windows/examples/launcher-poc is the benchmark app (TISH_BENCH=1 types a query and
prints timings as JSON); bench.yml and try.yml run builds on windows-latest by hand.
From Windows, or cross from macOS/Linux with cargo-xwin
and LLVM (brew install llvm lld, cargo install cargo-xwin):
cargo test -p tishlang_ms_common # layout tests, any OS
cargo xwin check --target x86_64-pc-windows-msvc -p tishlang_windows # type-check for Windows
bash scripts/build-example.sh launcher-poc # dist/launcher-poc.exeSee docs/RELEASE.md.
MIT, © The Tish Project Authors (AUTHORS).