openpencil/crates/op-app/Cargo.toml
Kayshen-X 4b8e0ce956 refactor(rust): add op-app composition-root crate
Phase 7.3 strangler reorg — add op-app, the thin crate that names the
editor application's composition root.

Investigation found no shared host bootstrap left to extract: the
editor-UI composition (widgets, theme, layout scene) already lives in
op-editor-ui, and each host (op-host-native / op-host-web) owns only
platform-specific backend wiring. So per YAGNI op-app stays thin — it
re-exports op-editor-ui plus the per-platform host entry point behind
its target cfg, and documents the composition. If real cross-host
wiring later emerges, it lands here.

Builds green on both native and wasm32-unknown-unknown.
2026-05-16 23:57:03 +08:00

36 lines
1.5 KiB
TOML

[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 (winit + skia-safe + accesskit) — desktop + mobile, NOT
# wasm. Mirrors op-host-native's own target gate so op-app stays
# wasm32-clean and mobile-checkable.
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
op-host-native = { path = "../op-host-native", version = "0.1.0" }
# 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.1.0" }