chore: delete dead pen-* stub crates + openpencil-app

This commit is contained in:
Kayshen-X 2026-05-16 12:45:07 +08:00
parent 012728dd0a
commit 8573374ef0
17 changed files with 19 additions and 331 deletions

View file

@ -114,16 +114,9 @@ jobs:
- name: Test (host, macOS / Windows)
if: matrix.cross == false && matrix.check_only != true && runner.os != 'Linux'
run: cargo test --workspace --target ${{ matrix.target }}
- name: Upload openpencil-app binary
if: matrix.cross == false && matrix.check_only != true
uses: actions/upload-artifact@v4
with:
name: openpencil-app-${{ matrix.label }}
path: |
target/${{ matrix.target }}/release/openpencil-app
target/${{ matrix.target }}/release/openpencil-app.exe
if-no-files-found: ignore
retention-days: 14
# Desktop binary artifact upload removed with the `openpencil-app`
# placeholder crate (Phase 1 Task 1.2). Step 1f reintroduces a
# real desktop binary (new `op-*` crate) and its upload step here.
wasm-web:
name: wasm32-unknown-unknown / openpencil-shell-web (compile guard)

View file

@ -1,13 +1,12 @@
name: Rust release artifacts
# Triggered on tag push (v*) — builds release binaries across desktop targets
# and uploads them to a GitHub Release draft. The wasm web bundle is currently
# DEFERRED (see comment block above the removed `wasm` job below); when the
# CI-side C-hard pipeline (emscripten install + EMSDK + symlink hack +
# wasm-bindgen + wasm-opt) lands it will re-enter the matrix. Step 1a
# kill-spike only ships `openpencil-app` (a placeholder binary entry); real
# desktop apps (DMG / AppImage / EXE installer) come in Step 1f and replace
# this scaffolding.
# Triggered on tag push (v*) — assembles a GitHub Release draft. The desktop
# binary build job has been removed: the `openpencil-app` placeholder crate
# was deleted in Phase 1 Task 1.2, and real desktop apps (DMG / AppImage / EXE
# installer) arrive in Step 1f as new `op-*` crates that will reintroduce a
# build matrix here. The wasm web bundle is currently DEFERRED (see comment
# block below); when the CI-side C-hard pipeline (emscripten install + EMSDK +
# symlink hack + wasm-bindgen + wasm-opt) lands it will re-enter the matrix.
on:
push:
@ -15,95 +14,6 @@ on:
workflow_dispatch:
jobs:
build:
name: ${{ matrix.label }}
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- label: macos-aarch64
runner: macos-latest
target: aarch64-apple-darwin
archive: tar.gz
# macos-13 (Intel) deprecated; cross-compile x86_64-apple-darwin
# from Apple Silicon (cargo supports cross-compile to host's other
# arch out of the box, no `cross` needed).
- label: macos-x86_64
runner: macos-latest
target: x86_64-apple-darwin
archive: tar.gz
- label: linux-x86_64
runner: ubuntu-latest
target: x86_64-unknown-linux-gnu
archive: tar.gz
- label: linux-aarch64
runner: ubuntu-latest
target: aarch64-unknown-linux-gnu
archive: tar.gz
cross: true
- label: windows-x86_64
runner: windows-latest
target: x86_64-pc-windows-msvc
archive: zip
# Windows ARM64 — cargo cross-compile from x86_64 windows runner.
- label: windows-aarch64
runner: windows-latest
target: aarch64-pc-windows-msvc
archive: zip
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: '1.85'
targets: ${{ matrix.target }}
- uses: Swatinem/rust-cache@v2
with:
key: release-${{ matrix.target }}
- name: Install Linux GL/EGL prereqs
if: runner.os == 'Linux' && matrix.cross != true
run: |
sudo apt-get update
sudo apt-get install -y \
libxkbcommon-dev libxkbcommon-x11-dev \
libwayland-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev \
libegl1-mesa-dev libgles2-mesa-dev libgbm-dev \
libfreetype-dev libfontconfig1-dev
- name: Install cross
if: matrix.cross == true
run: cargo install cross --locked --version 0.2.5
- name: Build (host)
if: matrix.cross != true
run: cargo build -p openpencil-app --target ${{ matrix.target }} --release
- name: Build (cross)
if: matrix.cross == true
run: cross build -p openpencil-app --target ${{ matrix.target }} --release
- name: Package archive (unix)
if: matrix.archive == 'tar.gz'
shell: bash
run: |
cd target/${{ matrix.target }}/release
tar czf ../../../openpencil-app-${{ matrix.label }}.tar.gz openpencil-app 2>/dev/null || \
tar czf ../../../openpencil-app-${{ matrix.label }}.tar.gz openpencil-app.placeholder
- name: Package archive (windows)
if: matrix.archive == 'zip'
shell: pwsh
run: |
Compress-Archive `
-Path target\${{ matrix.target }}\release\openpencil-app.exe `
-DestinationPath openpencil-app-${{ matrix.label }}.zip `
-ErrorAction SilentlyContinue
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: openpencil-app-${{ matrix.label }}
path: |
openpencil-app-${{ matrix.label }}.tar.gz
openpencil-app-${{ matrix.label }}.zip
if-no-files-found: ignore
# Phase 1b release wasm artifact: explicitly DEFERRED (not silently
# dropped). The local C-hard pipeline (vendor/skia-safe-op fork +
# crates/wasm-libc-shim) does produce a runtime-loadable
@ -125,10 +35,11 @@ jobs:
release-draft:
name: Create / update GitHub Release draft
# `wasm` job deferred (see comment block above); when the
# CI-side C-hard pipeline lands, re-add the job and append its
# name to this `needs:` list.
needs: [build]
# Desktop `build` job removed with the `openpencil-app` placeholder
# crate (Phase 1 Task 1.2); the `wasm` job is deferred (see comment
# block above). When the Step 1f `op-*` desktop crates and the
# CI-side C-hard pipeline land, re-add those jobs and list their
# names in this `needs:` field.
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:

View file

@ -30,8 +30,6 @@ jobs:
run: |
cargo check --target wasm32-unknown-unknown \
-p openpencil-shell-web --no-default-features --features web
cargo check --target wasm32-unknown-unknown \
-p pen-types -p pen-core -p pen-engine -p pen-codegen -p pen-figma
wasm32-deny:
name: cargo-deny --target wasm32-unknown-unknown check bans

46
Cargo.lock generated
View file

@ -2380,10 +2380,6 @@ version = "1.21.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
[[package]]
name = "openpencil-app"
version = "0.1.0"
[[package]]
name = "openpencil-desktop"
version = "0.1.0"
@ -2530,48 +2526,6 @@ version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c5a797f0e07bdf071d15742978fc3128ec6c22891c31a3a931513263904c982a"
[[package]]
name = "pen-codegen"
version = "0.1.0"
dependencies = [
"pen-types",
]
[[package]]
name = "pen-core"
version = "0.1.0"
dependencies = [
"pen-types",
"serde",
"thiserror 1.0.69",
]
[[package]]
name = "pen-engine"
version = "0.1.0"
dependencies = [
"pen-core",
"pen-types",
]
[[package]]
name = "pen-figma"
version = "0.1.0"
dependencies = [
"pen-types",
"serde",
"serde_json",
]
[[package]]
name = "pen-types"
version = "0.1.0"
dependencies = [
"serde",
"serde_json",
"thiserror 1.0.69",
]
[[package]]
name = "percent-encoding"
version = "2.3.2"

View file

@ -1,15 +0,0 @@
[package]
name = "openpencil-app"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
description = "OpenPencil entry point (Step 5 Stage F shell entry placeholder)"
[[bin]]
name = "openpencil-app"
path = "src/main.rs"
[features]
default = []
shell-native = []

View file

@ -1,6 +0,0 @@
// OpenPencil application entry point.
// Stage F cutover replaces this skeleton with the real shell host.
fn main() {
println!("openpencil-app placeholder (Step 0 skeleton — see kickoff spec §2 Step 5)");
}

View file

@ -1,14 +0,0 @@
[package]
name = "pen-codegen"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
description = "OpenPencil codegen (.op → React/Vue/Svelte/...) — bucket A in-WASM"
[lib]
name = "pen_codegen"
path = "src/lib.rs"
[dependencies]
pen-types = { path = "../pen-types", version = "0.1.0" }

View file

@ -1,5 +0,0 @@
//! OpenPencil codegen.
pub fn placeholder() -> String {
format!("pen-codegen ({})", pen_types::placeholder())
}

View file

@ -1,16 +0,0 @@
[package]
name = "pen-core"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
description = "OpenPencil core engine (Action DSL / Signal graph) — bucket A in-WASM"
[lib]
name = "pen_core"
path = "src/lib.rs"
[dependencies]
pen-types = { path = "../pen-types", version = "0.1.0" }
serde = { workspace = true }
thiserror = { workspace = true }

View file

@ -1,15 +0,0 @@
//! OpenPencil core engine.
pub fn placeholder() -> String {
format!("pen-core ({})", pen_types::placeholder())
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn skeleton_links_types() {
assert!(placeholder().contains("pen-types"));
}
}

View file

@ -1,15 +0,0 @@
[package]
name = "pen-engine"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
description = "OpenPencil rendering engine (canvas viewport, signal-driven render) — bucket A in-WASM"
[lib]
name = "pen_engine"
path = "src/lib.rs"
[dependencies]
pen-types = { path = "../pen-types", version = "0.1.0" }
pen-core = { path = "../pen-core", version = "0.1.0" }

View file

@ -1,5 +0,0 @@
//! OpenPencil rendering engine (canvas pipeline).
pub fn placeholder() -> String {
format!("pen-engine ({})", pen_core::placeholder())
}

View file

@ -1,16 +0,0 @@
[package]
name = "pen-figma"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
description = "OpenPencil Figma import/export — bucket A in-WASM"
[lib]
name = "pen_figma"
path = "src/lib.rs"
[dependencies]
pen-types = { path = "../pen-types", version = "0.1.0" }
serde = { workspace = true }
serde_json = { workspace = true }

View file

@ -1,5 +0,0 @@
//! OpenPencil Figma adapter.
pub fn placeholder() -> String {
format!("pen-figma ({})", pen_types::placeholder())
}

View file

@ -1,16 +0,0 @@
[package]
name = "pen-types"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
description = "OpenPencil core types (PenNode / Layer / Style / .op format) — bucket A in-WASM"
[lib]
name = "pen_types"
path = "src/lib.rs"
[dependencies]
serde = { workspace = true }
serde_json = { workspace = true }
thiserror = { workspace = true }

View file

@ -1,23 +0,0 @@
//! OpenPencil core types.
//!
//! Per kickoff spec §1.2 bucket A: must compile on wasm32-unknown-unknown.
#[derive(Debug, thiserror::Error)]
pub enum PenError {
#[error("placeholder error")]
Placeholder,
}
pub fn placeholder() -> &'static str {
"pen-types skeleton"
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn skeleton_works() {
assert_eq!(placeholder(), "pen-types skeleton");
}
}

View file

@ -4,9 +4,10 @@
# Verifies the following Jian crate boundary invariants from outside the
# Rust build system. Run from the repo root.
#
# Invariant 1 (§12.3): openpencil-app must NOT depend directly on any
# `jian-*` crate — Jian is a shell-native implementation detail; the
# app only sees OP's `RenderBackend` / `ShellEvent` facade.
# (The former Invariant 1 — "openpencil-app must not depend directly on
# any jian-* crate" — was dropped in Phase 1 Task 1.2 along with the
# `openpencil-app` placeholder crate. Step 1f reintroduces a real app
# crate; reinstate an equivalent facade check against it then.)
#
# Invariant 2 (§11.1, §12.3 — REVISED 2026-05-10): mobile targets
# (`aarch64-linux-android`, `aarch64-apple-ios`) must NOT pull
@ -43,24 +44,6 @@ if ! command -v jq >/dev/null 2>&1; then
exit 2
fi
# ── Invariant 1: openpencil-app has no direct jian-* dependency. ──────
# `cargo metadata` returns a workspace-wide resolve graph; we filter
# the `resolve.nodes[]` entry whose name matches `openpencil-app` and
# inspect its direct `deps[]`. A direct dep on any `jian-*` crate
# fails the invariant.
metadata_full="$(cargo metadata --format-version 1)"
forbidden_app="$(echo "$metadata_full" | jq -r '
[.packages[] | select(.name == "openpencil-app") | .id] as $app_ids
| .resolve.nodes[]
| select(.id as $id | $app_ids | index($id))
| .deps[].name
' | grep -E '^jian-' || true)"
if [ -n "$forbidden_app" ]; then
echo "INVARIANT 1 FAILED: openpencil-app directly depends on jian-* crate(s):" >&2
echo "$forbidden_app" >&2
exit 1
fi
# ── Invariant 2: mobile targets don't pull jian-host-desktop. ─────────
# `cargo tree` honours `--target` cfg-gates so only the deps that
# actually compile under the mobile target are listed. `jian-skia` IS