Repository navigation
docs: add Platform Support page (status matrix, HarmonyOS, uname behavior) - #225
Merged
Merged
Conversation
…vior) Niubash now has enough platforms that "which ones work, and what does 'work' mean" needs one page rather than scattered claims. Add docs/src/platform-support.md: - a status matrix over every platform: build / smoke-gated / released, including the two legs added this week (musl via cross-target-smoke, HarmonyOS via cross-target-check) - what "smoke-gated" means, and why musl can carry the full gate while ohos is check-only (no HarmonyOS runtime on GitHub runners) - HarmonyOS: why the port is cheap (target_os = "linux", target_family = "unix", Tier 2 with host tools), and the one blocker found and fixed (rubash#449, the glibc-only __rlimit_resource_t typedef) - HarmonyOS PC vs HarmonyOS phone as two separate products: PC is unrestricted, phone restricts fork and needs per-process declaration + review (Huawei FAQ faqs-ability-112), and Niubash's unix side is fork+exec, so the phone form factor is a project, not a flag - uname behavior on HarmonyOS: identity.rs reads uname(2) and prints utsname verbatim, so sysname is Linux on OpenHarmony and the Huawei kernel name on HarmonyOS -- documented as intended, with a note not to add a special-case branch - the Windows-only surface that must not leak onto non-Windows paths SUMMARY.md: link the new page before Roadmap.
This was referenced Oct 10, 2026
caomengxuan666
added a commit
that referenced
this pull request
Oct 13, 2026
…1.4.0 section (#326) - The [Unreleased] entries (#284/#287, #293-#304, #313) move into [1.4.0]; [Unreleased] is empty again. - Newly recorded (today's wave): Git Bash compatible factory default prompt (#292, headline), WT-form shortcuts (#290/#211), the paste burst trailing-Enter fix (#308/#291), self-update SHA256 + release pinning (#311/#312), managed-block convergence (#324), completion tables/NIU_COMPDEFS/NIU_ENV probe (#305-#307), -s on-demand stdin (rubash#586 host half), bash/rbash invocation faces (#321/#322). - Older gaps recorded: closed-stdout pipe contract (#245/#286), history session-end write-back (#265), sh POSIX contract (#262), PWD persona alignment (#283), one-shot fast path (#270), --cwd-state (#272), --encoded-command (#271), REPL-command highlighting (#281), docs passes (#255/#225/#226/#227), MSRV (#267), easter-egg prune (#264). CHANGELOG-only change; no version claims.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
这两周平台面扩了两次:musl 进了
cross-target-smoke,HarmonyOS 进了cross-target-check。但"'哪个平台能用、能用是什么意思'没有一份统一说明——信息散在docs/release.md、CI 注释和几个 PR 讨论里。这个 PR 新增
docs/src/platform-support.md,把平台契约收成一份。内容
1. 状态矩阵
每个平台的 build / smoke-gated / released 三态。新增的两条腿都在里面:
cross-target-smokeaarch64-linux-ohos)(省去 Windows/macOS/glibc 那几行)
并解释了为什么 musl 能跑完整 smoke,而 ohos 只能 check——静态 musl 二进制能在 glibc runner 上原生跑,HarmonyOS 没有可用运行时。
2. HarmonyOS 为什么便宜
rustc --print cfg --target aarch64-unknown-linux-ohos→target_os = "linux"、target_family = "unix"libc::__rlimit_resource_t(glibc-only typedef),已由 rubash#449 修掉3.
uname在鸿蒙上的行为(这是之前挂着的验收项之一)identity.rs在 unix 下读uname(2)并原样打印utsname,没有硬编码。所以:uname -sLinuxuname -maarch64aarch64结论:不需要改代码,需要的是把这个行为定义清楚——文档里写明"这是刻意的,诚实来源是内核而不是编译期常量",并附一句"除非有具体消费者需要,否则不要加 HarmonyOS 专用分支"。
4. 鸿蒙 PC vs 鸿蒙手机(另一个验收项)
明确写成两个产品而不是一次移植:
fork/exec依据是华为官方 FAQ
faqs-ability-112。因为 Niubash 的 unix 侧是 fork+exec 模型(fd/unix.rs的Command::new+pre_exec),所以 PC 是普通移植、手机是另一个项目,且卡在一个我们控制不了的审核环节。5. Windows-only 边界
列清哪些东西按 cfg 永远不会出现在非 Windows 路径上(winuxcmd / wpm、ConPTY journey、Windows 路径翻译)。
改动面
docs/src/platform-support.mddocs/src/SUMMARY.mdcreate-missing = false,新页面必须登记)验证
SUMMARY.md的链接加在 Roadmap 之前,与全书顺序一致rustc --print cfg、cross-target-smoke的 CI 通过记录、uname内建源码)或官方来源(Rust 平台支持表、华为 FAQ),没有推断