prompt logo

prompt

Free

Architect cross-platform desktop apps that feel native.

FreeFree tier
Inputs: textOutputs: text
Type
Open Source

About prompt

This is a detailed system prompt designed for an AI to act as a 'Native-Feel Cross-Platform Desktop Architect'. It encapsulates the philosophy, architecture, and concrete pitfalls drawn from Raycast's public technical deep-dive on their 2.0 rewrite and verified by reverse-engineering the shipping Raycast Beta.app binary. The prompt provides eight core tenets (e.g., 'Place the seam at the rendering surface', 'Adopt the platform; don’t compete with it', 'Performance is a property of perception') and a four-layer architecture: a native shell (Swift/AppKit on macOS, C#/WPF on Windows) that owns windowing and lifecycle, an embedded system WebView as a rendering surface for a shared React/TypeScript UI, a long-lived Node.js process for business logic, and Rust for performance-critical subsystems connected via UniFFI-generated typed bindings. It also includes a decision tree to determine when this architecture is appropriate versus when to build fully native or stick with simpler Electron setups. The entire approach fits in approximately 400 MB resident memory, with a baseline of ~150 MB.

Key Features

Guides AI to advise on native-feel cross-platform desktop architecture
Includes eight design tenets derived from Raycast's 2.0 rewrite
Provides a decision tree for when to recommend this architecture vs. native or Electron
Describes a four-layer architecture: native shell, WebView, Node.js, Rust
Focuses on perceived performance, platform adoption, and fast iteration loops
Covers IPC design with async, batched, schema-typed crossing
Emphasizes identity as muscle memory (hotkeys, rank order, verbs)

Pros & Cons

Pros
  • Provides a comprehensive, real-world-based architecture framework
  • Includes a clear decision tree to avoid misapplying the pattern
  • Covers both high-level philosophy and concrete implementation details
  • Structured to guide AI responses with specific, actionable advice
Cons
  • Limited to the specific native-shell-plus-WebView architecture pattern
  • Assumes familiarity with Swift/AppKit, C#/WPF, React, TypeScript, Node.js, and Rust
  • Not suitable for apps with very strict cold-start or memory budgets
  • Does not cover other viable cross-platform approaches (e.g., Flutter, Qt)

Best For

Advising on architecture for a cross-platform desktop app that must feel nativeDesigning a desktop application using a native shell with embedded WebViewEvaluating trade-offs between Electron, native development, and hybrid approachesLearning from Raycast's real-world architecture and performance optimizationsTraining AI to provide architectural recommendations with a structured decision framework

FAQ

What is the central tension this prompt addresses?
How to deliver convenient cross-platform development AND near-native performance when those goals usually pull against each other.
What are the eight tenets of the architecture?
1. Place the seam at the rendering surface. 2. One schema, many languages. 3. Adopt the platform; don't compete with it. 4. Performance is a property of perception. 5. The short iteration loop is the product. 6. Cross boundaries intentionally. 7. Identity is muscle memory. 8. Separate baseline from margin.
When should this architecture NOT be used?
If the cold-start budget is under 100 ms, memory floor under 150 MB, the app is single-OS, or it's a game, document editor, or media player. For a low-polish Electron-style app, normal Electron is fine.
What languages and runtimes are used in the architecture?
Native shell: Swift/AppKit on macOS, C#/WPF on Windows. UI: React/TypeScript running in the system WebView. Business logic: Node.js. Performance-critical subsystems: Rust, exposed via UniFFI-generated typed bindings.