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
master v0.8.0
韩天峰 1 month ago
parent f79d5f2f8e
commit 91f133f17a
  1. 14
      README-CN.md
  2. 15
      README.md

@ -86,8 +86,9 @@ AST,待全部项目符号就绪后再在 convert 阶段解析。这一两阶
`#[Printer]` 和 `#[Arrayable]` 根据属性声明生成类型安全的方法。 `#[Printer]` 和 `#[Arrayable]` 根据属性声明生成类型安全的方法。
- **现代 PHP 支持** —— PHP 8.4 property hooks、非对称可见性、PHP 8.5 - **现代 PHP 支持** —— PHP 8.4 property hooks、非对称可见性、PHP 8.5
`clone()`-with 以及 `(void)` 丢弃表达式。 `clone()`-with 以及 `(void)` 丢弃表达式。
- **跨平台与 WASM** —— 面向 x64 和 ARM64 的 Linux、Windows、macOS 目标, - **跨平台、移动原生与 WASM** —— 面向 x64 和 ARM64 的 Linux、Windows、macOS
以及 WASI 0.2 和浏览器(Jco)输出。 目标,使用 Android NDK 和 iOS SDK 开发 Android/iOS 原生应用,以及生成 WASI 0.2
和浏览器(Jco)输出。
- **Python 桥接** —— 为 Python 模块生成 IDE helper,并将 Python 脚本转换为 TypePHP。 - **Python 桥接** —— 为 Python 模块生成 IDE helper,并将 Python 脚本转换为 TypePHP。
## 为什么选择 TypePHP? ## 为什么选择 TypePHP?
@ -141,9 +142,12 @@ sudo pacman -S base-devel cmake pkgconf gmp mpfr
> GMP 用于 `bigInt`,MPFR 用于 `bigFloat`。`decimal` 底层是 libmpdec, > GMP 用于 `bigInt`,MPFR 用于 `bigFloat`。`decimal` 底层是 libmpdec,
> 已随 PHPX 内置,无需单独安装。 > 已随 PHPX 内置,无需单独安装。
Linux x64 是主要开发及全量测试 CI 平台。编译器也提供 Windows、macOS、ARM64 和 Linux x64 是主要开发及全量测试 CI 平台。编译器也提供 Windows、macOS、ARM64、
WASI 后端;具体主机能否构建某个目标,仍取决于 PHP embed、工具链和第三方库是否 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 原生 Release Assets 默认使用 PHP 8.5 ZTS 的最新版本构建,提供 Linux x64、Linux
ARM64、macOS ARM64 和 Windows x64 四个平台包;不提供原生 NTS 或 32 位 x86 包。 ARM64、macOS ARM64 和 Windows x64 四个平台包;不提供原生 NTS 或 32 位 x86 包。

@ -100,8 +100,9 @@ This two-phase design keeps multi-file and self-hosted builds deterministic.
from property declarations. from property declarations.
- **Modern PHP support** — PHP 8.4 property hooks, asymmetric visibility, - **Modern PHP support** — PHP 8.4 property hooks, asymmetric visibility,
PHP 8.5 `clone()`-with, and `(void)` discard expressions. PHP 8.5 `clone()`-with, and `(void)` discard expressions.
- **Cross-platform & WASM** — Linux, Windows, and macOS targets for x64 and - **Cross-platform, mobile native & WASM** — Linux, Windows, and macOS targets
ARM64, plus WASI 0.2 and browser (Jco) output. 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 bridge** — generate IDE helpers for Python modules and convert
Python scripts to TypePHP. 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. > by libmpdec, which is bundled with PHPX — no separate install required.
Linux x64 is the primary development and full-test CI platform. The compiler 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, also has Windows, macOS, ARM64, Android `arm64-v8a`, iPhoneOS `arm64`, and WASI
toolchain, and third-party libraries still determines which target can be backends; availability of PHP embed, platform SDKs, toolchains, and third-party
built on a given host. 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 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 publishes Linux x64, Linux ARM64, macOS ARM64, and Windows x64 packages. Native

Loading…
Cancel
Save