diff --git a/.gitignore b/.gitignore index e0cabea..543d306 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,11 @@ apsis-book.html # Diagnostics dropped beside the project while working on it, such as the # screenshots of a page under inspection. /tmp + +# The release notes. They are the annotation of a tag rather than part of the +# project, and a tag carries one message, so the file is kept beside the +# source to make the tag with and is not itself committed. +# +# 发布说明是标签的注释,而不是项目的一部分;一个标签只承载一条消息,因此该文件 +# 放在源码旁边供打标签使用,本身不提交。 +/docs/releases diff --git a/README.md b/README.md index 04f9d2c..3c54366 100644 --- a/README.md +++ b/README.md @@ -257,6 +257,9 @@ apsis-book/ ├── Dockerfile the release image, in three stages ├── Dockerfile.dockerignore what the image build is not sent ├── docker-compose.yml runs the image with the settings it wants +├── docs/ the design notes +│ ├── design.md why the service is built the way it is +│ └── design.zh.md the same in Chinese ├── frontend/ Svelte and TypeScript, built by Vite │ ├── src/lib/ API client, router, components, formatting │ ├── src/pages/ one component per route @@ -271,8 +274,8 @@ apsis-book/ │ ├── http/ request, response, and server │ ├── tools/ the tool registry, the handlers, the result shape │ ├── json.rs the JSON codec -│ ├── lib.rs the modules, as a library -│ ├── testkit.rs the few internals the tests reach +│ ├── lib.rs the modules, as a library +│ ├── testkit.rs the few internals the tests reach │ ├── main.rs the process entry point │ └── state.rs the parsed content, shared by every worker └── tests/ every test; `src/` holds none diff --git a/README.zh.md b/README.zh.md index 072ad90..091cee6 100644 --- a/README.zh.md +++ b/README.zh.md @@ -223,6 +223,9 @@ apsis-book/ ├── Dockerfile 发布镜像,分三个阶段 ├── Dockerfile.dockerignore 镜像构建不接收的内容 ├── docker-compose.yml 以长期运行所需的设置来运行镜像 +├── docs/ 设计说明 +│ ├── design.md 服务为何如此构建 +│ └── design.zh.md 同上,中文 ├── frontend/ Svelte 与 TypeScript,由 Vite 构建 │ ├── src/lib/ API 客户端、路由器、组件、格式化 │ ├── src/pages/ 每个路由一个组件 @@ -237,8 +240,8 @@ apsis-book/ │ ├── http/ 请求、响应与服务器 │ ├── tools/ 工具注册表、处理函数、结果形状 │ ├── json.rs JSON 编解码器 -│ ├── lib.rs 各模块,以库的形式 -│ ├── testkit.rs 测试所需的少数内部项 +│ ├── lib.rs 各模块,以库的形式 +│ ├── testkit.rs 测试所需的少数内部项 │ ├── main.rs 进程入口 │ └── state.rs 解析后的内容,供每个工作线程共享 └── tests/ 全部测试;`src/` 中没有 diff --git a/src/json.rs b/src/json.rs index 5f3e7ec..7778f44 100644 --- a/src/json.rs +++ b/src/json.rs @@ -9,8 +9,8 @@ //! offset of the first problem. //! - [`to_string`] encodes a value in compact form and [`to_string_pretty`] //! encodes it with indentation for readability. -//! - The [`object`] macro builds an object literal without repeating the -//! `Value` constructors. +//! - The [`json_object`](crate::json_object) macro builds an object literal +//! without repeating the `Value` constructors. //! //! Numbers are held as `f64`. Integers that need the full `i64` range are //! decoded exactly as long as they can be represented as an `f64` without @@ -30,7 +30,7 @@ //! - [`parse`] 解码一份文档,并以 [`JsonError`] 报告第一个问题的字节偏移。 //! - [`to_string`] 以紧凑形式编码一个值,[`to_string_pretty`] 以缩进编码以便 //! 阅读。 -//! - [`object`] 宏构造对象字面量,无需重复 `Value` 的构造函数。 +//! - [`json_object`](crate::json_object) 宏构造对象字面量,无需重复 `Value` 的构造函数。 //! //! 数字以 `f64` 持有。需要完整 `i64` 范围的整数,只要能无损地表示为 `f64`, //! 就会被精确解码,这在上限 `2^53` 之内成立;服务只交换该范围内的量与标识。