Repository navigation
Expand file tree
/
Copy pathcorgi.toml
More file actions
278 lines (247 loc) · 12.9 KB
/
Copy pathcorgi.toml
File metadata and controls
278 lines (247 loc) · 12.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
corgi_version = "0.1.107"
# corgi build configuration for Zed.
# Corgi source and documentation: https://github.com/ConradIrwin/corgi
#
# corgi runs build.rs scripts and proc-macros in a sandbox with no network,
# no ambient environment, and reads limited to each package's own source plus
# what is declared here. Every setting names the packages it applies to, so
# only those packages' actions key on it — comment or command-text edits
# rebuild nothing.
#
# See the top-level Cargo.toml `[patch.crates-io]` for the local `scratch` patch
# that lets cxx/webrtc-sys build under the sandbox, and `util::fs_embed!` for
# how dev builds read embedded assets from the checkout instead of baking the
# build path into the binary.
# sha256-pinned tools, fetched into the corgi store and exposed to the named
# packages' build scripts via the given environment variable. Each download is
# built for one platform, so `targets` limits a tool to builds for that
# platform.
#
# Note: no protoc tool is needed. `proto` and `livekit_api` compile their
# protobufs with `protox` (a pure-Rust protoc) and `prost_build::compile_fds`,
# so nothing shells out to a protoc binary.
[tools.cmake]
version = "4.1.2"
url = "https://github.com/Kitware/CMake/releases/download/v4.1.2/cmake-4.1.2-macos-universal.tar.gz"
sha256 = "3be85f5b999e327b1ac7d804cbc9acd767059e9f603c42ec2765f6ab68fbd367"
bin = "cmake-4.1.2-macos-universal/CMake.app/Contents/bin/cmake"
env = "CMAKE"
packages = ["webrtc-sys", "wasmtime-c-api-impl"]
targets = ["aarch64-apple-darwin", "x86_64-apple-darwin"]
[tools.cmake-linux-x86_64]
version = "4.1.2"
url = "https://github.com/Kitware/CMake/releases/download/v4.1.2/cmake-4.1.2-linux-x86_64.tar.gz"
sha256 = "773cc679c3a7395413bd096523f8e5d6c39f8718af4e12eb4e4195f72f35e4ab"
bin = "cmake-4.1.2-linux-x86_64/bin/cmake"
command = "cmake"
env = "CMAKE"
packages = ["webrtc-sys", "wasmtime-c-api-impl"]
targets = ["x86_64-unknown-linux-gnu"]
# Prebuilt libwebrtc, so webrtc-sys-build does not have to download it over the
# network (which the sandbox forbids). The tag must match WEBRTC_TAG in the
# pinned livekit-rust-sdks revision; webrtc-sys-build reads LK_CUSTOM_WEBRTC and
# skips the download when it is set.
[tools.webrtc-prebuilt]
version = "0001d84-4"
url = "https://github.com/zed-industries/livekit-rust-sdks/releases/download/webrtc-0001d84-4/webrtc-mac-arm64-release.zip"
sha256 = "09ba71bfbc15c6aacced7fe20451a9648dfe648c24295f28d75fc386dbd7281a"
path = "mac-arm64-release"
env = "LK_CUSTOM_WEBRTC"
packages = ["webrtc-sys"]
targets = ["aarch64-apple-darwin"]
[tools.webrtc-prebuilt-linux-x86_64]
version = "0001d84-4"
url = "https://github.com/zed-industries/livekit-rust-sdks/releases/download/webrtc-0001d84-4/webrtc-linux-x64-release.zip"
sha256 = "23dd88d485b85e709b3fa37d7afed5ca7a3dd05febd3d9383ebeb793bcd1039e"
path = "linux-x64-release"
env = "LK_CUSTOM_WEBRTC"
packages = ["webrtc-sys"]
targets = ["x86_64-unknown-linux-gnu"]
# Shared libraries the Linux build links against when corgi supplies its own
# Zig toolchain, as on FHS Linux. Corgi unpacks them into a per-target sysroot
# that its pkg-config and linker read from; nothing comes from the host, so
# installing distribution -dev packages does not help. Each library needs its
# -dev package (the .so link, headers and .pc file) and its runtime package
# (the real .so). They come from Debian bullseye, whose glibc 2.31 is older
# than Corgi's default glibc 2.35 target. A Nix dev shell supplies its own
# compiler and pkg-config, so these are not used there.
#
# alsa: alsa-sys; fontconfig: yeslogic-fontconfig-sys; freetype: required by
# fontconfig.pc; x11 (and x11proto for xproto.pc and kbproto.pc): x11;
# x11-xcb: the x11 crate's xlib_xcb feature;
# glib (glib, gobject, gio): glib-sys, gobject-sys, gio-sys and webrtc-sys;
# xkbcommon, xkbcommon-x11: xkbcommon; xcb: x11rb.
[libraries.libasound2-dev-amd64]
# libasound2-dev 1.2.4-1.1 (Debian bullseye)
url = "https://snapshot.debian.org/archive/debian/20250601T000000Z/pool/main/a/alsa-lib/libasound2-dev_1.2.4-1.1_amd64.deb"
sha256 = "73d8b3fa8d161c7a9f3dcb38718925eaf8dbd9d94c1d687087b23aa0719f53e5"
targets = ["x86_64-unknown-linux-gnu"]
[libraries.libasound2-amd64]
# libasound2 1.2.4-1.1 (Debian bullseye)
url = "https://snapshot.debian.org/archive/debian/20250601T000000Z/pool/main/a/alsa-lib/libasound2_1.2.4-1.1_amd64.deb"
sha256 = "d8c9b5182768db2a7c5c73f1eed0b1be1431ae4f41084d502b325d06d5b0f648"
targets = ["x86_64-unknown-linux-gnu"]
[libraries.libfontconfig-dev-amd64]
# libfontconfig-dev 2.13.1-4.2 (Debian bullseye)
url = "https://snapshot.debian.org/archive/debian/20250601T000000Z/pool/main/f/fontconfig/libfontconfig-dev_2.13.1-4.2_amd64.deb"
sha256 = "7655d4238ee7e6ced13501006d20986cbf9ff08454a4e502d5aa399f83e28876"
targets = ["x86_64-unknown-linux-gnu"]
[libraries.libfontconfig1-amd64]
# libfontconfig1 2.13.1-4.2 (Debian bullseye)
url = "https://snapshot.debian.org/archive/debian/20250601T000000Z/pool/main/f/fontconfig/libfontconfig1_2.13.1-4.2_amd64.deb"
sha256 = "b92861827627a76e74d6f447a5577d039ef2f95da18af1f29aa98fb96baea4c1"
targets = ["x86_64-unknown-linux-gnu"]
[libraries.libfreetype-dev-amd64]
# libfreetype-dev 2.10.4+dfsg-1+deb11u1 (Debian bullseye)
url = "https://snapshot.debian.org/archive/debian/20250601T000000Z/pool/main/f/freetype/libfreetype-dev_2.10.4+dfsg-1+deb11u1_amd64.deb"
sha256 = "f0f5ece4c70fad68c8bdbe3cd09a5c9fb7d6112766f0d96439a45a9ae1aaf363"
targets = ["x86_64-unknown-linux-gnu"]
[libraries.libfreetype6-amd64]
# libfreetype6 2.10.4+dfsg-1+deb11u1 (Debian bullseye)
url = "https://snapshot.debian.org/archive/debian/20250601T000000Z/pool/main/f/freetype/libfreetype6_2.10.4+dfsg-1+deb11u1_amd64.deb"
sha256 = "b21cfdd12adf6cac4af320c2485fb62a8a5edc6f9768bc2288fd686f4fa6dfdf"
targets = ["x86_64-unknown-linux-gnu"]
[libraries.libx11-dev-amd64]
# libx11-dev 2:1.7.2-1+deb11u2 (Debian bullseye)
url = "https://snapshot.debian.org/archive/debian/20250601T000000Z/pool/main/libx/libx11/libx11-dev_1.7.2-1+deb11u2_amd64.deb"
sha256 = "9fbcda6af06d8db9cd8a48b581570aa8fee862bfc43b6f569a66503ae7d83211"
targets = ["x86_64-unknown-linux-gnu"]
[libraries.libx11-6-amd64]
# libx11-6 2:1.7.2-1+deb11u2 (Debian bullseye)
url = "https://snapshot.debian.org/archive/debian/20250601T000000Z/pool/main/libx/libx11/libx11-6_1.7.2-1+deb11u2_amd64.deb"
sha256 = "2b3b959cb10c07be065eb638a8577fe20f282045aaef76425dbd7310d1244b8c"
targets = ["x86_64-unknown-linux-gnu"]
[libraries.libx11-xcb-dev-amd64]
# libx11-xcb-dev 2:1.7.2-1+deb11u2 (Debian bullseye)
url = "https://snapshot.debian.org/archive/debian/20250601T000000Z/pool/main/libx/libx11/libx11-xcb-dev_1.7.2-1+deb11u2_amd64.deb"
sha256 = "cadd9279292904194469d366d42c3a2555050ac7c3767e30523128e394811cc3"
targets = ["x86_64-unknown-linux-gnu"]
[libraries.libx11-xcb1-amd64]
# libx11-xcb1 2:1.7.2-1+deb11u2 (Debian bullseye)
url = "https://snapshot.debian.org/archive/debian/20250601T000000Z/pool/main/libx/libx11/libx11-xcb1_1.7.2-1+deb11u2_amd64.deb"
sha256 = "1ac662dec0b4db1c65668a2c62f0063f4c9cc0d9c8df15ffe735bd2d84b8ee95"
targets = ["x86_64-unknown-linux-gnu"]
[libraries.x11proto-dev-amd64]
# x11proto-dev 2020.1-1 (Debian bullseye)
url = "https://snapshot.debian.org/archive/debian/20250601T000000Z/pool/main/x/xorgproto/x11proto-dev_2020.1-1_all.deb"
sha256 = "d5568d587d9ad2664c34c14b0ac538ccb3c567e126ee5291085a8de704a565f5"
targets = ["x86_64-unknown-linux-gnu"]
[libraries."libglib2.0-dev-amd64"]
# libglib2.0-dev 2.66.8-1+deb11u4 (Debian bullseye)
url = "https://snapshot.debian.org/archive/debian/20250601T000000Z/pool/main/g/glib2.0/libglib2.0-dev_2.66.8-1+deb11u4_amd64.deb"
sha256 = "6aee47dab59b9adf5a01988bdfced79a629478eeff4902d8de73a93f23b5398f"
targets = ["x86_64-unknown-linux-gnu"]
[libraries."libglib2.0-0-amd64"]
# libglib2.0-0 2.66.8-1+deb11u4 (Debian bullseye)
url = "https://snapshot.debian.org/archive/debian/20250601T000000Z/pool/main/g/glib2.0/libglib2.0-0_2.66.8-1+deb11u4_amd64.deb"
sha256 = "7aff8c1338b58a6fa2b3a914724040a2b7f6e8dc2333f30c98834f7948f1884f"
targets = ["x86_64-unknown-linux-gnu"]
[libraries.libxkbcommon-dev-amd64]
# libxkbcommon-dev 1.0.3-2 (Debian bullseye)
url = "https://snapshot.debian.org/archive/debian/20250601T000000Z/pool/main/libx/libxkbcommon/libxkbcommon-dev_1.0.3-2_amd64.deb"
sha256 = "1202d8c64e670876b58f5b3d3f797b1848ec462f7caeef8b1e597ecea18570b6"
targets = ["x86_64-unknown-linux-gnu"]
[libraries.libxkbcommon0-amd64]
# libxkbcommon0 1.0.3-2 (Debian bullseye)
url = "https://snapshot.debian.org/archive/debian/20250601T000000Z/pool/main/libx/libxkbcommon/libxkbcommon0_1.0.3-2_amd64.deb"
sha256 = "d74d0b9f0a6641b44c279644c7ac627fa7a9b92350b7c6ff37da94352885bcfc"
targets = ["x86_64-unknown-linux-gnu"]
[libraries.libxkbcommon-x11-dev-amd64]
# libxkbcommon-x11-dev 1.0.3-2 (Debian bullseye)
url = "https://snapshot.debian.org/archive/debian/20250601T000000Z/pool/main/libx/libxkbcommon/libxkbcommon-x11-dev_1.0.3-2_amd64.deb"
sha256 = "e6a6eecf10c2c43c3dbb8703ae6b748d9721ac19878bdadecdc6ebfadd9c7b83"
targets = ["x86_64-unknown-linux-gnu"]
[libraries.libxkbcommon-x11-0-amd64]
# libxkbcommon-x11-0 1.0.3-2 (Debian bullseye)
url = "https://snapshot.debian.org/archive/debian/20250601T000000Z/pool/main/libx/libxkbcommon/libxkbcommon-x11-0_1.0.3-2_amd64.deb"
sha256 = "c786f80d1a5405e96167ebbebdd7d100b356c0a3ae0f87fb6f65f05f2e723f72"
targets = ["x86_64-unknown-linux-gnu"]
[libraries.libxcb1-dev-amd64]
# libxcb1-dev 1.14-3 (Debian bullseye)
url = "https://snapshot.debian.org/archive/debian/20250601T000000Z/pool/main/libx/libxcb/libxcb1-dev_1.14-3_amd64.deb"
sha256 = "b75544f334c8963b8b7b0e8a88f8a7cde95a714dddbcda076d4beb669a961b58"
targets = ["x86_64-unknown-linux-gnu"]
[libraries.libxcb1-amd64]
# libxcb1 1.14-3 (Debian bullseye)
url = "https://snapshot.debian.org/archive/debian/20250601T000000Z/pool/main/libx/libxcb/libxcb1_1.14-3_amd64.deb"
sha256 = "d5e0f047ed766f45eb7473947b70f9e8fddbe45ef22ecfd92ab712c0671a93ac"
targets = ["x86_64-unknown-linux-gnu"]
# Plan-time probe: the git SHA is read here (outside the sandbox) and frozen
# into the keyed value. zed/build.rs prefers $ZED_COMMIT_SHA over running git,
# which the sandbox blocks. Release-only; dev builds embed no SHA (the source
# reads it via option_env!). cli/remote_server build.rs run git directly rather
# than reading this var, so they are not listed here.
[env.ZED_COMMIT_SHA]
command = "git rev-parse HEAD"
packages = ["zed"]
profiles = ["release"]
# Forwarded from the invoking environment when set. A Nix dev shell supplies
# pkg-config and the libraries it finds this way, since the sandbox passes no
# ambient environment to build scripts.
[env.PKG_CONFIG]
inherit = true
packages = [
"alsa-sys",
"gio-sys",
"glib-sys",
"gobject-sys",
"webrtc-sys",
"x11",
"yeslogic-fontconfig-sys",
]
[env.PKG_CONFIG_PATH]
inherit = true
packages = [
"alsa-sys",
"gio-sys",
"glib-sys",
"gobject-sys",
"webrtc-sys",
"x11",
"yeslogic-fontconfig-sys",
]
# Lets a Nix dev shell supply its own cmake: the downloaded Linux cmake expects
# a standard dynamic loader, which NixOS does not have.
[env.CMAKE]
inherit = true
packages = ["webrtc-sys", "wasmtime-c-api-impl"]
# Reads a package's actions perform that corgi's sandbox does not grant by
# default. By default only a package's own `.rs` files (plus its manifest) are
# readable, so non-`.rs` files a build script or macro reads must be listed even
# when they live inside the package. Entries are glob patterns relative to the
# named package's root, and every file they match is granted and hashed as an
# input. A pattern selects files, never directories: `dir/**` is how you take
# everything under a directory, and `dir/*` takes only what sits directly in it.
[extra-inputs]
# Own non-.rs files read at build time (protobufs, bindgen headers, doc/data).
proto = ["proto/**"]
livekit_api = ["vendored/protocol/**"]
gpui = [
"README.md",
"examples/image/exif-orientation-rotate-180.jpg",
"../../assets/fonts/ibm-plex-sans/IBMPlexSans-Regular.ttf",
"../../assets/fonts/lilex/Lilex-Regular.ttf",
]
git_ui = ["src/commit_message_prompt.txt"]
editor = ["../grammars/src/**"]
edit_prediction = ["license_patterns/**"]
agent_skills = ["builtin/**"]
agent_settings = ["src/prompts/**"]
json_schema_store = ["src/schemas/**"]
prettier = ["src/prettier_server.js"]
zed = ["resources/**"]
zed_extension_api = ["wit/**"]
gpui_wgpu = ["src/*.wgsl"]
# Cross-package reads (and, for gpui_apple, its own metal shader source).
extension_host = ["../extension_api/wit/**"]
# cbindgen reads the renderer source directly from build.rs to generate shader bindings.
gpui_apple = ["../gpui/src/**", "src/metal_renderer.rs", "src/shaders.metal"]
eval_cli = ["../zed/Cargo.toml"]
prompt_store = ["../git_ui/src/commit_message_prompt.txt"]
release_channel = ["../zed/RELEASE_CHANNEL"]
cli = ["../../script/uninstall.sh"]
remote_server = ["../zed/Cargo.toml"]
# `../zed/Cargo.toml`: build.rs reads it for ZED_PKG_VERSION. `../grammars/src`
# and `src/prompts` are embedded in release builds; dev builds read them at
# runtime via fs_embed.
edit_prediction_cli = ["../zed/Cargo.toml", "../grammars/src/**", "src/prompts/**"]