Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
04c00ec
Rewrite the Linux plan: Rust core, QML display on Omarchy, GPUI manag…
everettjf Nov 18, 2026
1dca2f6
Linux phase 0: Rust engine with parity, display, Skia and GPUI checks
everettjf Nov 18, 2026
2a1bc92
Linux phase 1: packages on disk
everettjf Nov 18, 2026
2782724
Add the Linux painter: sw-render, element tree to bitmap and tap regi…
everettjf Nov 18, 2026
60d60f9
Linux phase 1B: native APIs, Data Source Plugins and the timeline pla…
everettjf Nov 18, 2026
96a4e8d
Merge branch 'worktree-agent-ae180f80ce2b0faf0' into linux
everettjf Nov 18, 2026
8e24f0e
Merge branch 'worktree-agent-ad1942bbe58755f64' into linux
everettjf Nov 18, 2026
90a871d
Link ICU after the shim that uses it
everettjf Nov 18, 2026
eb9d75b
Linux phase 1: command line, CI workflow and documentation
everettjf Nov 18, 2026
9846e47
Record the clean Omarchy 4.5 machine and the first Linux CI run
everettjf Nov 18, 2026
c997887
Do not embed the six display fonts in the Linux program
everettjf Nov 18, 2026
f0f909c
Linux phase 2: the Omarchy display plugin
everettjf Nov 18, 2026
91e6ac2
Linux phase 3: the management window (sw-studio)
everettjf Nov 18, 2026
e08a682
Linux phase 2: the background service and the commands that need it
everettjf Nov 18, 2026
ded1c79
Merge branch 'worktree-agent-a794b3b7729003ccf' into linux
everettjf Nov 18, 2026
65933d7
Merge branch 'worktree-agent-a4d1433d09ae29156' into linux
everettjf Nov 18, 2026
c50b815
Merge branch 'worktree-agent-af5a437e9deb24784' into linux
everettjf Nov 18, 2026
cd074e3
Package ScriptWidget for Linux: archive, installer and release workflow
everettjf Nov 18, 2026
84c348f
Document the Linux preview and remove the feasibility spikes
everettjf Nov 18, 2026
54d9832
Plugin README: the wait before unnamed widgets are dropped is 12 seconds
everettjf Nov 18, 2026
469350d
Painter test: tell the system font by its family, not by its width
everettjf Nov 18, 2026
39186b9
Record how the two Linux 0.1.0 archives were built and checked
everettjf Nov 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions .github/workflows/linux-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Linux release archive
# Builds the x86_64 release archive of ScriptWidget for Linux on Arch Linux,
# the base of Omarchy, so that it links the libraries an Omarchy system has
# (an archive built on Ubuntu would ask for Ubuntu's ICU). Started by hand, by
# a `linux-v*` tag, or by a pull request that changes the packaging.
#
# The aarch64 archive is built on an aarch64 Omarchy machine with
# Linux/scripts/package.sh: there is no official Arch Linux image for it here.
on:
workflow_dispatch:
push:
tags: ['linux-v*']
pull_request:
paths: ['.github/workflows/linux-release.yml', 'Linux/scripts/package.sh', 'Linux/packaging/**']
permissions:
contents: read
concurrency:
group: linux-release-${{ github.ref }}
cancel-in-progress: true
jobs:
archive:
name: Archive (x86_64, Arch Linux)
runs-on: ubuntu-24.04
container: archlinux:latest
timeout-minutes: 60
steps:
- name: System packages
run: |
pacman -Syu --noconfirm --needed base-devel git rustup nodejs npm python zip unzip clang cmake pkgconf \
icu fontconfig freetype2 libxkbcommon libxkbcommon-x11 libxcb wayland vulkan-icd-loader vulkan-headers \
openssl zstd alsa-lib noto-fonts noto-fonts-cjk noto-fonts-emoji
rustup default stable
rustc -vV
pacman -Q icu fontconfig glibc
- uses: actions/checkout@v7
- name: Install esbuild for the shared JavaScript bundle
working-directory: Web/studio
run: npm ci --no-audit --no-fund
- name: Shared JavaScript
run: node Linux/scripts/build-shared-js.mjs
- name: Test
working-directory: Linux
run: cargo test --locked --workspace
- name: Archive
run: sh Linux/scripts/package.sh
# The archive as a user unpacks it, with nothing from the checkout: the
# self-check, one rendered template, and the font rule.
- name: Check the unpacked archive
run: |
set -eu
work=$(mktemp -d)
tar -xzf Linux/artifacts/scriptwidget-*-linux-x86_64.tar.gz -C "$work"
root=$(echo "$work"/scriptwidget-*)
env -i HOME="$work/home" PATH=/usr/bin "$root/bin/scriptwidget" doctor > "$work/doctor.json" || { cat "$work/doctor.json"; exit 1; }
env -i HOME="$work/home" PATH=/usr/bin "$root/bin/scriptwidget" render "$root/share/scriptwidget/templates/template/Month Calendar" --family large --output "$work/calendar.png" > "$work/render.json"
python -c 'import json,sys; r=json.load(open(sys.argv[1])); assert r["status"]=="passed" and r["picture"]["visiblePixels"]>0, r' "$work/render.json"
"$root/bin/scriptwidget-studio" --version
ldd "$root/bin/scriptwidget" | grep -i icu
! find "$root" -iname '*.ttf' -o -iname '*.otf' | grep .
cp "$work/calendar.png" Linux/artifacts/
- uses: actions/upload-artifact@v7
with:
name: scriptwidget-linux-x86_64
path: |
Linux/artifacts/*.tar.gz
Linux/artifacts/*.sha256
Linux/artifacts/calendar.png
if-no-files-found: error
60 changes: 60 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Linux
on:
pull_request:
paths: ['Linux/**', 'Web/preview-engine/**', 'Android/core/src/main/js/**', 'Android/core/src/main/cpp/quickjs/**', 'Android/core/src/main/assets/fonts/**', 'Scripts/lib/shared-js.mjs', 'Shared/ScriptWidgetRuntime/Widget/Resource/support.bundle/**', '.github/workflows/linux.yml']
push:
branches: [main]
paths: ['Linux/**', 'Web/preview-engine/**', 'Android/core/src/main/js/**', 'Android/core/src/main/cpp/quickjs/**', 'Android/core/src/main/assets/fonts/**', 'Scripts/lib/shared-js.mjs', 'Shared/ScriptWidgetRuntime/Widget/Resource/support.bundle/**', '.github/workflows/linux.yml']
workflow_dispatch:
permissions:
contents: read
concurrency:
group: linux-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Build and test (${{ matrix.name }})
strategy:
fail-fast: false
matrix:
include:
- {name: x86_64, runner: ubuntu-24.04}
- {name: aarch64, runner: ubuntu-24.04-arm}
runs-on: ${{ matrix.runner }}
timeout-minutes: 45
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with: {node-version: 24}
# ICU for Intl, fontconfig and FreeType for the painter. The CJK and emoji fonts are what a
# desktop has; without them the font tests that need them report themselves as skipped.
- name: System libraries and fonts
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends build-essential pkg-config libicu-dev libfontconfig1-dev libfreetype-dev fonts-noto-cjk fonts-noto-color-emoji zip unzip
- name: Rust
run: |
rustup toolchain install stable --profile minimal --component clippy
rustup default stable
rustc -vV
pkg-config --modversion icu-i18n fontconfig
- name: Install esbuild for the shared JavaScript bundle
working-directory: Web/studio
run: npm ci --no-audit --no-fund
- name: Shared JavaScript
run: node Linux/scripts/build-shared-js.mjs
- name: Build
working-directory: Linux
run: cargo build --locked --workspace --all-targets
# No graphical session: the painter draws on a CPU surface.
- name: Test
working-directory: Linux
env:
DISPLAY: ''
WAYLAND_DISPLAY: ''
run: cargo test --locked --workspace -- --include-ignored
- name: Engine binding tests with AddressSanitizer in QuickJS
run: sh Linux/scripts/asan-test.sh
- name: Clippy
working-directory: Linux
run: cargo clippy --locked --workspace --all-targets
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,13 @@ Tools/ScriptWidgetCLI/**/__pycache__/

