Add blade dependency

Dzmitry Malyshau created

Change summary

Cargo.toml              |  4 ++++
crates/cli/Cargo.toml   |  6 +++---
crates/gpui/Cargo.toml  |  2 ++
crates/gpui/build.rs    | 10 +++++-----
crates/gpui/src/gpui.rs |  3 +--
rust-toolchain.toml     |  2 +-
6 files changed, 16 insertions(+), 11 deletions(-)

Detailed changes

Cargo.toml 🔗

@@ -181,6 +181,10 @@ wasmtime = "16"
 tree-sitter = { git = "https://github.com/tree-sitter/tree-sitter", rev = "1d8975319c2d5de1bf710e7e21db25b0eee4bc66" }
 wasmtime = { git = "https://github.com/bytecodealliance/wasmtime", rev = "v16.0.0" }
 
+# TODO - Remove when corresponding Blade versions are published
+blade-graphics = { path = "/x/Code/blade/blade-graphics" }
+blade-macros = { path = "/x/Code/blade/blade-macros" }
+
 [profile.dev]
 split-debuginfo = "unpacked"
 debug = "limited"

crates/cli/Cargo.toml 🔗

@@ -23,6 +23,6 @@ serde_derive.workspace = true
 util = { path = "../util" }
 
 [target.'cfg(target_os = "macos")'.dependencies]
-core-foundation = "0.9"
-core-services = "0.2"
-plist = "1.3"
+#core-foundation = "0.9"
+#core-services = "0.2"
+#plist = "1.3"

crates/gpui/Cargo.toml 🔗

@@ -26,6 +26,8 @@ anyhow.workspace = true
 async-task = "4.7"
 backtrace = { version = "0.3", optional = true }
 bitflags = "2.4.0"
+blade-graphics = "0.3"
+blade-macros = "0.2"
 collections = { path = "../collections" }
 ctor.workspace = true
 derive_more.workspace = true

crates/gpui/build.rs 🔗

@@ -6,12 +6,12 @@ use std::{
 use cbindgen::Config;
 
 fn main() {
-    generate_dispatch_bindings();
+    //generate_dispatch_bindings();
     let header_path = generate_shader_bindings();
-    #[cfg(feature = "runtime_shaders")]
-    emit_stitched_shaders(&header_path);
-    #[cfg(not(feature = "runtime_shaders"))]
-    compile_metal_shaders(&header_path);
+    //#[cfg(feature = "runtime_shaders")]
+    //emit_stitched_shaders(&header_path);
+    //#[cfg(not(feature = "runtime_shaders"))]
+    //compile_metal_shaders(&header_path);
 }
 
 fn generate_dispatch_bindings() {

crates/gpui/src/gpui.rs 🔗

@@ -6,8 +6,7 @@
 //! ## Getting Started
 //!
 //! GPUI is still in active development as we work on the Zed code editor and isn't yet on crates.io.
-//! You'll also need to use the latest version of stable rust and be on macOS. Add the following to your
-//! Cargo.toml:
+//! You'll also need to use the latest version of stable rust. Add the following to your Cargo.toml:
 //!
 //! ```
 //! gpui = { git = "https://github.com/zed-industries/zed" }

rust-toolchain.toml 🔗

@@ -2,4 +2,4 @@
 channel = "1.75"
 profile = "minimal"
 components = [ "rustfmt", "clippy" ]
-targets = [ "x86_64-apple-darwin", "aarch64-apple-darwin", "wasm32-wasi" ]
+targets = [ "x86_64-apple-darwin", "aarch64-apple-darwin", "x86_64-linux-gnu", "wasm32-wasi" ]