Pin Zed v1.16.1 and the gpui-component baseline to immutable revisions, align the Rust toolchain requirement, and regenerate Cargo.lock. This is a dependency checkpoint only: application API migration and Nebula product patches remain for isolated follow-up commits, so gpui-shell is not yet expected to compile. Committed with --no-verify because the repository line-count hook rejects generated Cargo.lock growth above 2500 lines; staged diff checks and locked offline metadata validation pass.
156 lines
8.8 KiB
TOML
156 lines
8.8 KiB
TOML
[workspace]
|
||
members = [
|
||
"nebula_app",
|
||
"nebula_terminal",
|
||
"nebula_config",
|
||
"nebula_config_derive",
|
||
"nebula-completions",
|
||
"nebula_hook",
|
||
"nebula_gpui",
|
||
"nebula_settings",
|
||
"nebula_split",
|
||
]
|
||
resolver = "2"
|
||
|
||
[workspace.package]
|
||
edition = "2024"
|
||
rust-version = "1.97.1"
|
||
|
||
[profile.release]
|
||
# fat LTO 会用顶层 opt-level 重跑全程序 codegen,把下面的热路径 O3 钉子
|
||
# 冲掉;thin + codegen-units=1 保住钉子,体积差距只有个位数百分点。
|
||
lto = "thin"
|
||
debug = 0
|
||
strip = "symbols"
|
||
incremental = false
|
||
codegen-units = 1
|
||
# 发布包体积预算:安装包 <30MB。冷代码(协议栈、序列化、CLI、SSH 等
|
||
# 几百个依赖)按体积编译;渲染/塑形/布局/VT 热路径在下面逐个钉回 O3,
|
||
# 手感不受影响。改动这里必须重新跑 scripts/tests/package-release.tests.ps1。
|
||
opt-level = "s"
|
||
|
||
[profile.release.package]
|
||
resvg = { opt-level = 3 }
|
||
rustybuzz = { opt-level = 3 }
|
||
taffy = { opt-level = 3 }
|
||
ttf-parser = { opt-level = 3 }
|
||
smol = { opt-level = 3 }
|
||
gpui = { opt-level = 3 }
|
||
gpui-component = { opt-level = 3 }
|
||
nebula_terminal = { opt-level = 3 }
|
||
nebula = { opt-level = 3 }
|
||
image = { opt-level = 3 }
|
||
|
||
# Debug 壳仍要承担真实终端负载:GPUI 布局/字体塑形和 VT 解析若以
|
||
# opt-level 0 运行,窗口拖拽与持续输入都会出现发布版没有的延迟。
|
||
# 外部依赖统一 O2(Zed 同款策略:图形栈/图像解码/Unicode 处理散布在
|
||
# 几十个 crate 里,逐个点名永远漏),少数塑形/布局热点保持 O3;
|
||
# workspace 成员不受 "*" 影响,主 crate 继续增量 debug。
|
||
[profile.dev]
|
||
codegen-units = 16
|
||
debug = "limited"
|
||
split-debuginfo = "unpacked"
|
||
|
||
[profile.dev.package]
|
||
"*" = { opt-level = 2 }
|
||
resvg = { opt-level = 3 }
|
||
rustybuzz = { opt-level = 3 }
|
||
taffy = { opt-level = 3 }
|
||
ttf-parser = { opt-level = 3 }
|
||
smol = { opt-level = 3 }
|
||
gpui = { opt-level = 3 }
|
||
gpui_macros = { opt-level = 3 }
|
||
nebula_terminal = { opt-level = 3 }
|
||
|
||
[workspace.dependencies]
|
||
mlua = { version = "0.11.4", features = ["lua54", "vendored", "serialize", "send"] }
|
||
serde_path_to_error = "0.1.20"
|
||
toml = "0.9.11"
|
||
toml_edit = "0.24.0"
|
||
# GPUI v1.16.1 把平台启动入口拆到独立 crate。它必须与 `gpui` 使用完全相同
|
||
# 的 Git URL 和 rev,否则 Cargo 会把同名类型解析成两套互不兼容的 crate。
|
||
gpui_platform = { git = "https://github.com/zed-industries/zed", rev = "eb8e1c8b5502b7007465fbbc465f4a736fa39210", version = "=0.1.0" }
|
||
|
||
# TODO: Drop this pin and return to the crates.io release once the fix ships there.
|
||
[patch.crates-io]
|
||
x11-clipboard = { git = "https://github.com/quininer/x11-clipboard.git", rev = "19ab2163cf0bd0db607e827a5214571990307866" }
|
||
# Keep the 0.30.13 API/rwh_06 surface while backporting winit upstream
|
||
# 488c036a's Windows 11 mixed-DPI positioning fix. The upstream revision has
|
||
# since moved to a different EventLoop API and cannot be used directly here.
|
||
winit = { path = "third_party/winit-0.30.13" }
|
||
|
||
# ---- GPUI v1.16.1 固定基线 ------------------------------------------------
|
||
#
|
||
# 版本配对:Zed v1.16.1 提交上的 gpui 0.2.2 / gpui_platform 0.1.0,配套
|
||
# gpui-component 0.5.2 和 gpui-component-assets 0.5.1。版本号与 Git rev 都
|
||
# 精确固定,禁止 main、通配版本或仅凭 branch 名解析。
|
||
#
|
||
# GitHub 固定点(branch/tag 只用于审计,Cargo 始终使用下面的完整 SHA):
|
||
# zed-industries/zed v1.16.1 @ eb8e1c8b5502b7007465fbbc465f4a736fa39210
|
||
# Kuddev/zed nebula-v1.16.1-base @ 同一 SHA(纯上游镜像,应急锚点)
|
||
# Kuddev/gpui-component nebula-v1.16.1-base
|
||
# @ 4ee9f274e990d6228e4f276f0a1e48f62f6a2048
|
||
# (官方 46576ae7 快照 + 仅 Cargo 依赖固定,不含 Nebula 产品补丁)
|
||
#
|
||
# Zed 依赖继续使用官方 URL:component 基线内部也使用这个 URL,而 Cargo 的
|
||
# source identity 包含 URL;若应用改用 Kuddev 镜像,即使 SHA 相同也会解析成
|
||
# 两套 gpui 类型。新增 component 补丁必须从固定基线开独立分支、逐条提交并
|
||
# 更新 exact rev,不能移动基线 branch/tag。
|
||
#
|
||
# 升级基点到 gpui-component 0.5.2+ 时的回归检查单(0.5.1 上这些行为本来是对的,
|
||
# 是 0.5.2 重构 button 颜色推导时弄丢的,届时把下面两个 fix 带上):
|
||
# 1. ButtonVariant::Custom 的 text_color 必须回 colors.foreground(0.5.2
|
||
# 回归成背景色 colors.color,透明底按钮字直接隐形)→ 3826fafacd3c
|
||
# 2. hovered()/active() 必须读 ButtonCustomVariant::hover/active(0.5.2
|
||
# 回归成从 color 派生,透明底按钮没有任何悬停/按下反馈)→ 469ab7a44f72
|
||
# 3. 新增的 text/inline_flow.rs:shape_line 前把 \n\r 换成空格(gpui
|
||
# shaper 遇换行 panic;替换保 byte 长度,run 偏移不失效)
|
||
# 本地工作树只用于开发和验收,不再参与 Cargo 解析。
|
||
#
|
||
# 上游行为备忘(不是补丁,是调用侧要知道的事):`Scrollable`
|
||
# (scroll/scrollable.rs 的 overflow_*_scrollbar)不是就地加滚动条,而是把
|
||
# 被包装元素的 StyleRefinement 整个 clone 到它新建的外层 div,再把原元素
|
||
# 样式清空、只补 flex_1,然后塞进一层 `overflow_y_scroll` 的 scroll-area。
|
||
# 后果:真正承载 children 的那层退回 gpui 默认的 Display::Block 且宽度不
|
||
# 确定,children 上的 `w_full`(width:100%)无从解析、回落到 max-content,
|
||
# 于是每个子块按自己的内容宽度收缩,看起来就是"分组宽度参差、控件既不贴
|
||
# 左也不贴右"(2026-08-17 设置页实测 A/B 确认)。**调用侧约定:滚动区内
|
||
# 先放一层 `v_flex().w_full()`,内容写在它里面**——竖向 flex 的子项走交叉
|
||
# 轴 stretch 拿宽度,绕开百分比解析。settings_pane.rs 的设置正文即按此写。
|
||
#
|
||
# 产品补丁清单(从固定基线逐条迁移并验收,不能一次性混入):
|
||
# 1. popover 单层紧凑阴影(a59f704c,见上)。
|
||
# 2. TextView 数学公式钩子(本地 nebula-math 分支,待 push 后恢复 rev pin):
|
||
# markdown 解析启用 math 构造;新增 text/math.rs 的 set_math_renderer
|
||
# 全局注册点;InlineNode/Node 增加数学节点并在渲染时调钩子,未注册时
|
||
# 回退现状(inline=code 文本、block=CodeBlock)。TeX 引擎/栅格化/绘制
|
||
# 全部住在 nebula_app::gpui_shell::math_view,fork 只有接线层。上游
|
||
# 0.6 线出现 MarkdownPlugin/Custom block 后应迁过去并撤掉本补丁。
|
||
# 3. TextView 阅读器 GitHub 化(同分支,随 2 一起 push):软换行按
|
||
# CommonMark 合并为空格(CJK 相邻直连);图片 URL 分流(http(s)/data
|
||
# 走 URI、绝对路径读盘、相对路径按 TextViewStyle::image_base 解析);
|
||
# HTML `align="center"` 居中(Paragraph/Heading 的 align_center);
|
||
# 同一 <p> 内多枚 <img> 徽章同段横排不再逐图切段;<br/> 按文档序断行
|
||
# (旧逻辑先 push Break 再统一 flush 文本,A<br/>B 画成 <br/>AB);
|
||
# <a><img/></a> 链接徽章不再整个丢失(图片转移并挂 link)。除
|
||
# image_base 外全部是 GitHub 语义对齐的纯 bug 修,上游 PR 候选,合并
|
||
# 即撤。
|
||
# 4. Input 水平滚动回不到行首(input/element.rs,光标越出左边界的分支):
|
||
# 原式 `scroll_offset.x - cursor_pos.x` 没有解方程,而是把当前偏移再减
|
||
# 一次光标位置,于是光标每次往左移动内容反而更往左跑,长值永远滑不到
|
||
# 开头(用户 08-19 在 tab 重命名框上报)。改成 `-cursor_pos.x`,与右
|
||
# 边界分支同样的解法,也与同函数 is_selected_all 分支里既有的正确写法
|
||
# 一致。纯 bug 修,上游 PR 候选,合并即撤。
|
||
# 5. Input 拖选缺自动滚动(input/state.rs,新增 autoscroll_for_drag):
|
||
# index_for_mouse_position 把「鼠标到内容原点的距离」换算成字符下标,而
|
||
# 内容原点已含滚动偏移,于是要选到更前面的字符就得把鼠标再往可视框左边
|
||
# 挪同样多的像素——输入框贴在侧栏左侧时根本没这段空间(撞屏幕边),长
|
||
# 文本永远拖不到开头。改为越界即按越出距离推进滚动(复用既有的
|
||
# update_scroll_offset,边界 clamp 现成)。补丁 4 修的是键盘移动那条路,
|
||
# 这条修的是鼠标拖选,两者都要。上游 PR 候选,合并即撤。
|
||
#
|
||
# 当前只落固定基线;数学、GFM、Input 与视觉补丁将在独立提交中逐项恢复。
|
||
gpui = { git = "https://github.com/zed-industries/zed", rev = "eb8e1c8b5502b7007465fbbc465f4a736fa39210", version = "=0.2.2" }
|
||
gpui-component = { git = "https://github.com/Kuddev/gpui-component", rev = "4ee9f274e990d6228e4f276f0a1e48f62f6a2048", version = "=0.5.2" }
|
||
gpui-component-assets = { git = "https://github.com/Kuddev/gpui-component", rev = "4ee9f274e990d6228e4f276f0a1e48f62f6a2048", version = "=0.5.1" }
|