Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions .github/workflows/handheld-kernels.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Handheld device kernels
on:
pull_request:
paths: ['devices/psp/**', 'hosts/psp/**', 'tests/psp-toolchain.test.ts', 'engine/pocket3d/crates/pocket3d-title/**', 'tests/pocket3d-title.test.ts', 'tests/fixtures/pocket3d-title/**', 'tools/pocket3d-title.ts', 'devices/web/**', 'tests/pocket3d-web.test.ts', 'tests/fixtures/pocket3d-web/**', 'tests/wasm-premultiplied.test.ts', 'tools/pocket3d-web.ts', 'hosts/web/app-instance.js', 'hosts/web/wasm-ops.js', 'engine/wasm/**', 'engine/core/src/raster.rs', '.github/workflows/handheld-kernels.yml']
paths: ['devices/psp/**', 'hosts/psp/**', 'tests/targets-psp.test.ts', 'engine/pocket3d/crates/pocket3d-title/**', 'tests/pocket3d-title.test.ts', 'tests/fixtures/pocket3d-title/**', 'tools/pocket3d-title.ts', 'devices/web/**', 'tests/pocket3d-web.test.ts', 'tests/fixtures/pocket3d-web/**', 'tests/wasm-premultiplied.test.ts', 'tools/pocket3d-web.ts', 'hosts/web/app-instance.js', 'hosts/web/wasm-ops.js', 'engine/wasm/**', 'engine/core/src/raster.rs', '.github/workflows/handheld-kernels.yml']
push:
branches: [main]
paths: ['devices/psp/**', 'hosts/psp/**', 'tests/psp-toolchain.test.ts', 'engine/pocket3d/crates/pocket3d-title/**', 'tests/pocket3d-title.test.ts', 'tests/fixtures/pocket3d-title/**', 'tools/pocket3d-title.ts', 'devices/web/**', 'tests/pocket3d-web.test.ts', 'tests/fixtures/pocket3d-web/**', 'tests/wasm-premultiplied.test.ts', 'tools/pocket3d-web.ts', 'hosts/web/app-instance.js', 'hosts/web/wasm-ops.js', 'engine/wasm/**', 'engine/core/src/raster.rs', '.github/workflows/handheld-kernels.yml']
paths: ['devices/psp/**', 'hosts/psp/**', 'tests/targets-psp.test.ts', 'engine/pocket3d/crates/pocket3d-title/**', 'tests/pocket3d-title.test.ts', 'tests/fixtures/pocket3d-title/**', 'tools/pocket3d-title.ts', 'devices/web/**', 'tests/pocket3d-web.test.ts', 'tests/fixtures/pocket3d-web/**', 'tests/wasm-premultiplied.test.ts', 'tools/pocket3d-web.ts', 'hosts/web/app-instance.js', 'hosts/web/wasm-ops.js', 'engine/wasm/**', 'engine/core/src/raster.rs', '.github/workflows/handheld-kernels.yml']
permissions:
contents: read
jobs:
Expand All @@ -17,7 +17,7 @@ jobs:
with:
bun-version: 1.3.14
- run: cargo test --locked --manifest-path devices/psp/pocket-psp-ge/Cargo.toml
- run: bun test tests/psp-toolchain.test.ts
- run: bun test tests/targets-psp.test.ts
# The title card's Rust drawer records its frames; the C header and the
# browser module are held to them.
title:
Expand Down
74 changes: 74 additions & 0 deletions .github/workflows/psp-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: PSP build

# Installs the PSP toolchain the framework pins with `pocket target add psp`
# into an empty cache, checks that a second add downloads nothing, and builds
# the hero EBOOT through `pocket +psp build`. The target C compiler and archiver
# are `false`: a PSP build compiles no C, QuickJS arrives as a prebuilt archive.

on:
pull_request:
paths:
- ".github/workflows/psp-build.yml"
- "tools/targets/**"
- "tools/psp.ts"
- "tools/psp-toolchain.ts"
- "tools/pocket.ts"
- "tools/cli/**"
- "hosts/psp/**"
- "devices/psp/**"
- "engine/core/**"
- "package.json"
- "bun.lock"
push:
branches: [main]
paths:
- ".github/workflows/psp-build.yml"
- "tools/targets/**"
- "tools/psp.ts"
- "tools/psp-toolchain.ts"
- "tools/pocket.ts"
- "tools/cli/**"
- "hosts/psp/**"
- "devices/psp/**"
- "engine/core/**"
- "package.json"
- "bun.lock"
workflow_dispatch: {}

