From 91f133f17a9b57db9b54f5be2e1c3a5c9839065c Mon Sep 17 00:00:00 2001 From: tianfenghan Date: Tue, 8 Sep 2026 19:31:45 +0800 Subject: [PATCH] docs(readme): update documentation to include mobile native support - Add mobile native development capabilities to cross-platform features - Include Android NDK and iOS SDK support in platform targets - Update backend support to mention Android arm64-v8a and iPhoneOS arm64 - Add information about mobile app UI bridge architecture - Include links to Android native app example and iOS/macOS native app example - Clarify mobile development workflow with TypePHP for business logic --- README-CN.md | 14 +++++++++----- README.md | 15 ++++++++++----- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/README-CN.md b/README-CN.md index 9885e614..5fd9b830 100644 --- a/README-CN.md +++ b/README-CN.md @@ -86,8 +86,9 @@ AST,待全部项目符号就绪后再在 convert 阶段解析。这一两阶 `#[Printer]` 和 `#[Arrayable]` 根据属性声明生成类型安全的方法。 - **现代 PHP 支持** —— PHP 8.4 property hooks、非对称可见性、PHP 8.5 `clone()`-with 以及 `(void)` 丢弃表达式。 -- **跨平台与 WASM** —— 面向 x64 和 ARM64 的 Linux、Windows、macOS 目标, - 以及 WASI 0.2 和浏览器(Jco)输出。 +- **跨平台、移动原生与 WASM** —— 面向 x64 和 ARM64 的 Linux、Windows、macOS + 目标,使用 Android NDK 和 iOS SDK 开发 Android/iOS 原生应用,以及生成 WASI 0.2 + 和浏览器(Jco)输出。 - **Python 桥接** —— 为 Python 模块生成 IDE helper,并将 Python 脚本转换为 TypePHP。 ## 为什么选择 TypePHP? @@ -141,9 +142,12 @@ sudo pacman -S base-devel cmake pkgconf gmp mpfr > GMP 用于 `bigInt`,MPFR 用于 `bigFloat`。`decimal` 底层是 libmpdec, > 已随 PHPX 内置,无需单独安装。 -Linux x64 是主要开发及全量测试 CI 平台。编译器也提供 Windows、macOS、ARM64 和 -WASI 后端;具体主机能否构建某个目标,仍取决于 PHP embed、工具链和第三方库是否 -可用。 +Linux x64 是主要开发及全量测试 CI 平台。编译器也提供 Windows、macOS、ARM64、 +Android `arm64-v8a`、iPhoneOS `arm64` 和 WASI 后端;具体主机能否构建某个目标, +仍取决于 PHP embed、平台 SDK、工具链和第三方库是否可用。移动端可以将界面结构、 +应用状态和业务逻辑编写为 TypePHP,仅使用轻量的平台原生 UI 桥接,参见 +[Android 原生应用示例](examples/android-native/)和 +[iOS/macOS 原生应用示例](examples/apple-native/)。 原生 Release Assets 默认使用 PHP 8.5 ZTS 的最新版本构建,提供 Linux x64、Linux ARM64、macOS ARM64 和 Windows x64 四个平台包;不提供原生 NTS 或 32 位 x86 包。 diff --git a/README.md b/README.md index 03f0acc0..fbac0932 100644 --- a/README.md +++ b/README.md @@ -100,8 +100,9 @@ This two-phase design keeps multi-file and self-hosted builds deterministic. from property declarations. - **Modern PHP support** — PHP 8.4 property hooks, asymmetric visibility, PHP 8.5 `clone()`-with, and `(void)` discard expressions. -- **Cross-platform & WASM** — Linux, Windows, and macOS targets for x64 and - ARM64, plus WASI 0.2 and browser (Jco) output. +- **Cross-platform, mobile native & WASM** — Linux, Windows, and macOS targets + for x64 and ARM64; native Android/iOS application development with the + Android NDK and iOS SDK; plus WASI 0.2 and browser (Jco) output. - **Python bridge** — generate IDE helpers for Python modules and convert Python scripts to TypePHP. @@ -161,9 +162,13 @@ sudo pacman -S base-devel cmake pkgconf gmp mpfr > by libmpdec, which is bundled with PHPX — no separate install required. Linux x64 is the primary development and full-test CI platform. The compiler -also has Windows, macOS, ARM64, and WASI backends; availability of PHP embed, -toolchain, and third-party libraries still determines which target can be -built on a given host. +also has Windows, macOS, ARM64, Android `arm64-v8a`, iPhoneOS `arm64`, and WASI +backends; availability of PHP embed, platform SDKs, toolchains, and third-party +libraries still determines which target can be built on a given host. Mobile +apps can implement their UI structure, application state, and business logic +in TypePHP while keeping only a thin platform-native UI bridge. See the +[Android native app example](examples/android-native/) and the +[iOS/macOS native app example](examples/apple-native/). Native release assets are built with the latest PHP 8.5 ZTS release. TypePHP publishes Linux x64, Linux ARM64, macOS ARM64, and Windows x64 packages. Native