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
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,10 @@ jobs:
-Db_lundef=false
# The chain executable already depends on libish + libish_emu; fakefs
# is the only additional archive consumed by the outer Meson build.
meson compile -C build-ci-ish arm64-neon-reverse-test dirty-page-chain-test fakefs
meson compile -C build-ci-ish arm64-neon-reverse-test dirty-page-chain-test sockaddr-layout-test fakefs
meson test -C build-ci-ish --print-errorlogs --repeat 5 \
arm64-neon-reverse \
sockaddr-layout \
dirty-page-chain
meson setup build-ci \
-Dish_src="$PWD/third_party/ish" \
Expand Down
17 changes: 16 additions & 1 deletion CHANGELOG.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,22 @@ Chinese is the primary changelog and this file is its maintained English mirror.
explicitly unapproved for distribution without changing the XCFramework
Release's RootFS exclusion policy.

## v0.4.0-abi.13 (planned Stage1 maintenance prerelease)
## v0.4.0-abi.14 (planned Stage1 maintenance prerelease)

This is a compatible maintenance release after `v0.4.0-abi.13`. It remains a
prerelease and is **not stable v0.4.0**.

- `third_party/ish` advances to `22f6b858`. Before a guest `sockaddr` enters a
Darwin socket API, the runtime now preserves the Linux 16-bit address family
and then writes Apple ABI `sa_len`/`sa_family`; it also recomputes `sun_len`
after rewriting Unix-domain paths.
- `bind`, `connect`, and `sendto` share the same conversion path. This fixes
network requests that failed when Darwin interpreted Linux family bytes as a
length, with a standalone layout regression gated on macOS and Linux CI.
- The public C ABI remains 1, wire protocol remains v4, and the Swift API is
unchanged. RootFS is not included in the Release.

## v0.4.0-abi.13 (published Stage1 maintenance prerelease)

This is a compatibility maintenance release after `v0.4.0-abi.12`. It remains
a prerelease and is **not stable v0.4.0**.
Expand Down
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,19 @@
`fs.tar.gz`,环境差异仍保留在外部证据中。CI 不上传制品,候选仍明确标记为未获分发
批准,不改变 XCFramework Release 的 RootFS 排除策略。

## v0.4.0-abi.13(计划中的 Stage1 维护预发布)
## v0.4.0-abi.14(计划中的 Stage1 维护预发布)

这是 `v0.4.0-abi.13` 之后的兼容性维护版本,仍是 prerelease,**不是稳定
v0.4.0**。

- `third_party/ish` 更新到 `22f6b858`。guest `sockaddr` 进入 Darwin socket API 前会先
保留 Linux 16 位 address family,再按 Apple ABI 写入 `sa_len`/`sa_family`;重写
Unix-domain 路径后也会重新计算 `sun_len`。
- `bind`、`connect` 与 `sendto` 共用同一转换路径,修复网络请求因 Darwin 把 Linux
family 字节误读成长度而失败的问题;新增独立布局回归并纳入 macOS/Linux CI。
- 公开 C ABI 仍为 1,wire protocol 仍为 v4,Swift API 不变;RootFS 不进入 Release。

## v0.4.0-abi.13(已发布的 Stage1 维护预发布)

这是 `v0.4.0-abi.12` 之后的兼容性维护版本,仍是 prerelease,**不是稳定
v0.4.0**。
Expand Down
28 changes: 14 additions & 14 deletions README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ and simulator slices are arm64.

## Current phase: native ABI transition

The default branch has published `v0.4.0-abi.12` and is preparing the compatible
maintenance prerelease `v0.4.0-abi.13`. Both belong to the Stage1 **native ABI
The default branch has published `v0.4.0-abi.13` and is preparing the compatible
maintenance prerelease `v0.4.0-abi.14`. Both belong to the Stage1 **native ABI
transition**. Neither is stable `v0.4.0` or the complete v0.4 Swift API. Keep
these four version surfaces distinct:

