Rename zrpc to rpc
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
This commit is contained in:
parent
fdfed3d7db
commit
d5b60ad124
26 changed files with 62 additions and 66 deletions
56
Cargo.lock
generated
56
Cargo.lock
generated
|
@ -754,6 +754,7 @@ dependencies = [
|
||||||
"log",
|
"log",
|
||||||
"parking_lot",
|
"parking_lot",
|
||||||
"rand 0.8.3",
|
"rand 0.8.3",
|
||||||
|
"rpc",
|
||||||
"seahash",
|
"seahash",
|
||||||
"serde 1.0.125",
|
"serde 1.0.125",
|
||||||
"similar",
|
"similar",
|
||||||
|
@ -762,7 +763,6 @@ dependencies = [
|
||||||
"tree-sitter",
|
"tree-sitter",
|
||||||
"tree-sitter-rust",
|
"tree-sitter-rust",
|
||||||
"unindent",
|
"unindent",
|
||||||
"zrpc",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -1025,8 +1025,8 @@ dependencies = [
|
||||||
name = "clock"
|
name = "clock"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"rpc",
|
||||||
"smallvec",
|
"smallvec",
|
||||||
"zrpc",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -4087,6 +4087,28 @@ dependencies = [
|
||||||
"xmlparser",
|
"xmlparser",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "rpc"
|
||||||
|
version = "0.1.0"
|
||||||
|
dependencies = [
|
||||||
|
"anyhow",
|
||||||
|
"async-lock",
|
||||||
|
"async-tungstenite",
|
||||||
|
"base64 0.13.0",
|
||||||
|
"futures",
|
||||||
|
"log",
|
||||||
|
"parking_lot",
|
||||||
|
"postage",
|
||||||
|
"prost",
|
||||||
|
"prost-build",
|
||||||
|
"rand 0.8.3",
|
||||||
|
"rsa",
|
||||||
|
"serde 1.0.125",
|
||||||
|
"smol",
|
||||||
|
"tempdir",
|
||||||
|
"zstd",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rpc_client"
|
name = "rpc_client"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
|
@ -4100,12 +4122,12 @@ dependencies = [
|
||||||
"parking_lot",
|
"parking_lot",
|
||||||
"postage",
|
"postage",
|
||||||
"rand 0.8.3",
|
"rand 0.8.3",
|
||||||
|
"rpc",
|
||||||
"smol",
|
"smol",
|
||||||
"surf",
|
"surf",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
"tiny_http",
|
"tiny_http",
|
||||||
"util",
|
"util",
|
||||||
"zrpc",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -5949,6 +5971,7 @@ dependencies = [
|
||||||
"parking_lot",
|
"parking_lot",
|
||||||
"postage",
|
"postage",
|
||||||
"rand 0.8.3",
|
"rand 0.8.3",
|
||||||
|
"rpc",
|
||||||
"rpc_client",
|
"rpc_client",
|
||||||
"serde 1.0.125",
|
"serde 1.0.125",
|
||||||
"serde_json 1.0.64",
|
"serde_json 1.0.64",
|
||||||
|
@ -5957,7 +5980,6 @@ dependencies = [
|
||||||
"tempdir",
|
"tempdir",
|
||||||
"toml 0.5.8",
|
"toml 0.5.8",
|
||||||
"util",
|
"util",
|
||||||
"zrpc",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -6025,6 +6047,7 @@ dependencies = [
|
||||||
"parking_lot",
|
"parking_lot",
|
||||||
"postage",
|
"postage",
|
||||||
"rand 0.8.3",
|
"rand 0.8.3",
|
||||||
|
"rpc",
|
||||||
"rpc_client",
|
"rpc_client",
|
||||||
"rsa",
|
"rsa",
|
||||||
"rust-embed",
|
"rust-embed",
|
||||||
|
@ -6047,7 +6070,6 @@ dependencies = [
|
||||||
"url",
|
"url",
|
||||||
"util",
|
"util",
|
||||||
"worktree",
|
"worktree",
|
||||||
"zrpc",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -6076,6 +6098,7 @@ dependencies = [
|
||||||
"parking_lot",
|
"parking_lot",
|
||||||
"postage",
|
"postage",
|
||||||
"rand 0.8.3",
|
"rand 0.8.3",
|
||||||
|
"rpc",
|
||||||
"rust-embed",
|
"rust-embed",
|
||||||
"scrypt",
|
"scrypt",
|
||||||
"serde 1.0.125",
|
"serde 1.0.125",
|
||||||
|
@ -6088,7 +6111,6 @@ dependencies = [
|
||||||
"time 0.2.25",
|
"time 0.2.25",
|
||||||
"toml 0.5.8",
|
"toml 0.5.8",
|
||||||
"zed",
|
"zed",
|
||||||
"zrpc",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -6112,28 +6134,6 @@ dependencies = [
|
||||||
"synstructure",
|
"synstructure",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "zrpc"
|
|
||||||
version = "0.1.0"
|
|
||||||
dependencies = [
|
|
||||||
"anyhow",
|
|
||||||
"async-lock",
|
|
||||||
"async-tungstenite",
|
|
||||||
"base64 0.13.0",
|
|
||||||
"futures",
|
|
||||||
"log",
|
|
||||||
"parking_lot",
|
|
||||||
"postage",
|
|
||||||
"prost",
|
|
||||||
"prost-build",
|
|
||||||
"rand 0.8.3",
|
|
||||||
"rsa",
|
|
||||||
"serde 1.0.125",
|
|
||||||
"smol",
|
|
||||||
"tempdir",
|
|
||||||
"zstd",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "zstd"
|
name = "zstd"
|
||||||
version = "0.9.0+zstd.1.5.0"
|
version = "0.9.0+zstd.1.5.0"
|
||||||
|
|
|
@ -21,7 +21,7 @@ similar = "1.3"
|
||||||
smallvec = { version = "1.6", features = ["union"] }
|
smallvec = { version = "1.6", features = ["union"] }
|
||||||
sum_tree = { path = "../sum_tree" }
|
sum_tree = { path = "../sum_tree" }
|
||||||
tree-sitter = "0.19.5"
|
tree-sitter = "0.19.5"
|
||||||
zrpc = { path = "../zrpc" }
|
rpc = { path = "../rpc" }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
rand = "0.8.3"
|
rand = "0.8.3"
|
||||||
|
|
|
@ -43,7 +43,7 @@ use std::{
|
||||||
use sum_tree::{self, Bias, FilterCursor, SumTree};
|
use sum_tree::{self, Bias, FilterCursor, SumTree};
|
||||||
pub use syntax_theme::SyntaxTheme;
|
pub use syntax_theme::SyntaxTheme;
|
||||||
use tree_sitter::{InputEdit, Parser, QueryCursor};
|
use tree_sitter::{InputEdit, Parser, QueryCursor};
|
||||||
use zrpc::proto;
|
use rpc::proto;
|
||||||
|
|
||||||
pub trait File {
|
pub trait File {
|
||||||
fn worktree_id(&self) -> usize;
|
fn worktree_id(&self) -> usize;
|
||||||
|
|
|
@ -5,4 +5,4 @@ edition = "2018"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
smallvec = { version = "1.6", features = ["union"] }
|
smallvec = { version = "1.6", features = ["union"] }
|
||||||
zrpc = { path = "../zrpc" }
|
rpc = { path = "../rpc" }
|
||||||
|
|
|
@ -61,8 +61,8 @@ impl<'a> AddAssign<&'a Local> for Local {
|
||||||
#[derive(Clone, Default, Hash, Eq, PartialEq)]
|
#[derive(Clone, Default, Hash, Eq, PartialEq)]
|
||||||
pub struct Global(SmallVec<[Local; 3]>);
|
pub struct Global(SmallVec<[Local; 3]>);
|
||||||
|
|
||||||
impl From<Vec<zrpc::proto::VectorClockEntry>> for Global {
|
impl From<Vec<rpc::proto::VectorClockEntry>> for Global {
|
||||||
fn from(message: Vec<zrpc::proto::VectorClockEntry>) -> Self {
|
fn from(message: Vec<rpc::proto::VectorClockEntry>) -> Self {
|
||||||
let mut version = Self::new();
|
let mut version = Self::new();
|
||||||
for entry in message {
|
for entry in message {
|
||||||
version.observe(Local {
|
version.observe(Local {
|
||||||
|
@ -74,11 +74,11 @@ impl From<Vec<zrpc::proto::VectorClockEntry>> for Global {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> From<&'a Global> for Vec<zrpc::proto::VectorClockEntry> {
|
impl<'a> From<&'a Global> for Vec<rpc::proto::VectorClockEntry> {
|
||||||
fn from(version: &'a Global) -> Self {
|
fn from(version: &'a Global) -> Self {
|
||||||
version
|
version
|
||||||
.iter()
|
.iter()
|
||||||
.map(|entry| zrpc::proto::VectorClockEntry {
|
.map(|entry| rpc::proto::VectorClockEntry {
|
||||||
replica_id: entry.replica_id as u32,
|
replica_id: entry.replica_id as u32,
|
||||||
timestamp: entry.value,
|
timestamp: entry.value,
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
[package]
|
[package]
|
||||||
description = "Shared logic for communication between the Zed app and the zed.dev server"
|
description = "Shared logic for communication between the Zed app and the zed.dev server"
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
name = "zrpc"
|
name = "rpc"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
|
|
||||||
[features]
|
[features]
|
|
@ -21,4 +21,4 @@ surf = "2.2"
|
||||||
thiserror = "1.0.29"
|
thiserror = "1.0.29"
|
||||||
tiny_http = "0.8"
|
tiny_http = "0.8"
|
||||||
util = { path = "../util" }
|
util = { path = "../util" }
|
||||||
zrpc = { path = "../zrpc" }
|
rpc = { path = "../rpc" }
|
||||||
|
|
|
@ -12,6 +12,7 @@ use lazy_static::lazy_static;
|
||||||
use parking_lot::RwLock;
|
use parking_lot::RwLock;
|
||||||
use postage::{prelude::Stream, watch};
|
use postage::{prelude::Stream, watch};
|
||||||
use rand::prelude::*;
|
use rand::prelude::*;
|
||||||
|
use rpc::proto::{AnyTypedEnvelope, EntityMessage, EnvelopedMessage, RequestMessage};
|
||||||
use std::{
|
use std::{
|
||||||
any::TypeId,
|
any::TypeId,
|
||||||
collections::HashMap,
|
collections::HashMap,
|
||||||
|
@ -24,11 +25,8 @@ use std::{
|
||||||
use surf::Url;
|
use surf::Url;
|
||||||
use thiserror::Error;
|
use thiserror::Error;
|
||||||
use util::ResultExt;
|
use util::ResultExt;
|
||||||
pub use zrpc::{proto, ConnectionId, PeerId, TypedEnvelope};
|
|
||||||
use zrpc::{
|
pub use rpc::*;
|
||||||
proto::{AnyTypedEnvelope, EntityMessage, EnvelopedMessage, RequestMessage},
|
|
||||||
Connection, Peer, Receipt,
|
|
||||||
};
|
|
||||||
|
|
||||||
lazy_static! {
|
lazy_static! {
|
||||||
static ref ZED_SERVER_URL: String =
|
static ref ZED_SERVER_URL: String =
|
||||||
|
@ -506,7 +504,7 @@ impl Client {
|
||||||
"Authorization",
|
"Authorization",
|
||||||
format!("{} {}", credentials.user_id, credentials.access_token),
|
format!("{} {}", credentials.user_id, credentials.access_token),
|
||||||
)
|
)
|
||||||
.header("X-Zed-Protocol-Version", zrpc::PROTOCOL_VERSION);
|
.header("X-Zed-Protocol-Version", rpc::PROTOCOL_VERSION);
|
||||||
cx.background().spawn(async move {
|
cx.background().spawn(async move {
|
||||||
if let Some(host) = ZED_SERVER_URL.strip_prefix("https://") {
|
if let Some(host) = ZED_SERVER_URL.strip_prefix("https://") {
|
||||||
let stream = smol::net::TcpStream::connect(host).await?;
|
let stream = smol::net::TcpStream::connect(host).await?;
|
||||||
|
@ -536,7 +534,7 @@ impl Client {
|
||||||
// zed server to encrypt the user's access token, so that it can'be intercepted by
|
// zed server to encrypt the user's access token, so that it can'be intercepted by
|
||||||
// any other app running on the user's device.
|
// any other app running on the user's device.
|
||||||
let (public_key, private_key) =
|
let (public_key, private_key) =
|
||||||
zrpc::auth::keypair().expect("failed to generate keypair for auth");
|
rpc::auth::keypair().expect("failed to generate keypair for auth");
|
||||||
let public_key_string =
|
let public_key_string =
|
||||||
String::try_from(public_key).expect("failed to serialize public key for auth");
|
String::try_from(public_key).expect("failed to serialize public key for auth");
|
||||||
|
|
||||||
|
|
|
@ -5,11 +5,11 @@ use super::Client;
|
||||||
use gpui::TestAppContext;
|
use gpui::TestAppContext;
|
||||||
use parking_lot::Mutex;
|
use parking_lot::Mutex;
|
||||||
use postage::{mpsc, prelude::Stream};
|
use postage::{mpsc, prelude::Stream};
|
||||||
|
use rpc::{proto, ConnectionId, Peer, Receipt, TypedEnvelope};
|
||||||
use std::sync::{
|
use std::sync::{
|
||||||
atomic::{AtomicBool, AtomicUsize},
|
atomic::{AtomicBool, AtomicUsize},
|
||||||
Arc,
|
Arc,
|
||||||
};
|
};
|
||||||
use zrpc::{proto, ConnectionId, Peer, Receipt, TypedEnvelope};
|
|
||||||
|
|
||||||
pub struct FakeServer {
|
pub struct FakeServer {
|
||||||
peer: Arc<Peer>,
|
peer: Arc<Peer>,
|
||||||
|
|
|
@ -41,7 +41,7 @@ tide = "0.16.0"
|
||||||
tide-compress = "0.9.0"
|
tide-compress = "0.9.0"
|
||||||
time = "0.2"
|
time = "0.2"
|
||||||
toml = "0.5.8"
|
toml = "0.5.8"
|
||||||
zrpc = { path = "../zrpc" }
|
rpc = { path = "../rpc" }
|
||||||
|
|
||||||
[dependencies.async-sqlx-session]
|
[dependencies.async-sqlx-session]
|
||||||
version = "0.3.0"
|
version = "0.3.0"
|
||||||
|
|
|
@ -19,7 +19,7 @@ use serde::{Deserialize, Serialize};
|
||||||
use std::{borrow::Cow, convert::TryFrom, sync::Arc};
|
use std::{borrow::Cow, convert::TryFrom, sync::Arc};
|
||||||
use surf::{StatusCode, Url};
|
use surf::{StatusCode, Url};
|
||||||
use tide::{log, Error, Server};
|
use tide::{log, Error, Server};
|
||||||
use zrpc::auth as zed_auth;
|
use rpc::auth as zed_auth;
|
||||||
|
|
||||||
static CURRENT_GITHUB_USER: &'static str = "current_github_user";
|
static CURRENT_GITHUB_USER: &'static str = "current_github_user";
|
||||||
static GITHUB_AUTH_URL: &'static str = "https://github.com/login/oauth/authorize";
|
static GITHUB_AUTH_URL: &'static str = "https://github.com/login/oauth/authorize";
|
||||||
|
|
|
@ -26,7 +26,7 @@ use std::sync::Arc;
|
||||||
use surf::http::cookies::SameSite;
|
use surf::http::cookies::SameSite;
|
||||||
use tide::{log, sessions::SessionMiddleware};
|
use tide::{log, sessions::SessionMiddleware};
|
||||||
use tide_compress::CompressMiddleware;
|
use tide_compress::CompressMiddleware;
|
||||||
use zrpc::Peer;
|
use rpc::Peer;
|
||||||
|
|
||||||
type Request = tide::Request<Arc<AppState>>;
|
type Request = tide::Request<Arc<AppState>>;
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ use tide::{
|
||||||
Request, Response,
|
Request, Response,
|
||||||
};
|
};
|
||||||
use time::OffsetDateTime;
|
use time::OffsetDateTime;
|
||||||
use zrpc::{
|
use rpc::{
|
||||||
proto::{self, AnyTypedEnvelope, EnvelopedMessage},
|
proto::{self, AnyTypedEnvelope, EnvelopedMessage},
|
||||||
Connection, ConnectionId, Peer, TypedEnvelope,
|
Connection, ConnectionId, Peer, TypedEnvelope,
|
||||||
};
|
};
|
||||||
|
@ -897,7 +897,7 @@ pub fn add_routes(app: &mut tide::Server<Arc<AppState>>, rpc: &Arc<Peer>) {
|
||||||
.header("X-Zed-Protocol-Version")
|
.header("X-Zed-Protocol-Version")
|
||||||
.and_then(|v| v.as_str().parse().ok());
|
.and_then(|v| v.as_str().parse().ok());
|
||||||
|
|
||||||
if !upgrade_requested || client_protocol_version != Some(zrpc::PROTOCOL_VERSION) {
|
if !upgrade_requested || client_protocol_version != Some(rpc::PROTOCOL_VERSION) {
|
||||||
return Ok(Response::new(StatusCode::UpgradeRequired));
|
return Ok(Response::new(StatusCode::UpgradeRequired));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -988,7 +988,7 @@ mod tests {
|
||||||
workspace::Workspace,
|
workspace::Workspace,
|
||||||
worktree::Worktree,
|
worktree::Worktree,
|
||||||
};
|
};
|
||||||
use zrpc::Peer;
|
use rpc::Peer;
|
||||||
|
|
||||||
#[gpui::test]
|
#[gpui::test]
|
||||||
async fn test_share_worktree(mut cx_a: TestAppContext, mut cx_b: TestAppContext) {
|
async fn test_share_worktree(mut cx_a: TestAppContext, mut cx_b: TestAppContext) {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
use crate::db::{ChannelId, UserId};
|
use crate::db::{ChannelId, UserId};
|
||||||
use anyhow::anyhow;
|
use anyhow::anyhow;
|
||||||
use std::collections::{hash_map, HashMap, HashSet};
|
use std::collections::{hash_map, HashMap, HashSet};
|
||||||
use zrpc::{proto, ConnectionId};
|
use rpc::{proto, ConnectionId};
|
||||||
|
|
||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
pub struct Store {
|
pub struct Store {
|
||||||
|
|
|
@ -28,11 +28,11 @@ smol = "1.2.5"
|
||||||
sum_tree = { path = "../sum_tree" }
|
sum_tree = { path = "../sum_tree" }
|
||||||
util = { path = "../util" }
|
util = { path = "../util" }
|
||||||
toml = "0.5"
|
toml = "0.5"
|
||||||
zrpc = { path = "../zrpc" }
|
rpc = { path = "../rpc" }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
rand = "0.8.3"
|
rand = "0.8.3"
|
||||||
rpc_client = { path = "../rpc_client", features = ["test-support"] }
|
rpc_client = { path = "../rpc_client", features = ["test-support"] }
|
||||||
tempdir = { version = "0.3.7" }
|
tempdir = { version = "0.3.7" }
|
||||||
util = { path = "../util", features = ["test-support"] }
|
util = { path = "../util", features = ["test-support"] }
|
||||||
zrpc = { path = "../zrpc", features = ["test-support"] }
|
rpc = { path = "../rpc", features = ["test-support"] }
|
||||||
|
|
|
@ -19,7 +19,7 @@ use postage::{
|
||||||
prelude::{Sink as _, Stream as _},
|
prelude::{Sink as _, Stream as _},
|
||||||
watch,
|
watch,
|
||||||
};
|
};
|
||||||
use rpc_client as rpc;
|
use rpc_client::{self as rpc, proto, PeerId, TypedEnvelope};
|
||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
use smol::channel::{self, Sender};
|
use smol::channel::{self, Sender};
|
||||||
use std::{
|
use std::{
|
||||||
|
@ -41,7 +41,6 @@ use std::{
|
||||||
use sum_tree::Bias;
|
use sum_tree::Bias;
|
||||||
use sum_tree::{self, Edit, SeekTarget, SumTree};
|
use sum_tree::{self, Edit, SeekTarget, SumTree};
|
||||||
use util::TryFutureExt;
|
use util::TryFutureExt;
|
||||||
use zrpc::{proto, PeerId, TypedEnvelope};
|
|
||||||
|
|
||||||
lazy_static! {
|
lazy_static! {
|
||||||
static ref GITIGNORE: &'static OsStr = OsStr::new(".gitignore");
|
static ref GITIGNORE: &'static OsStr = OsStr::new(".gitignore");
|
||||||
|
|
|
@ -20,7 +20,7 @@ test-support = [
|
||||||
"rpc_client/test-support",
|
"rpc_client/test-support",
|
||||||
"tempdir",
|
"tempdir",
|
||||||
"worktree/test-support",
|
"worktree/test-support",
|
||||||
"zrpc/test-support",
|
"rpc/test-support",
|
||||||
]
|
]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
@ -71,7 +71,7 @@ tree-sitter-rust = "0.19.0"
|
||||||
url = "2.2"
|
url = "2.2"
|
||||||
util = { path = "../util" }
|
util = { path = "../util" }
|
||||||
worktree = { path = "../worktree" }
|
worktree = { path = "../worktree" }
|
||||||
zrpc = { path = "../zrpc" }
|
rpc = { path = "../rpc" }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
cargo-bundle = "0.5.0"
|
cargo-bundle = "0.5.0"
|
||||||
|
@ -84,7 +84,7 @@ gpui = { path = "../gpui", features = ["test-support"] }
|
||||||
rpc_client = { path = "../rpc_client", features = ["test-support"] }
|
rpc_client = { path = "../rpc_client", features = ["test-support"] }
|
||||||
util = { path = "../util", features = ["test-support"] }
|
util = { path = "../util", features = ["test-support"] }
|
||||||
worktree = { path = "../worktree", features = ["test-support"] }
|
worktree = { path = "../worktree", features = ["test-support"] }
|
||||||
zrpc = { path = "../zrpc", features = ["test-support"] }
|
rpc = { path = "../rpc", features = ["test-support"] }
|
||||||
|
|
||||||
[package.metadata.bundle]
|
[package.metadata.bundle]
|
||||||
icon = ["app-icon@2x.png", "app-icon.png"]
|
icon = ["app-icon@2x.png", "app-icon.png"]
|
||||||
|
|
|
@ -5,7 +5,11 @@ use gpui::{
|
||||||
};
|
};
|
||||||
use postage::prelude::Stream;
|
use postage::prelude::Stream;
|
||||||
use rand::prelude::*;
|
use rand::prelude::*;
|
||||||
use rpc_client as rpc;
|
use rpc_client::{
|
||||||
|
self as rpc,
|
||||||
|
proto::{self, ChannelMessageSent},
|
||||||
|
TypedEnvelope,
|
||||||
|
};
|
||||||
use std::{
|
use std::{
|
||||||
collections::{HashMap, HashSet},
|
collections::{HashMap, HashSet},
|
||||||
mem,
|
mem,
|
||||||
|
@ -15,10 +19,6 @@ use std::{
|
||||||
use sum_tree::{self, Bias, SumTree};
|
use sum_tree::{self, Bias, SumTree};
|
||||||
use time::OffsetDateTime;
|
use time::OffsetDateTime;
|
||||||
use util::{post_inc, TryFutureExt};
|
use util::{post_inc, TryFutureExt};
|
||||||
use zrpc::{
|
|
||||||
proto::{self, ChannelMessageSent},
|
|
||||||
TypedEnvelope,
|
|
||||||
};
|
|
||||||
|
|
||||||
pub struct ChannelList {
|
pub struct ChannelList {
|
||||||
available_channels: Option<Vec<ChannelDetails>>,
|
available_channels: Option<Vec<ChannelDetails>>,
|
||||||
|
|
|
@ -3,13 +3,12 @@ use anyhow::{anyhow, Context, Result};
|
||||||
use futures::future;
|
use futures::future;
|
||||||
use gpui::{AsyncAppContext, Entity, ImageData, ModelContext, ModelHandle, Task};
|
use gpui::{AsyncAppContext, Entity, ImageData, ModelContext, ModelHandle, Task};
|
||||||
use postage::{prelude::Stream, sink::Sink, watch};
|
use postage::{prelude::Stream, sink::Sink, watch};
|
||||||
use rpc_client as rpc;
|
use rpc_client::{self as rpc, proto, TypedEnvelope};
|
||||||
use std::{
|
use std::{
|
||||||
collections::{HashMap, HashSet},
|
collections::{HashMap, HashSet},
|
||||||
sync::Arc,
|
sync::Arc,
|
||||||
};
|
};
|
||||||
use util::TryFutureExt as _;
|
use util::TryFutureExt as _;
|
||||||
use zrpc::{proto, TypedEnvelope};
|
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct User {
|
pub struct User {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue