方案 A(clang + lld + 本地 sysroot)。rustc 为 freebsd target 链接的系统库 (libc/libexecinfo/libgcc_s/libthr)及 sysinfo 依赖的 freebsd 专有库 (libkvm/libmemstat/libprocstat/libdevstat)需 FreeBSD 运行时,无法纯靠 clang+lld 无 sysroot 完成;故从 FreeBSD 15.1 base.txz 解出 crt 对象 + 系统库 到 .freebsd-sysroot/(gitignored,machine-local)。 - .cargo/config.toml: freebsd target 配置作为注释模板(sysroot 路径机器相关, 不硬编码进仓库);linker 经 rustflags 的 -C linker=clang 设置,使 Makefile 能用 CARGO_TARGET_*_RUSTFLAGS 环境变量整体注入。 - Makefile: 新增 freebsd-sysroot(幂等下载+解压 base.txz)与 build-freebsd (release server 二进制交叉编译)target。server 用 cargo 直出而非 dx CLI, 因 dx 对该 target 的支持未经验证。 - .gitignore: 忽略 .freebsd-sysroot/。 - AGENTS.md: 补充构建命令说明。 实测 release 二进制 16MB,stripped ELF for FreeBSD 15.1,动态依赖均为 FreeBSD base 自带库(libc.so.7 libthr.so.3 libkvm.so.7 等)。
35 lines
469 B
Plaintext
35 lines
469 B
Plaintext
/target
|
|
/dist
|
|
/.dioxus
|
|
/.omc
|
|
/node_modules
|
|
**/**/node_modules
|
|
/package-lock.json
|
|
others/
|
|
public/style.css
|
|
public/highlight.css
|
|
public/tiptap
|
|
public/codemirror
|
|
public/lightbox
|
|
public/yggdrasil-core
|
|
public/doc
|
|
/static
|
|
.env
|
|
docs/superpowers/
|
|
|
|
# Uploaded images
|
|
uploads/*
|
|
!uploads/.gitkeep
|
|
uploads/.cache/
|
|
|
|
# Database backups
|
|
backups/
|
|
|
|
profile.json.gz
|
|
|
|
# Git worktrees
|
|
.worktrees/
|
|
|
|
# FreeBSD cross-compile sysroot (extracted from base.txz, machine-local)
|
|
.freebsd-sysroot/
|