7 Commits

Author SHA1 Message Date
xfy
09ca480842 chore(docker): 移除 gh-proxy,改用 GitHub 直连下载 dx 与 Tailwind
Dioxus CLI 与 Tailwind CSS 独立二进制此前经 gh-proxy.com 镜像下载,
现移除 GH_PROXY 前缀及相关注释,直接从 GitHub Releases 拉取。
2026-07-16 14:51:21 +08:00
xfy
f39cb35a31 docs: 补充数学公式与流程图架构说明
AGENTS.md 新增 'Math & Diagrams' 章节详述两条渲染路径:
- KaTeX 服务端渲染:katex-rs + pulldown-cmark ENABLE_MATH + sanitizer span
  白名单 + 自托管 CSS/字体(make katex-css)
- mermaid 客户端懒加载:IntersectionObserver + 动态 import 独立 bundle

同步更新:Server-only deps 加 katex-rs、Frontend Lib 表加 mermaid-renderer 行、
Build Artifacts 加 public/{katex,mermaid}、markdown.rs 描述。
2026-07-16 14:24:38 +08:00
xfy
8c88e82acd fix(docker): make server build arch-aware for multi-arch buildx
Cross-compiling x86_64-unknown-linux-musl from an arm64 buildx leg breaks
ring: cc-rs emits -m64 for the x86_64 target but hands it to Debian's
arm64 musl-gcc (shipped for host arch only), whose cc1 has no -m64 →
'cc1: error: unrecognized command-line option "-m64"'.

Each buildx platform leg now builds its own native musl target
(amd64→x86_64, arm64→aarch64) so musl-gcc and the target always match —
no cross-compiler, no QEMU for the compile step. The built binary is
staged at an arch-independent path so the scratch runtime stage can COPY
it without knowing which target was used.

Makefile gains a docker-multiarch target (buildx --platform
linux/amd64,linux/arm64 --push); 'make docker' now uses buildx --load
for local single-arch testing.
2026-07-10 11:26:03 +08:00
xfy
914562a9e5 feat(docker): route all build downloads through China mirrors
Container内无法访问宿主机的 127.0.0.1:10808 代理(Docker Desktop NAT),
官方源在容器内要么被透明代理截断(NOSPLIT)、要么限速到 16 KB/s。把
所有网络下载源换成国内镜像,实测在容器内:

  - Debian apt   -> TUNA         3.9 MB/s (apt-get update 3s)
  - Node.js 22   -> npmmirror    二进制 mirror,200
  - npm/pnpm     -> npmmirror    registry.npmmirror.com,200
  - Rust/rustup  -> rsproxy.cn   200
  - crates.io    -> rsproxy      sparse index,200
  - Tailwind v4  -> gh-proxy.com 430 KB/s(106MB 完整下载,vs 代理 16KB/s)

镜像地址全部提为 ARG(默认国内源),需要时可 --build-arg 切回官方。
GitHub release 二进制不进宿主代理(大文件限速),单独走国内 GitHub 反代
CDN;GH_PROXY 置空可回退直连。
2026-07-10 10:35:06 +08:00
xfy
0a5dd9c67a fix(docker): use HTTPS Debian mirrors to bypass transparent HTTP interception
A transparent HTTP proxy on the build host (http_proxy=127.0.0.1:10808)
truncates apt's plain-HTTP downloads to a 2578-byte HTML error page, which
apt rejects with 'Clearsigned file isn't valid, got NOSPLIT'. curl/wget
inside the same container fetch the full 151074-byte InRelease fine, and
HTTPS apt sources work — so switch the builder's Debian sources to HTTPS.

Proven by: apt-get update over HTTPS fetched 9264 kB successfully (4m27s
through the throttled proxy); plain HTTP failed with NOSPLIT every time.
2026-07-10 09:41:48 +08:00
xfy
2a7f7be738 chore(docker,ci): Dockerfile 与 CI 切换 pnpm workspace,docs 同步
Dockerfile:
- Node 22 安装段追加 corepack enable + pnpm 11.8.0
- 缓存层从'只 tiptap 的 package.json'扩展为整个 workspace
  (libs/package.json + pnpm-workspace.yaml + pnpm-lock.yaml + 4 lib manifest),
  npm ci 改为 pnpm install --frozen-lockfile,覆盖全部 4 个 lib 的 Docker 层缓存
- 构建步骤 make build-editor 改为 make build-libs

Gitea CI:
- check job 的 Install Node 步骤加装 pnpm,新增 Biome lint 步骤
  (cd libs && pnpm install --frozen-lockfile && pnpm exec biome check .)
- build job 同步装 pnpm,make build 不变(Makefile 已改用 workspace)

.dockerignore: 补齐其余 3 个 lib 的 public 产物 + workspace node_modules 模式

AGENTS.md: Development Commands 删 make clippy、新增 make lint/make fix 说明;
Prerequisites 补 Biome;libs 段改为 pnpm workspace 模型;修正文档漂移
(tt-reveal→tt-expand,eval→Reflect::get)
2026-07-02 18:10:11 +08:00
xfy
ae84c37f21 build: add Dockerfile and .dockerignore for static musl image
Some checks failed
CI / build (push) Has been cancelled
CI / check (push) Has been cancelled
- Multi-stage build using rust:1.96-bookworm builder and scratch runtime.
- Produces a fully statically linked x86_64-unknown-linux-musl server binary.
- Builds frontend assets (Tiptap, Tailwind, Dioxus WASM) and bundles public/.
- Image size ~25 MB; server listens on 0.0.0.0:3000.
2026-06-17 09:48:12 +08:00