Skip to content

docs: add bilingual documentation in docs/en_us and docs/zh_cn - #11

Merged
minelogy-dev merged 2 commits into
mainfrom
docs/bilingual-documentation
Nov 12, 2026
Merged

minelogy-dev merged 2 commits into
mainfrom
docs/bilingual-documentation

Conversation

@minelogy-dev

Copy link
Copy Markdown
Owner

Summary

Adds the complete bilingual manual under docs/en_us/ and docs/zh_cn/ (hub at docs/README.md), kept in sync with the current behavior and CI.

  • One document set per language: getting started, user guide, API reference (buffers & views; search, compare & split), regex, design & internals, build/test/package, contributing, CI.
  • Documented from the current sources and tests: write-range overflow rejection (sx_write* returns NULL, target unchanged, owned input still consumed) and the native memmem fast path for sx_find* with the SX_FORCE_NO_MEMMEM fallback.
  • Synced with the 24-test suite (differential search and write-overflow tests included) and the new write-safety, search-performance and benchmark workflows.
  • Documentation-only. docs/CI.md moves into the bilingual manual (root README links updated); upstream docs/WRITE_SAFETY.md is folded into the API / design / guide pages so docs/ stays in the en_us + zh_cn layout.
  • Concise prose throughout; the quick start is a single chained expression that shows the ownership model.

Verification

  • 24/24 tests build and pass under ASan/UBSan/LSan, including SX_FORCE_NO_MEMMEM and SX_FORCE_EXACT_RESERVE variants.
  • 32/32 complete C examples in the docs compile and run; 28/28 documented output blocks match actual stdout.
  • 65/65 public functions documented with prototypes matching the headers.
  • Bilingual heading/structure parity, relative links and anchors, and formatting checks pass. No source or test files change.

Branch is rebased on main at d8b251e (write-overflow fix, search fast paths, benchmarks and new CI workflows).


中文摘要:新增 docs/en_us/ 与 docs/zh_cn/ 完整双语文档(docs/README.md 为语言入口),并已与最新 main 同步:记录写入范围溢出拒绝契约、sx_find* 的 memmem 原生快路径与 SX_FORCE_NO_MEMMEM 回退、24 个测试套件,以及 write-safety / search-performance / benchmark 新工作流。原 docs/CI.md 迁入双语 ci.md,上游 docs/WRITE_SAFETY.md 内容折入 API/设计/指南页面,保持 docs 目录为 en_us + zh_cn 结构。本 PR 仅改文档;24/24 测试、32/32 文档示例、65/65 函数覆盖均已验证。

- add a complete English and Simplified Chinese manual: getting started,
  user guide, API reference for buffers/views and search/compare/split,
  regex guide, design & internals, build/test/package, contributing, CI
- move the CI notes from docs/CI.md into both languages and update every
  link; add a docs hub at docs/README.md
- correct root README statements about the layer that declares sx_split
  and about out-of-contract inputs
- every public function is documented with its exact prototype; all
  complete examples compile and run under ASan/UBSan/LSan and the full
  20-test suite passes
- tighten the prose to a concise, direct style; rewrite the quick-start
  example as a single chained expression that shows memory-safe ownership
- replace Forge tutorials with a link and the commands users actually need
- document the write-range overflow contract (NULL return, target unchanged,
  owned input still consumed) and the native memmem fast path for
  sx_find*, including the SX_FORCE_NO_MEMMEM fallback
- sync with the 24-test suite and the new write-safety, search-performance
  and benchmark workflows
- fold the upstream docs/WRITE_SAFETY.md into the bilingual manual and keep
  docs/ organized as docs/en_us + docs/zh_cn
@minelogy-dev
minelogy-dev merged commit 3b5fcff into main Nov 12, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant