diff --git a/.github/workflows/rust-multiplatform.yml b/.github/workflows/rust-multiplatform.yml index f98e75bdf..4857d3980 100644 --- a/.github/workflows/rust-multiplatform.yml +++ b/.github/workflows/rust-multiplatform.yml @@ -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) diff --git a/.github/workflows/rust-release.yml b/.github/workflows/rust-release.yml index 5780c0e36..c55766afb 100644 --- a/.github/workflows/rust-release.yml +++ b/.github/workflows/rust-release.yml @@ -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: diff --git a/.github/workflows/wasm-bundle-check.yml b/.github/workflows/wasm-bundle-check.yml index 9bf926fdb..d4d768695 100644 --- a/.github/workflows/wasm-bundle-check.yml +++ b/.github/workflows/wasm-bundle-check.yml @@ -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 diff --git a/Cargo.lock b/Cargo.lock index 4c05840b8..2243235c7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -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" diff --git a/crates/openpencil-app/Cargo.toml b/crates/openpencil-app/Cargo.toml deleted file mode 100644 index 970eeec26..000000000 --- a/crates/openpencil-app/Cargo.toml +++ /dev/null @@ -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 = [] diff --git a/crates/openpencil-app/src/main.rs b/crates/openpencil-app/src/main.rs deleted file mode 100644 index cfa9efdcd..000000000 --- a/crates/openpencil-app/src/main.rs +++ /dev/null @@ -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)"); -} diff --git a/crates/pen-codegen/Cargo.toml b/crates/pen-codegen/Cargo.toml deleted file mode 100644 index ecbe5d182..000000000 --- a/crates/pen-codegen/Cargo.toml +++ /dev/null @@ -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" } diff --git a/crates/pen-codegen/src/lib.rs b/crates/pen-codegen/src/lib.rs deleted file mode 100644 index 4b134ca9e..000000000 --- a/crates/pen-codegen/src/lib.rs +++ /dev/null @@ -1,5 +0,0 @@ -//! OpenPencil codegen. - -pub fn placeholder() -> String { - format!("pen-codegen ({})", pen_types::placeholder()) -} diff --git a/crates/pen-core/Cargo.toml b/crates/pen-core/Cargo.toml deleted file mode 100644 index f76f5cace..000000000 --- a/crates/pen-core/Cargo.toml +++ /dev/null @@ -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 } diff --git a/crates/pen-core/src/lib.rs b/crates/pen-core/src/lib.rs deleted file mode 100644 index 517d2cd83..000000000 --- a/crates/pen-core/src/lib.rs +++ /dev/null @@ -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")); - } -} diff --git a/crates/pen-engine/Cargo.toml b/crates/pen-engine/Cargo.toml deleted file mode 100644 index d8614b081..000000000 --- a/crates/pen-engine/Cargo.toml +++ /dev/null @@ -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" } diff --git a/crates/pen-engine/src/lib.rs b/crates/pen-engine/src/lib.rs deleted file mode 100644 index 43b945756..000000000 --- a/crates/pen-engine/src/lib.rs +++ /dev/null @@ -1,5 +0,0 @@ -//! OpenPencil rendering engine (canvas pipeline). - -pub fn placeholder() -> String { - format!("pen-engine ({})", pen_core::placeholder()) -} diff --git a/crates/pen-figma/Cargo.toml b/crates/pen-figma/Cargo.toml deleted file mode 100644 index 55f115e4d..000000000 --- a/crates/pen-figma/Cargo.toml +++ /dev/null @@ -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 } diff --git a/crates/pen-figma/src/lib.rs b/crates/pen-figma/src/lib.rs deleted file mode 100644 index 472cb2d29..000000000 --- a/crates/pen-figma/src/lib.rs +++ /dev/null @@ -1,5 +0,0 @@ -//! OpenPencil Figma adapter. - -pub fn placeholder() -> String { - format!("pen-figma ({})", pen_types::placeholder()) -} diff --git a/crates/pen-types/Cargo.toml b/crates/pen-types/Cargo.toml deleted file mode 100644 index 208969f4e..000000000 --- a/crates/pen-types/Cargo.toml +++ /dev/null @@ -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 } diff --git a/crates/pen-types/src/lib.rs b/crates/pen-types/src/lib.rs deleted file mode 100644 index bf1117a6c..000000000 --- a/crates/pen-types/src/lib.rs +++ /dev/null @@ -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"); - } -} diff --git a/tools/check-jian-boundaries.sh b/tools/check-jian-boundaries.sh index 315d5cffc..1cbf58ac4 100755 --- a/tools/check-jian-boundaries.sh +++ b/tools/check-jian-boundaries.sh @@ -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