From c24c4bb73fcc7ee63ff08f9dea0f6bb0c35ab270 Mon Sep 17 00:00:00 2001 From: Kayshen-X Date: Fri, 19 Jun 2026 21:58:22 +0800 Subject: [PATCH] refactor: remove orphan op-app crate files Companion to the op-app doc-reference removals. op-app was a 47-line re-export shell with zero dependents (no crate deps on it, no imports, not in default-members/CI, ships nothing). Editor-UI composition lives in op-editor-ui; nothing to host here. YAGNI. --- crates/op-app/Cargo.toml | 44 ------------------------------------- crates/op-app/src/lib.rs | 47 ---------------------------------------- 2 files changed, 91 deletions(-) delete mode 100644 crates/op-app/Cargo.toml delete mode 100644 crates/op-app/src/lib.rs diff --git a/crates/op-app/Cargo.toml b/crates/op-app/Cargo.toml deleted file mode 100644 index 712fe88c5..000000000 --- a/crates/op-app/Cargo.toml +++ /dev/null @@ -1,44 +0,0 @@ -[package] -name = "op-app" -version.workspace = true -edition.workspace = true -rust-version.workspace = true -license.workspace = true -description = "OpenPencil composition root — re-exports the platform host entry points (op-host-native / op-host-web) and documents the editor app composition" - -[lib] -name = "op_app" -path = "src/lib.rs" - -# Phase 7.3 reorg: op-app is the thin composition root. The editor-UI -# composition itself (which widgets, the layout) already lives in the -# op-editor-ui crate, so there is no shared host bootstrap to host -# here today — op-app only re-exports the per-platform host entry -# points behind their target cfg. It deliberately stays thin (YAGNI): -# if real cross-host wiring later emerges, it lands here. - -# The platform-agnostic editor-UI composition. Wasm-clean and already -# a transitive dep of both hosts, so this direct edge costs nothing. -[dependencies] -op-editor-ui = { path = "../op-editor-ui" } - -# Native host — every non-wasm target incl. iOS / Android. Base edge WITHOUT -# `gl-host`, so the mobile cargo-check stays raster (no winit/glutin/skia-gl), -# matching op-host-native's own non-default gl-host (Phase 0 approach Y). -[target.'cfg(not(target_arch = "wasm32"))'.dependencies] -op-host-native = { path = "../op-host-native", version = "0.8.0" } - -# Desktop adds the interactive GL host: `gl-host` brings winit + skia-safe `gl` -# + `WidgetHostNative`, so `host_native::WidgetHostNative` (the documented native -# host API) is available on macOS / Linux / Windows. Cargo unifies this with the -# base edge above into one op-host-native with gl-host on desktop; mobile keeps -# the raster base. (The shipped desktop binary is op-host-desktop, which depends -# on op-host-native with gl-host directly.) -[target.'cfg(any(target_os = "macos", target_os = "linux", target_os = "windows"))'.dependencies] -op-host-native = { path = "../op-host-native", version = "0.8.0", features = ["gl-host"] } - -# Web host (wasm32-unknown-unknown bundle entry). Only resolved on -# the wasm32 target where op-host-web's cdylib / wasm-bindgen setup -# applies. -[target.'cfg(target_arch = "wasm32")'.dependencies] -op-host-web = { path = "../op-host-web", version = "0.8.0" } diff --git a/crates/op-app/src/lib.rs b/crates/op-app/src/lib.rs deleted file mode 100644 index 9d4431d55..000000000 --- a/crates/op-app/src/lib.rs +++ /dev/null @@ -1,47 +0,0 @@ -//! OpenPencil composition root. -//! -//! Phase 7.3 strangler reorg — `op-app` is the thin crate that names -//! the editor application's composition. It exists so the workspace -//! has one obvious "this is the app" entry point rather than two -//! free-standing host crates. -//! -//! ## What composes the app -//! -//! The editor-UI composition — which widgets exist, how they lay out, -//! the theme, the layout-resolved render scene — already lives in the -//! [`op_editor_ui`] crate. The canonical editor state lives in -//! `op-editor-core`; the `.op` loader in `op-pen-loader`. The two -//! platform hosts wire that shared composition to a concrete backend: -//! -//! - **`op-host-native`** — winit + skia-safe + accesskit GL host -//! (desktop + mobile). The desktop binary is `op-host-desktop`. -//! - **`op-host-web`** — the wasm32-unknown-unknown browser bundle -//! (`WebShell` + `mount()`). -//! -//! Because that composition is already factored into `op-editor-ui`, -//! there is no shared host *bootstrap* code left to extract — each -//! host owns only platform-specific backend wiring. So `op-app` is -//! deliberately thin (YAGNI): it re-exports the per-platform host -//! entry point behind its target `cfg` and serves as the documented -//! composition root. If genuine cross-host wiring later emerges, it -//! lands here. - -/// The platform-agnostic editor-UI composition (widgets, theme, -/// layout scene, render-backend facade, gesture types). -pub use op_editor_ui as editor_ui; - -/// The native host — winit + skia-safe + accesskit (desktop + mobile). -/// -/// Re-exported on every non-wasm target. The shipped desktop -/// executable lives in the `op-host-desktop` crate, which drives -/// [`host_native::WidgetHostNative`] from a winit event loop. -#[cfg(not(target_arch = "wasm32"))] -pub use op_host_native as host_native; - -/// The web host — the wasm32-unknown-unknown browser bundle entry. -/// -/// Re-exported only on the wasm32 target, where `op-host-web`'s -/// `cdylib` / wasm-bindgen setup applies. `host_web::mount` is the -/// JS-facing entry point. -#[cfg(target_arch = "wasm32")] -pub use op_host_web as host_web;