Add a crate for spawning tokio tasks in Zed (#23857)

Part of https://github.com/zed-industries/zed/pull/21092

As we're already depending on and using `tokio` to run `reqwest`, I've
added a crate to make running tokio futures more convenient. This should
unblock the Bedrock Cloud Model provider PR.

Note that since the `gpui_tokio` code is nearly trivial glue and I
expect that it will be useful for the nascent GPUI ecosystem, I've
elected to license it under Apache 2, like GPUI itself, instead of our
normal GPL license for Zed code.

Release Notes:

- N/A
This commit is contained in:
Mikayla Maki
2025-01-29 20:53:16 +00:00
committed by GitHub
parent ee0d2a8d94
commit bd21334013
9 changed files with 116 additions and 17 deletions
Generated
+11
View File
@@ -5491,6 +5491,15 @@ dependencies = [
"syn 1.0.109",
]
[[package]]
name = "gpui_tokio"
version = "0.1.0"
dependencies = [
"gpui",
"tokio",
"util",
]
[[package]]
name = "grid"
version = "0.13.0"
@@ -10746,6 +10755,7 @@ dependencies = [
"git",
"git_hosting_providers",
"gpui",
"gpui_tokio",
"http_client",
"language",
"language_extension",
@@ -16439,6 +16449,7 @@ dependencies = [
"git_ui",
"go_to_line",
"gpui",
"gpui_tokio",
"http_client",
"image_viewer",
"inline_completion_button",