All your AI agent sessions in one place — browse, search, resume. Rust + GPUI.
Rust
Build universal macOS releases
Corey Chiuc1605af56e63
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex 801628d..f514030 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -15,13 +15,17 @@ jobs:strategy:fail-fast: falsematrix:- os: [macos-14, ubuntu-24.04, windows-2022]+ os: [macos-15, ubuntu-24.04, windows-2022]steps:- uses: actions/checkout@v4- name: Install Rustuses: dtolnay/rust-toolchain@stable+ - name: Install Intel macOS target+ if: runner.os == 'macOS'+ run: rustup target add x86_64-apple-darwin+- name: Cache cargouses: Swatinem/rust-cache@v2@@ -46,3 +50,7 @@ jobs:# GPUI 窗口层仍以三平台编译通过为门槛- name: Build apprun: cargo build -p wake++ - name: Build app for Intel macOS+ if: runner.os == 'macOS'+ run: cargo build -p wake --target x86_64-apple-darwindiff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex cfa2865..1761069 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -67,23 +67,25 @@ jobs:fimacos:- name: macOS zip+ name: macOS universal zipneeds: release- runs-on: macos-14+ runs-on: macos-15steps:- uses: actions/checkout@v4- name: Install Rustuses: dtolnay/rust-toolchain@stable+ with:+ targets: aarch64-apple-darwin,x86_64-apple-darwin- name: Cache cargouses: Swatinem/rust-cache@v2- # make-app.sh 出 dist/Wake.app(ad-hoc 签名,与本机产物同规格),- # ditto 打 zip 保签名与资源结构+ # 双 target 构建后由 lipo 合成 Universal Binary,再做 ad-hoc 签名;+ # ditto 打 zip 保签名与资源结构。- name: Packagerun: |- scripts/make-app.sh+ scripts/make-app.sh --universalVERSION=$(sed -n 's/^version = "\(.*\)"/\1/p' Cargo.toml | head -1)ditto -c -k --keepParent --sequesterRsrc dist/Wake.app "dist/Wake-${VERSION}-macos.zip"diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 9e71d2d..5b13071 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -4,6 +4,7 @@## [0.2.11] — 2026-08-26+- New: Intel Mac support through a Universal macOS release- Update: refreshed the UI## [0.2.10] — 2026-08-26diff --git a/README.md b/README.mdindex 6cb5492..44b5ba5 100644--- a/README.md+++ b/README.md@@ -60,7 +60,7 @@ On the author's machine (~310 sessions, ~800 MB of JSONL): full index ~5 s, subs## Install-Download `Wake-<version>-macos.zip` from the [latest release](https://github.com/iAmCorey/Wake/releases/latest), unzip, and drag Wake to Applications. Or build from source (requires a Rust toolchain):+Download `Wake-<version>-macos.zip` from the [latest release](https://github.com/iAmCorey/Wake/releases/latest), unzip, and drag Wake to Applications. The release is a Universal Binary for both Apple Silicon and Intel Macs. Or build from source (requires a Rust toolchain):```bashgit clone https://github.com/iAmCorey/Wake && cd Wake@@ -68,6 +68,8 @@ scripts/make-app.sh # builds dist/Wake.app (icon + Info.plist, ad-hoc sopen dist/Wake.app```+To build the same Universal Binary locally, install the `aarch64-apple-darwin` and `x86_64-apple-darwin` Rust targets, then run `scripts/make-app.sh --universal`.+The app is ad-hoc signed, so if you download a prebuilt copy instead of building it yourself, macOS Gatekeeper will block the first launch — right-click the app and choose *Open*, or run `xattr -d com.apple.quarantine Wake.app`.### Linux (experimental)diff --git a/scripts/make-app.sh b/scripts/make-app.shindex ac57a2c..c098ce1 100755--- a/scripts/make-app.sh+++ b/scripts/make-app.sh@@ -1,12 +1,23 @@#!/bin/zsh# 构建 Wake.app:release 二进制 + icns 图标 + Info.plist,ad-hoc 签名。-# 用法: scripts/make-app.sh [--run]+# 用法: scripts/make-app.sh [--universal] [--run]set -euo pipefailcd "$(dirname "$0")/.."ASSETS=crates/wake/assets-BUILD=target/release+TARGET_DIR=${CARGO_TARGET_DIR:-target}+BUILD="$TARGET_DIR/release"APP=dist/Wake.app+RUN=false+UNIVERSAL=false++for arg in "$@"; do+ case "$arg" in+ --run) RUN=true ;;+ --universal) UNIVERSAL=true ;;+ *) echo "Unknown option: $arg" >&2; exit 2 ;;+ esac+done# 1. 图标:svg → 1024 png(ImageIO 渲染,保透明;qlmanage 会把透明边距填成白底) → iconset → icnsif [ ! -f "$ASSETS/icon-1024.png" ] || [ "$ASSETS/icon.svg" -nt "$ASSETS/icon-1024.png" ]; then@@ -22,8 +33,21 @@ donemkdir -p disticonutil -c icns "$ICONSET" -o dist/wake.icns-# 2. release 构建-cargo build --release -p wake+# 2. release 构建。Universal 模式在同一 macOS SDK 上交叉编译两个 Rust+# target,再用 lipo 合并;目标标准库由调用方预先通过 rustup 安装。+if $UNIVERSAL; then+ ARM_TARGET=aarch64-apple-darwin+ INTEL_TARGET=x86_64-apple-darwin+ cargo build --release -p wake --target "$ARM_TARGET"+ cargo build --release -p wake --target "$INTEL_TARGET"+ mkdir -p "$BUILD"+ lipo -create \+ "$TARGET_DIR/$ARM_TARGET/release/Wake" \+ "$TARGET_DIR/$INTEL_TARGET/release/Wake" \+ -output "$BUILD/Wake"+else+ cargo build --release -p wake+fi# 3. bundle 组装rm -rf "$APP"@@ -59,8 +83,18 @@ PLIST# 4. ad-hoc 签名(本机运行足够;分发需开发者证书 + notarize)codesign --force --deep -s - "$APP"+codesign --verify --deep --strict "$APP"++if $UNIVERSAL; then+ ARCHS=$(lipo -archs "$APP/Contents/MacOS/Wake")+ if [[ "$ARCHS" != *arm64* || "$ARCHS" != *x86_64* ]]; then+ echo "Universal build is missing an architecture: $ARCHS" >&2+ exit 1+ fi+ echo "✓ architectures: $ARCHS"+fiecho "✓ $APP"-if [ "${1:-}" = "--run" ]; then+if $RUN; thenopen "$APP"fi