| Surface | Current `v0.4.0-abi.12` | Planned `v0.4.0-abi.13` |
| Surface | Current `v0.4.0-abi.13` | Planned `v0.4.0-abi.14` |
| --- | --- | --- |
| Public C ABI | `ISH_EMBED_ABI_VERSION == 1`; forced teardown, destructive wait/reap, and Apple lock fixes are public | Still ABI 1; only internal AArch64 AdvSIMD `REV16` emulation is added |
| Public C ABI | `ISH_EMBED_ABI_VERSION == 1`; lifecycle, Apple lock, and AArch64 `REV16` fixes are public | Still ABI 1; only Darwin/Linux `sockaddr` layout conversion is corrected |
| Internal wire protocol | exact-match v4 between host and embedded supervisor | still v4; this is not the public C ABI version |
| `Package.swift` | pins the public `v0.4.0-abi.12` URL/checksum | the release transaction creates a manifest-only release commit pinned to the maintenance binary |
| `Package.swift` | pins the public `v0.4.0-abi.13` URL/checksum | the release transaction creates a manifest-only release commit pinned to the maintenance binary |
| Swift source | remains v0.3.3-ABI compatible and includes typed rename plus per-call stdin timeouts | unchanged |

Stage1 native code adds session retain/release, a joinable kernel thread,
Expand Down Expand Up @@ -90,15 +90,15 @@ gives those narrow differences independent PRs, CI, and an exact gitlink, making
PocketRoot builds and releases reproducible. We do not directly rewrite somebody
else's local upstream repository; generally useful fixes can still be contributed
to [iSH upstream](https://github.com/ish-app/ish), while the fork carries project
gates until upstream accepts and releases them. The current `v0.4.0-abi.13`
gates until upstream accepts and releases them. The current `v0.4.0-abi.14`
source change includes neither RootFS content nor any prebuilt XCFramework/guest
binary; binaries may be produced and published only by a later release
transaction after its gates pass.

## Installation status

`v0.4.0-abi.12` is public and [`Package.swift`](Package.swift) currently pins it.
Until `v0.4.0-abi.13` is published, the manifest keeps pointing at that verified
`v0.4.0-abi.13` is public and [`Package.swift`](Package.swift) currently pins it.
Until `v0.4.0-abi.14` is published, the manifest keeps pointing at that verified
asset instead of advertising a future 404 URL. Use Xcode's
**File → Add Package Dependencies…** with:

Expand All @@ -110,12 +110,12 @@ Select a version whose tag, `libIshKernel.xcframework.zip`, Corresponding Source
and manifest URL/checksum all match. Consumer projects do not need Meson, Zig,
or LLVM.

`v0.4.0-abi.12` provides guest-atomic rename without a shell, bounded stdin
deadlines, per-call write/close timeouts, forced guest-task teardown,
thread-group quiescence boundaries, and an Apple writer-preferring lock.
`v0.4.0-abi.13` adds the AArch64 AdvSIMD vector `REV16` instruction used by
Rust/TLS network paths so an otherwise valid guest no longer exits with
`SIGILL`. It does not
`v0.4.0-abi.13` provides guest-atomic rename without a shell, bounded stdin
deadlines, per-call write/close timeouts, lifecycle fixes, an Apple
writer-preferring lock, and AArch64 AdvSIMD `REV16`.
`v0.4.0-abi.14` corrects `sa_len`/`sa_family` translation when Linux guest socket
addresses enter Darwin APIs, preventing `bind`, `connect`, and `sendto` from
using a misread family. It does not
implement a native Agent Loop or
install Codex CLI in the app.
Node.js/npm remain optional choices of the RootFS/guest package-management flow,
Expand Down
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ RootFS 安装、产品级命令策略、Swift Concurrency 隔离和界面。项

## 当前阶段:Native ABI 过渡

当前默认分支已发布 `v0.4.0-abi.12`,正在准备兼容性维护预发布
`v0.4.0-abi.13`。它们都属于 **Stage1 native ABI 过渡**,不是稳定 `v0.4.0`,
当前默认分支已发布 `v0.4.0-abi.13`,正在准备兼容性维护预发布
`v0.4.0-abi.14`。它们都属于 **Stage1 native ABI 过渡**,不是稳定 `v0.4.0`,
也不是完整 v0.4 Swift API。请同时区分下面四个版本面:

| 版本面 | 当前 `v0.4.0-abi.12` | 计划中的 `v0.4.0-abi.13` |
| 版本面 | 当前 `v0.4.0-abi.13` | 计划中的 `v0.4.0-abi.14` |
| --- | --- | --- |
| 公开 C ABI | `ISH_EMBED_ABI_VERSION == 1`;强制 teardown、destructive wait/reap 和 Apple 锁修复已发布 | 仍为 ABI 1;只补齐内部 AArch64 AdvSIMD `REV16` 模拟 |
| 公开 C ABI | `ISH_EMBED_ABI_VERSION == 1`;生命周期、Apple 锁与 AArch64 `REV16` 修复已发布 | 仍为 ABI 1;只修正 Darwin/Linux `sockaddr` 布局转换 |
| 内部 wire protocol | host 与内嵌 supervisor 精确匹配 v4 | 仍为 v4;它不是公开 C ABI 版本 |
| `Package.swift` | 固定已公开的 `v0.4.0-abi.12` URL/checksum | 发布事务生成只改 manifest 的 release commit,固定到维护二进制 |
| `Package.swift` | 固定已公开的 `v0.4.0-abi.13` URL/checksum | 发布事务生成只改 manifest 的 release commit,固定到维护二进制 |
| Swift 源 | 保持 v0.3.3 ABI 兼容,已提供类型化 rename 与单次 stdin timeout | 不变 |

Stage1 的 native runtime 已加入 session retain/release、可等待 kernel 线程、soft-halt、
Expand Down Expand Up @@ -69,13 +69,13 @@ JIT 脏页一致性必须修改模拟器核心,无法只在 outer package 或
窄差异拥有独立 PR、CI 和精确 gitlink,PocketRoot 的构建与发布也因此可复现。我们不会在
本地直接改写别人维护的上游仓库;适合通用化的修复仍可回馈
[iSH upstream](https://github.com/ish-app/ish),但在上游接受并发布前由 fork 承担项目门禁。
当前 `v0.4.0-abi.13` 源码变更不纳入 RootFS,也不提交任何预构建
当前 `v0.4.0-abi.14` 源码变更不纳入 RootFS,也不提交任何预构建
XCFramework/guest binary;二进制只能在后续发布事务通过后生成和发布。

## 安装状态

`v0.4.0-abi.12` 已公开且当前 [`Package.swift`](Package.swift) 固定到它。
`v0.4.0-abi.13` 发布前,manifest 继续指向这个已验证的资产,不会提前引用 404 URL。
`v0.4.0-abi.13` 已公开且当前 [`Package.swift`](Package.swift) 固定到它。
`v0.4.0-abi.14` 发布前,manifest 继续指向这个已验证的资产,不会提前引用 404 URL。
在 Xcode 的 **File → Add Package Dependencies…** 中使用:

```text
Expand All @@ -85,10 +85,10 @@ https://github.com/jacklv-coder/ish-arm64-pkg
请选择明确包含 `libIshKernel.xcframework.zip`、对应源码归档,并且 manifest URL/checksum
与同一标签匹配的版本。业务工程不需要安装 Meson、Zig 或 LLVM。

`v0.4.0-abi.12` 已提供无 shell 的 guest 原子重命名、有界 stdin deadline、单次
write/close timeout、强制 guest task teardown、thread-group 静止边界以及 Apple 写者
优先锁。`v0.4.0-abi.13` 补齐 Rust/TLS 网络路径会使用的 AArch64 AdvSIMD `REV16` 向量
指令,避免 guest 因该指令未实现而 `SIGILL` 退出。它不实现原生
`v0.4.0-abi.13` 已提供无 shell 的 guest 原子重命名、有界 stdin deadline、单次
write/close timeout、生命周期修复、Apple 写者优先锁与 AArch64 AdvSIMD `REV16`。
`v0.4.0-abi.14` 修正 Linux guest socket 地址进入 Darwin API 时的 `sa_len`/
`sa_family` 布局转换,避免 `bind`、`connect`、`sendto` 使用错误 family。它不实现原生
Agent Loop,也不会
在 App 内安装 Codex CLI。Node.js/npm 如有需要仍由
RootFS/guest 包管理流程选择,不属于 runtime 的强制依赖。
Expand Down
10 changes: 5 additions & 5 deletions docs/README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ primary language; the English mirrors support collaboration and release review.
authoritative. Stage1 uses exact-match v4 between host and embedded supervisor.
3. **Swift source and manifest binary**: Stage1 Swift remains v0.3.3-ABI
compatible and does not call retain/release. The manifest currently pins the
public `v0.4.0-abi.12`; the release transaction moves it to the
`v0.4.0-abi.13` maintenance binary only after those assets are public and
public `v0.4.0-abi.13`; the release transaction moves it to the
`v0.4.0-abi.14` maintenance binary only after those assets are public and
verified.
4. **RootFS and PocketRoot**: RootFS is an independent asset and PocketRoot is
the product layer. Neither is completed automatically by a runtime PR or Release.

`v0.4.0-abi.12` and its `v0.4.0-abi.13` maintenance release are native-first
`v0.4.0-abi.13` and its `v0.4.0-abi.14` maintenance release are native-first
transition prereleases, not stable v0.4. The complete Swift lifecycle, typed
statuses, Terminal callback queue, and VT parser changes belong to Stage2.

Expand All @@ -44,7 +44,7 @@ statuses, Terminal callback queue, and VT parser changes belong to Stage2.
| [Architecture and lifecycle](architecture.en.md) | How is the runtime implemented? How do ABI 1 and wire v4 differ? |
| [Testing and acceptance](testing.en.md) | What do native, sanitizer, Swift/iOS 18, documentation, and supply-chain gates prove? |
| [Troubleshooting](troubleshooting.en.md) | Where should boot, link, protocol, output, shutdown, or release diagnosis start? |
| [Release transaction](releasing.en.md) | Why does the merged maintenance source still pin `v0.4.0-abi.12`, and when does it become `v0.4.0-abi.13`? |
| [Release transaction](releasing.en.md) | Why does the merged maintenance source still pin `v0.4.0-abi.13`, and when does it become `v0.4.0-abi.14`? |
| [Changelog](../CHANGELOG.en.md) | What is Stage1's scope and compatibility boundary? |

## Architecture on one page
Expand Down Expand Up @@ -99,7 +99,7 @@ fixes can still go upstream. See the
A direct-chain or RET target returns to the dispatcher only when it intersects
pending dirty code pages; data-only writes may keep chaining.
- RootFS is outside the package/Release and must not enter Corresponding Source.
- The current `v0.4.0-abi.13` source change carries no RootFS or prebuilt binary;
- The current `v0.4.0-abi.14` source change carries no RootFS or prebuilt binary;
a later release transaction must produce the XCFramework.

## Authoritative sources
Expand Down
10 changes: 5 additions & 5 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
2. **内部 wire protocol**:权威定义为 [`protocol/proto.h`](../protocol/proto.h),
Stage1 是 host 与内嵌 supervisor 精确匹配的 v4。
3. **Swift 源与 manifest binary**:Stage1 Swift 保持 v0.3.3 ABI 兼容且不调用
retain/release。manifest 当前固定已公开的 `v0.4.0-abi.12`;只有
`v0.4.0-abi.13` 资产公开并验证后,发布事务才将其切到维护 binary。
retain/release。manifest 当前固定已公开的 `v0.4.0-abi.13`;只有
`v0.4.0-abi.14` 资产公开并验证后,发布事务才将其切到维护 binary。
4. **RootFS 与 PocketRoot**:RootFS 是独立资产;PocketRoot 是上层产品。两者均不因
runtime PR 或 Release 自动完成。

`v0.4.0-abi.12` 与维护版本 `v0.4.0-abi.13` 都是 native-first 过渡预发布,不是稳定
`v0.4.0-abi.13` 与维护版本 `v0.4.0-abi.14` 都是 native-first 过渡预发布,不是稳定
v0.4。完整 Swift lifecycle、类型化状态、Terminal callback 队列和 VT parser 改造
属于 Stage2。

Expand All @@ -39,7 +39,7 @@ v0.4。完整 Swift lifecycle、类型化状态、Terminal callback 队列和 VT
| [架构与生命周期](architecture.md) | runtime 怎样实现?ABI 1 与 wire v4 有什么区别? |
| [测试与验收](testing.md) | native、sanitizer、Swift/iOS 18、文档与供应链门禁各证明什么? |
| [故障排查](troubleshooting.md) | boot、链接、协议、输出、shutdown 或发布失败时从哪里查? |
| [发布事务](releasing.md) | 为什么维护源码合入后 manifest 仍是 `v0.4.0-abi.12`?何时变成 `v0.4.0-abi.13`? |
| [发布事务](releasing.md) | 为什么维护源码合入后 manifest 仍是 `v0.4.0-abi.13`?何时变成 `v0.4.0-abi.14`? |
| [变更日志](../CHANGELOG.md) | Stage1 的范围和兼容边界是什么? |

## 一页架构
Expand Down Expand Up @@ -85,7 +85,7 @@ Swift 对象不是另一套 runtime。它们包装 C handle;C 层管理线程
- JIT 单页写及显式 `invalidate_page` 按精确页过滤;仅多页哈希位图可能因碰撞保守多
失效。下一直链/RET 目标命中待处理代码脏页时才回到 dispatcher;纯数据写可继续直链。
- RootFS 不属于 package/release,禁止将其混入 Corresponding Source。
- 当前 `v0.4.0-abi.13` 源码变更不携带 RootFS 或预构建二进制;XCFramework 必须由
- 当前 `v0.4.0-abi.14` 源码变更不携带 RootFS 或预构建二进制;XCFramework 必须由
后续发布事务生成。

## 权威来源
Expand Down
Loading
Loading