mirror of
https://github.com/zed-industries/zed.git
synced 2026-11-19 06:59:22 +01:00
83df5df635
Release Notes: - N/A Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
150 lines
6.0 KiB
TOML
150 lines
6.0 KiB
TOML
corgi_version = "0.1.106"
|
|
|
|
# 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"]
|
|
|
|
# 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/**"]
|