- .prettierignore: 加 vendor/agent + vendor/jian + target/(submodule 不在本仓 format 范围) - vendor/agent: 62c4bad(cosmetic format-only delta in agent-rs) - root + shell-native + shell-web Cargo.toml / deny.toml / README.md / wasm-bundle-check workflow: oxfmt auto-style
99 lines
4.8 KiB
TOML
99 lines
4.8 KiB
TOML
[package]
|
|
name = "openpencil-shell-native"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
rust-version.workspace = true
|
|
license.workspace = true
|
|
description = "OpenPencil shell — native (winit + skia-safe + accesskit) backend, integrating jian-skia + jian-host-desktop sub-pieces (spec v19 §3 / §5.2.1)"
|
|
|
|
[lib]
|
|
name = "openpencil_shell_native"
|
|
path = "src/lib.rs"
|
|
|
|
[dependencies]
|
|
openpencil-shell-core = { path = "../openpencil-shell-core", version = "0.1.0" }
|
|
|
|
# Native-only deps cfg-gated outside wasm32. This is critical (resolves codex round 2 B1 BLOCK):
|
|
# without cfg-gate, cargo would fetch + run skia-safe's build.rs (which fails on wasm32),
|
|
# and the Step 5 grep `must NOT be compiled for wasm32` would never match — masked by
|
|
# the skia build error.
|
|
#
|
|
# v19 pivot (Task 1): add P0-pinned GL stack + jian-skia + jian-host-desktop.
|
|
# - P0 dep-stack pin comes from the P0 probe (plan v7 §Task P0; skia-safe 0.97 + glow 0.17 +
|
|
# glutin 0.32.3 + glutin-winit 0.5.0 + winit 0.30.13 + raw-window-handle 0.6.2 +
|
|
# scopeguard 1.2 all GO on macOS/Windows/Linux).
|
|
# - jian-skia (textlayout feature) provides SkiaBackend impl + skia textlayout (replaces parley).
|
|
# - jian-host-desktop (target-gated desktop only, without the `run` feature) reuses
|
|
# PointerTranslator / scene::collect_draws_with_state / DesktopHost config helpers;
|
|
# OP runs its own GPU event loop and does not call jian_host_desktop::run (softbuffer
|
|
# raster present is not needed).
|
|
#
|
|
# winit features note: on Linux you MUST explicitly enable `x11` and/or `wayland`,
|
|
# otherwise `platform_impl/mod.rs` triggers `compile_error!`. macOS / Windows backends
|
|
# are auto-enabled via cfg(target_os) and need no feature flag. Step 1a runs CI on all
|
|
# three desktop OSes, so enabling both x11 + wayland Linux backends is sufficient.
|
|
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
|
skia-safe = { version = "0.97.0", features = ["gl"] }
|
|
glutin = "0.32.3"
|
|
glutin-winit = "0.5.0"
|
|
glow = "0.17.0"
|
|
winit = { version = "0.30.13", default-features = false, features = [
|
|
"x11",
|
|
"wayland",
|
|
"wayland-csd-adwaita",
|
|
"rwh_06",
|
|
] }
|
|
raw-window-handle = "0.6.2"
|
|
scopeguard = "1.2"
|
|
|
|
# Jian path deps — both path + version per spec §12.2.
|
|
# - jian-core: exposes DrawOp / Paint / TextRun / geometry / scene::Color. `shell-core`
|
|
# also pulls jian-core; shell-native uses it directly so the NativeBackend translation
|
|
# path can construct `jian_core::render::DrawOp::*` without bouncing through the
|
|
# shell-core re-export each frame.
|
|
# - jian-skia: provides SkiaBackend (RenderBackend impl) + skia textlayout (the textlayout
|
|
# feature pulls ICU + harfbuzz, ~15MB; P0.5 already bumped skia-safe 0.78→0.97 and
|
|
# added a public draw_on_canvas).
|
|
jian-core = { path = "../../vendor/jian/crates/jian-core", version = "0.0.1" }
|
|
jian-skia = { path = "../../vendor/jian/crates/jian-skia", version = "0.0.1", features = [
|
|
"textlayout",
|
|
] }
|
|
|
|
# jian-host-desktop: target-gated desktop only (Linux/macOS/Windows); not pulled into
|
|
# android/ios metadata (verified by Task 1 Step 26 boundary check).
|
|
# - default-features = false: Jian's default features include `run = ["dep:softbuffer"]`
|
|
# for raster present; OP runs its own GPU event loop and doesn't need softbuffer.
|
|
# - features = ["textlayout"]: aligns the text path with jian-skia.
|
|
[target.'cfg(any(target_os = "macos", target_os = "linux", target_os = "windows"))'.dependencies]
|
|
jian-host-desktop = { path = "../../vendor/jian/crates/jian-host-desktop", version = "0.0.1", default-features = false, features = [
|
|
"textlayout",
|
|
] }
|
|
|
|
# tracing for span instrumentation across SharedSkiaContext / NativeBackend
|
|
# (spec §3.3 / §5.2.1; Task 2 Step 15 dictates per-method spans).
|
|
[dependencies.tracing]
|
|
workspace = true
|
|
|
|
# thiserror for ProviderError / SharedSkiaError enums (context module).
|
|
[dependencies.thiserror]
|
|
workspace = true
|
|
|
|
# Task 2 dev-dependencies (spec §9 + plan v7 Steps 16a-16f):
|
|
# - sysinfo: 100-loop RSS sanity (memory_loop.rs)
|
|
# - tracing-test: capture span emission (tracing_spans.rs)
|
|
# - khronos-egl: Linux EGL pbuffer GPU smoke (gpu_smoke.rs / gpu_chrome_stub_composition.rs)
|
|
[dev-dependencies]
|
|
sysinfo = "0.30"
|
|
# `no-env-filter` is required for integration tests — the default filter
|
|
# only captures logs from the test crate itself, but our `#[tracing::instrument]`
|
|
# spans live inside `openpencil_shell_native::*`. (Per upstream README §136.)
|
|
tracing-test = { version = "0.2", features = ["no-env-filter"] }
|
|
|
|
# EGL pbuffer dev-dep is Linux-only — macOS/Windows GPU smoke takes other
|
|
# paths (invisible winit window / manual). Gating with `target.'cfg(...)'`
|
|
# keeps `cargo check` on non-Linux quiet about the un-fetchable pkg-config
|
|
# requirement. khronos-egl 6.x covers Mesa softpipe pbuffer creation.
|
|
[target.'cfg(target_os = "linux")'.dev-dependencies]
|
|
khronos-egl = { version = "6", features = ["dynamic"] }
|
|
libloading = "0.8"
|