Files
endorphin-tessera-gui/Cargo.toml

51 lines
2.5 KiB
TOML

# Cargo 包元数据与编译器最低版本;二进制入口默认取 src/main.rs。
[package]
name = "tessera"
version = "0.1.0"
edition = "2024"
rust-version = "1.91"
description = "Cross-platform desktop rendering client"
license = "MIT OR Apache-2.0"
# 跨平台运行依赖:语言执行、文字排版、序列化、窗口/像素表面与轻量 HTTP 服务。
# Aster 三个 crate 使用固定在本仓库 vendor 子模块中的本地源码,不从注册表选择同名实现。
[dependencies]
# 应用边界的错误聚合与上下文,保留底层失败原因。
anyhow = "1.0"
# Aster 字节码编译器,把前端结果交给同一套 VM 执行。
compiler = { path = "vendor/aster/crates/compiler" }
# 系统字体发现、塑形与换行,用于测量和软件文字绘制。
cosmic-text = "0.19"
# 解码脚本加载的 PNG 图像,供通用精灵绘制与透明轮廓计算。
png = "0.18"
# 按 Unicode 断行机会准备可复用文字片段,供排除区域绕排。
unicode-linebreak = "0.1.5"
# Aster 托管对象、类型系统、VM 和可恢复调用;依赖包名 core 在 Rust 中重命名为 endor_core。
endor_core = { package = "core", path = "vendor/aster/crates/core" }
# Endor 源语法解析与原始位置诊断。
frontend = { path = "vendor/aster/crates/frontend" }
# 派生序列化协议,rc 特性允许发布模型中的 Arc/Rc 数据参与序列化。
serde = { version = "1.0", features = ["derive", "rc"] }
# HTTP 请求/响应与事件信封的 JSON 编解码。
serde_json = "1.0"
# 把宿主软件光栅化得到的像素缓冲呈现到原生窗口。
softbuffer = "0.4.8"
# 本地 Agent API 的 HTTP 监听与请求响应,不引入异步 Web 运行时。
tiny_http = "0.12"
# 按 Unicode 字素边界处理编辑/选择,避免把组合字符拆开。
unicode-segmentation = "1.12"
# 跨平台窗口、事件循环、DPI 与输入法事件。
winit = "0.30.13"
# 仅 macOS 编译原生标题栏适配,显式开启所用 AppKit/Foundation API,其他平台不引入这些依赖。
[target.'cfg(target_os = "macos")'.dependencies]
objc2 = "0.5.2"
objc2-app-kit = { version = "0.2.2", default-features = false, features = ["NSApplication", "NSButton", "NSEvent", "NSView", "NSWindow"] }
objc2-foundation = { version = "0.2.2", default-features = false, features = ["NSGeometry", "NSString", "NSUserDefaults"] }
# 发布构建:thin LTO 与单代码生成单元偏重最终优化,strip 去除可执行文件符号以控制体积。
[profile.release]
lto = "thin"
codegen-units = 1
strip = true