# Functional Pages assembly output
_site/

# Linux app: Cargo build output and generated JavaScript assets
Linux/target/
Linux/assets/
Linux/tests/assets/
# Pictures the painter tests write for review
Linux/crates/sw-render/tests/out/
# Pictures the command line tests and reviews write
Linux/crates/sw-cli/tests/out/
Linux/artifacts/
5 changes: 4 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ ScriptWidget lets users author native widgets with JavaScript and JSX: WidgetKit
- `Editor/editorfe/`: Vite frontend with CodeMirror 6. Built files are copied into both platform `StudioEditor.bundle` directories.
- `Web/preview-engine/`: browser preview engine (plain JavaScript with `.d.ts` types); `Web/studio/`: Web Studio, a React + strict TypeScript + shadcn/ui app published to GitHub Pages. Its `kernel.js` and `renderer.js` are also the Android runtime, so a change there affects the browser preview and Android together.
- `Windows/`: the Windows 11 desktop app (preview). `native` builds `swcore.dll` from the QuickJS-NG sources under `Android/core/src/main/cpp/quickjs`; `src/ScriptWidget.Core` is a C# port of `Android/core` (engine wrapper, compiler, executor, packages, APIs, plugins, Win2D renderer); `src/ScriptWidget.App` is the always-running desktop host; `src/ScriptWidget.Studio` is the WinUI 3 management window; `src/ScriptWidget.Cli` is `swcli`. It runs the same shared JavaScript as Android, built by `Scripts/lib/shared-js.mjs`. `Windows/assets`, `Windows/native/out` and `Windows/artifacts` are generated; do not edit or commit them.
- `Linux/`: the Linux app (preview, for Omarchy), written in Rust. `crates/sw-quickjs` builds the QuickJS-NG sources under `Android/core/src/main/cpp/quickjs`; `crates/sw-core` is the runtime (packages, compiler, executor, APIs, plugins), ported from `Windows/src/ScriptWidget.Core`; `crates/sw-render` is the Skia painter; `crates/sw-host` is the background service that draws the widgets; `crates/sw-cli` is the `scriptwidget` command line, which also starts the service; `crates/sw-studio` is the GPUI management window (behind the `ui` feature); `omarchy-plugin` is the QML plugin of the Omarchy shell that shows the pictures and forwards clicks, speaking the protocol in `docs/linux/protocol.md`; `packaging` and `scripts/package.sh` build the release archive. It runs the same shared JavaScript as Android and Windows. `Linux/assets`, `Linux/tests/assets`, `Linux/target` and `Linux/artifacts` are generated; do not edit or commit them. The six display fonts are deliberately not shipped on Linux.
- `Android/core`: QuickJS-NG with its JNI layer, the Kotlin host and native APIs, Canvas renderer, package store, Gallery, Skills, plugins and AI client. `Android/app`: Compose app, widget providers, tiles, shortcuts, Live Updates and push. `Android/core/src/main/assets/scriptwidget` is generated; do not edit it. `Android/app/src/main/assets/Script.android` holds the templates for what only Android has: the scrolling `<list>`, the `material.<role>` colors and the automation entry point, all described under "Only on Android" in `docs/android/README.md`. `Android/play`: Google Play listing kit.
- `Tests/ScriptWidgetRuntimeTests/`: shared runtime, execution, performance, package/cache, iCloud-state, Gallery, AI, and security tests.
- `Gallery/`: curated Gallery 1.0 index, JSON Schema, widget seeds, and Skill seeds.
Expand All @@ -36,6 +37,8 @@ Widget packages live under `Scripts/<PackageName>/`. Package 2.0 uses `widget.js

- Windows (not covered by `release-readiness.sh`; needs Windows 11, Visual Studio with the C++ workload, the .NET 10 SDK and Node): `node Windows/scripts/build-shared-js.mjs` after changing `Web/preview-engine/src`, the support bundle or `Android/core/src/main/js`; `powershell -File Windows/scripts/build-native.ps1 -Arch x64`; `cd Windows && dotnet test tests/ScriptWidget.Core.Tests`; `powershell -File Windows/scripts/desktop-check.ps1` after touching the desktop host; `powershell -File Windows/scripts/package.ps1` for the MSIX (add `-FrameworkDependent` and the Partner Center identity for the Store); `powershell -File Windows/scripts/installer.ps1` for the NSIS installer published on GitHub Releases (tag `windows-v<version>`), checked by `Windows/scripts/installer-check.ps1` and built for both processors by the hand-started "Windows installers" workflow. Record what ran, on which machine, in `docs/windows/testing.md`, and keep `docs/windows/TODO.md` current.

- Linux (not covered by `release-readiness.sh`; needs Rust, a C compiler, `pkg-config`, the ICU, fontconfig and FreeType development files, and Node): `node Linux/scripts/build-shared-js.mjs` after changing `Web/preview-engine/src`, the support bundle or `Android/core/src/main/js`; `cd Linux && cargo test --locked --workspace`; `sh Linux/scripts/asan-test.sh` on Linux after touching `sw-quickjs`; `sh Linux/scripts/package.sh` for the release archive (tag `linux-v<version>`; x86_64 from the hand-started "Linux release archive" workflow, aarch64 on an Omarchy machine); `sh Linux/omarchy-plugin/tests/check.sh` in an Omarchy session after touching the plugin. Record what ran, on which machine, in `docs/linux/testing.md`, and keep `docs/linux/TODO.md` current.

The app uses `iCloud.ScriptWidget` and `group.everettjf.scriptwidget`. Signed real-container tests require a trusted, signed-in device; deterministic cache/iCloud-state tests do not.

The Android application ID is `com.atomsprout.scriptwidget`; the Kotlin namespace stays `com.everettjf.scriptwidget`. Take the package name from `context.packageName` and class names from the class, never from a literal. `Android/keystore.properties`, `Android/firebase.properties`, `google-services.json` and keystores are git-ignored and must stay out of the repository; a build without `firebase.properties` has push turned off.
Expand Down Expand Up @@ -88,7 +91,7 @@ Treat scripts, imported ZIPs, Gallery content, Skills, plugin manifests, network
- Use concise, action-oriented commit subjects. Add a body when behavior, security tradeoffs, migrations, or generated artifacts need explanation.
- PRs should state the user outcome, linked issue, security/compatibility impact, commands/schemes run, and any skipped physical-device or signed-iCloud checks.
- Include before/after screenshots for visible UI changes and keep documentation/schema/generated bundles in the same PR as the behavior they describe.
- GitHub releases: the newest app release (Apple `v…`, Android `android-v…` or Windows `windows-v…`) is marked Latest; `cli-v…` releases and previews are created with `--latest=false`. See `docs/release-readiness.md`.
- GitHub releases: the newest app release (Apple `v…`, Android `android-v…`, Windows `windows-v…` or Linux `linux-v…`) is marked Latest; `cli-v…` releases and previews are created with `--latest=false`. See `docs/release-readiness.md`.
- Never describe a skipped check as passing. Link the exact successful CI run or local evidence when claiming release readiness.

## Current Product Priorities
Expand Down
Loading
Loading