web-font/rust-spike/Cargo.toml
崮生(子虚) 61c1f56aac feat(rust): rust-spike 后端转正——musl 静态二进制 2.2MB + scratch 镜像
- 零依赖 TTF/OTF 子集化 + woff2 编码,Windows 兼容修复(maxp maxZones、表 checksum)
- 字体 API 强缓存 max-age=86400 + ETag/304 协商兜底
- 发布链路切换 build_backend_rs,Dockerfile FROM scratch 仅含 webfont-rs + dist/
2026-11-04 19:07:23 +08:00

29 lines
680 B
TOML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[package]
name = "webfont-rs"
version = "0.1.0"
edition = "2024"
[dependencies]
brotli = "9"
[profile.release]
opt-level = 3
lto = "thin"
codegen-units = 1
panic = "unwind"
# 超小二进制发布 profile(目标 3):size 优化 + 全 LTO + 去符号。
# panic 保持 unwind:连接线程 panic 只断当前连接(abort 会因单个畸形请求打死整个服务)
# 禁 unsafe 红线不变;brotli crate 仍限 woff2.rs
[profile.tiny]
inherits = "release"
opt-level = "z"
lto = "fat"
codegen-units = 1
strip = "symbols"
# 小体积但保速变体:opt=3(tiny 的 opt=z 让子集化慢 1.3 倍,速度优先)
[profile.tinyfast]
inherits = "tiny"
opt-level = 3