A thin binary linking ONLY op-web-daemon — no winit/glutin/muda/accesskit-adapters/skia-GL.
Routes --serve-web/--mcp/--mcp-http argv to op_web_daemon::web_canvas_server::run_web_canvas +
op_web_daemon::mcp_serve::{run,run_http} (mirrors the desktop dispatcher, headless-only — no GUI
fallback). Added to root default-members. VERIFIED via cargo tree: 0 winit/glutin/casement/muda/
accesskit-adapters + skia-safe without gl (raster) — the web-server image now excludes all
desktop/GL code, answering the original question. (Lock also drops the actor-removed op-app crate.)
76 lines
3.6 KiB
TOML
76 lines
3.6 KiB
TOML
[workspace]
|
||
resolver = "2"
|
||
# Use a glob instead of an explicit list: incremental crate creation in Step 0
|
||
# does not require editing `members` each time (per implementer Phase 1 batch 2
|
||
# workspace-masking feedback: listing a non-existent crate makes `cargo build -p X`
|
||
# fail at the resolve stage). The glob picks up every manifest under crates/,
|
||
# naturally supporting incremental creation.
|
||
members = ["crates/*"]
|
||
exclude = [
|
||
"vendor/agent",
|
||
"vendor/anthropic-agent-sdk",
|
||
"vendor/casement",
|
||
"vendor/jian",
|
||
"node_modules",
|
||
]
|
||
# A bare `cargo build` / `cargo test` (no `-p`, no `--workspace`) operates on
|
||
# this set only — the native shippable artifacts (the desktop app + the `op`
|
||
# CLI), exactly what `rust-release.yml` builds via `-p op-host-desktop -p op-cli`.
|
||
# This stops a plain `cargo build` from also compiling the wasm host
|
||
# (`op-host-web`) on the native target — a wasted compile, since its real build
|
||
# is always `cargo build -p op-host-web --target wasm32-unknown-unknown`. CI and
|
||
# the `package.json` cargo:* scripts are unaffected: they all pass `--workspace`
|
||
# explicitly, which overrides `default-members`.
|
||
default-members = ["crates/op-host-desktop", "crates/op-cli", "crates/op-host-web-server"]
|
||
|
||
[workspace.package]
|
||
version = "0.8.0"
|
||
edition = "2021"
|
||
rust-version = "1.85"
|
||
license = "MIT"
|
||
authors = ["ZSeven-W <fini.yang@gmail.com>"]
|
||
repository = "https://github.com/ZSeven-W/openpencil"
|
||
|
||
[workspace.dependencies]
|
||
serde = { version = "1", features = ["derive"] }
|
||
serde_json = { version = "1", features = ["unbounded_depth"] }
|
||
serde_stacker = "0.1"
|
||
thiserror = "1"
|
||
anyhow = "1"
|
||
tracing = "0.1"
|
||
|
||
# WASM-boundary related (per kickoff §1.2 blacklist = must not appear here).
|
||
# Intentionally NOT exposing tokio / reqwest / agent / pen-agent-cli /
|
||
# pen-server / native-tls in workspace.dependencies — these are used only
|
||
# inside native-only crates via dev-deps or target-specific deps.
|
||
|
||
# 2026-06-17: the `vendor/skia-safe-op` fork (rust-skia 0.97.0 + a
|
||
# `wasm_unknown` platform target) is RETIRED. Its only purpose was the
|
||
# from-scratch wasm32-unknown-unknown skia web build, which CanvasKit now
|
||
# replaces. With no wasm32 skia consumer left, `skia-safe` / `skia-bindings`
|
||
# resolve to upstream crates.io 0.97.0 — used only by the native desktop host
|
||
# (`op-host-desktop`) + `jian-skia`, where the fork was byte-identical anyway.
|
||
# No `[patch.crates-io]` needed.
|
||
|
||
# Release profile. Previously unset → Rust defaults (no LTO, codegen-units=16,
|
||
# symbols kept), which shipped a ~70 MB desktop binary. This governs every
|
||
# release build in the graph, including the excluded vendor/* path deps (their
|
||
# own [profile.release] blocks are inert — only the build-root profile applies).
|
||
[profile.release]
|
||
# `strip` removes the symbol table — measured ~7.5 MB off the native binary, and
|
||
# trims the wasm too (the production web bundle never needs symbol names).
|
||
strip = true
|
||
# Cross-crate inlining + dedup of monomorphized generics (e.g. PenNode::clone is
|
||
# duplicated ~20× without it). "thin" gets most of the win at a fraction of the
|
||
# fat-LTO link time.
|
||
lto = "thin"
|
||
# Lets the backend dedup within each crate; compounds with LTO. Costs release
|
||
# build time (single-threaded codegen of the big crates) — acceptable for the
|
||
# infrequent shippable/CI builds this profile targets.
|
||
codegen-units = 1
|
||
# opt-level is intentionally LEFT AT 3 (the default), NOT "s"/"z": both the
|
||
# native and the wasm builds run the hot paint/layout/hit-test loop, and
|
||
# size-opt levels measurably slow it. panic = "abort" is also intentionally NOT
|
||
# set yet — it needs a thread-isolation audit of the chat/codegen workers, some
|
||
# of which rely on unwinding to contain a panicking task.
|