permissions:
contents: read

concurrency:
group: psp-build-${{ github.ref }}
cancel-in-progress: true

jobs:
eboot:
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, macos-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 30
steps:
- uses: actions/checkout@v7
- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.14
- run: bun install --frozen-lockfile
- name: Empty cache
run: echo "POCKET_NEXUS_CACHE_DIR=$RUNNER_TEMP/pocket-nexus" >> "$GITHUB_ENV"
- name: pocket target add psp
run: bun tools/cli/bin.mjs target add psp
- name: A second add downloads nothing
run: |
bun tools/cli/bin.mjs target add psp | tee second-add.log
! grep -q downloading second-add.log
- name: pocket +psp build
env:
TARGET_CC: /usr/bin/false
TARGET_AR: /usr/bin/false
CC_mipsel_sony_psp: /usr/bin/false
AR_mipsel_sony_psp: /usr/bin/false
run: bun tools/cli/bin.mjs +psp build --manifest apps/hero/pocket.json --project-root . -- --release
- run: test -s hosts/psp/target/mipsel-sony-psp/release/EBOOT.PBP
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -353,11 +353,11 @@ bun run dev # build WASM + the Hero app, then serve the brows

The `pocket` CLI runs on Bun. The
[CLI reference](https://pocketjs.pocket.nexus/docs/cli/) lists its commands,
scaffolding options and toolchain checks:
scaffolding options and target toolchains:

```sh
bun add -g @pocketjs/cli # or: npm install -g @pocketjs/cli
pocket doctor # report missing host and target tooling
pocket target add psp # install the PSP toolchain the framework pins
pocket create my-app
pocket check --target psp --manifest apps/my-app/pocket.json
pocket build --target psp --manifest apps/my-app/pocket.json -- --release
Expand Down
2 changes: 1 addition & 1 deletion hosts/psp/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 8 additions & 5 deletions hosts/psp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@
# workspace (do NOT add a workspace Cargo.toml at PocketJS/).
#
# Build via tools/psp.ts: `rustup run nightly-2026-05-28 cargo psp` with the
# environment resolved from tools/cli/psp-toolchain.json (llvm-ar, RUSTFLAGS
# -A linker-messages, RUST_PSP_TARGET=targets/mipsel-sony-psp.json,
# RUST_PSP_ABORT_ONLY=1, TARGET_CFLAGS). `bun run bootstrap` installs the
# pinned cargo tools and verified SDK in the shared pocket-nexus cache.
# toolchain `pocket target add psp` installs from tools/targets/psp.toolchain.json
# (PSP_SDK, cargo-psp, QUICKJS_PREBUILT_LIB) plus RUSTFLAGS -A linker-messages,
# RUST_PSP_TARGET=targets/mipsel-sony-psp.json and RUST_PSP_ABORT_ONLY=1.
#
# libquickjs-sys links the prebuilt archive QUICKJS_PREBUILT_LIB names. The
# manifest's `quickjs` component is the archive pocket-nexus/quickjs-rs
# publishes as prebuilt-psp-<commit> for the revision below; move both together.
#
# Memory (docs/DESIGN.md "Memory (the blocker fix)" [R]): the psp crate is built
# with `external-global-alloc` (gates out rust-psp's one-kernel-object-per-
Expand All @@ -23,7 +26,7 @@ edition = "2021"
[dependencies]
pocket-psp-ge = { path = "../../devices/psp/pocket-psp-ge" }
psp = { git = "https://github.com/pocket-nexus/rust-psp.git", rev = "2cbaf8c9bc72569c76240a1d9743de10731e5f6b", features = ["external-c-heap", "abort-only", "external-global-alloc"] }
libquickjs-sys = { git = "https://github.com/pocket-nexus/quickjs-rs.git", rev = "ba5bdd0dc013518768e76cd9e05cd30ed53dd35b" }
libquickjs-sys = { git = "https://github.com/pocket-nexus/quickjs-rs.git", rev = "a5cac5d8631bdc068b43af93355b9f82d666949e" }
pocketjs-core = { path = "../../engine/core" }

[features]
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,6 @@
},
"description": "A portable application runtime that turns modern component code into native pixels across radically different hardware: Solid, Vue Vapor and Octane over a native Rust core, with build-time Tailwind styling and 60 FPS animation under an 8 MB memory budget.",
"scripts": {
"bootstrap": "bun tools/bootstrap.ts",
"pocket": "bun tools/pocket.ts",
"build": "bun tools/build.ts",
"play": "bun tools/play.ts",
Expand Down
Loading
Loading