Rename greet_proto to greetd_ipc, Cargo.toml updates
This commit is contained in:
28
Cargo.lock
generated
28
Cargo.lock
generated
@@ -5,7 +5,7 @@ name = "agreety"
|
||||
version = "0.5.0"
|
||||
dependencies = [
|
||||
"getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"greet_proto 0.5.0",
|
||||
"greetd_ipc 0.5.0",
|
||||
"nix 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rpassword 4.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rust-ini 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@@ -160,18 +160,6 @@ dependencies = [
|
||||
"unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "greet_proto"
|
||||
version = "0.5.0"
|
||||
dependencies = [
|
||||
"async-trait 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_json 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"thiserror 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tokio 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "greetd"
|
||||
version = "0.5.0"
|
||||
@@ -179,7 +167,7 @@ dependencies = [
|
||||
"async-trait 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"greet_proto 0.5.0",
|
||||
"greetd_ipc 0.5.0",
|
||||
"libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"nix 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pam-sys 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@@ -191,6 +179,18 @@ dependencies = [
|
||||
"users 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "greetd_ipc"
|
||||
version = "0.5.0"
|
||||
dependencies = [
|
||||
"async-trait 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_json 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"thiserror 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tokio 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "iovec"
|
||||
version = "0.1.4"
|
||||
|
@@ -7,4 +7,4 @@ panic = "abort"
|
||||
opt-level = 'z'
|
||||
|
||||
[workspace]
|
||||
members = ["greet_proto", "greetd", "agreety"]
|
||||
members = ["greetd_ipc", "greetd", "agreety"]
|
||||
|
@@ -1,11 +1,14 @@
|
||||
[package]
|
||||
name = "agreety"
|
||||
version = "0.5.0"
|
||||
authors = ["Kenny Levinsen <kl@kl.wtf>"]
|
||||
authors = ["Kenny Levinsen"]
|
||||
edition = "2018"
|
||||
license = "GPL-3.0"
|
||||
homepage = "https://kl.wtf/projects/agreety"
|
||||
repository = "https://git.sr.ht/~kennylevinsen/greetd/"
|
||||
|
||||
[dependencies]
|
||||
greet_proto = { path = "../greet_proto", features = ["sync-codec"]}
|
||||
greetd_ipc = { path = "../greetd_ipc", features = ["sync-codec"]}
|
||||
rust-ini = "0.14"
|
||||
rpassword = "4.0"
|
||||
getopts = "0.2"
|
||||
|
@@ -9,7 +9,7 @@ use ini::Ini;
|
||||
use nix::sys::utsname::uname;
|
||||
use rpassword::prompt_password_stderr;
|
||||
|
||||
use greet_proto::{codec::SyncCodec, AuthMessageType, ErrorType, Request, Response};
|
||||
use greetd_ipc::{codec::SyncCodec, AuthMessageType, ErrorType, Request, Response};
|
||||
|
||||
fn prompt_stderr(prompt: &str) -> Result<String, Box<dyn std::error::Error>> {
|
||||
let stdin = io::stdin();
|
||||
|
@@ -1,8 +1,11 @@
|
||||
[package]
|
||||
name = "greetd"
|
||||
version = "0.5.0"
|
||||
authors = ["Kenny Levinsen <kl@kl.wtf>"]
|
||||
authors = ["Kenny Levinsen"]
|
||||
edition = "2018"
|
||||
license = "GPL-3.0"
|
||||
homepage = "https://kl.wtf/projects/greetd"
|
||||
repository = "https://git.sr.ht/~kennylevinsen/greetd/"
|
||||
|
||||
[dependencies]
|
||||
nix = "0.16"
|
||||
@@ -11,7 +14,7 @@ users = "0.9.1"
|
||||
toml = "0.5"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
greet_proto = { path = "../greet_proto", features = ["tokio-codec"] }
|
||||
greetd_ipc = { path = "../greetd_ipc", features = ["tokio-codec"] }
|
||||
libc = "0.2"
|
||||
futures = "0.3"
|
||||
tokio = { version = "0.2", features = ["net", "sync", "macros", "signal", "rt-util", "io-util", "time"] }
|
||||
|
@@ -13,7 +13,7 @@ use crate::{
|
||||
worker::AuthMessageType as SessAuthMessageType,
|
||||
},
|
||||
};
|
||||
use greet_proto::AuthMessageType;
|
||||
use greetd_ipc::AuthMessageType;
|
||||
|
||||
struct SessionChildSet {
|
||||
child: SessionChild,
|
||||
|
@@ -39,12 +39,12 @@ impl From<crate::pam::PamError> for Error {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<greet_proto::codec::Error> for Error {
|
||||
fn from(error: greet_proto::codec::Error) -> Self {
|
||||
impl From<greetd_ipc::codec::Error> for Error {
|
||||
fn from(error: greetd_ipc::codec::Error) -> Self {
|
||||
match error {
|
||||
greet_proto::codec::Error::Serialization(s) => Error::ProtocolError(s),
|
||||
greet_proto::codec::Error::Io(s) => Error::Io(s),
|
||||
greet_proto::codec::Error::Eof => Error::Io("EOF".to_string()),
|
||||
greetd_ipc::codec::Error::Serialization(s) => Error::ProtocolError(s),
|
||||
greetd_ipc::codec::Error::Io(s) => Error::Io(s),
|
||||
greetd_ipc::codec::Error::Eof => Error::Io("EOF".to_string()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -13,7 +13,7 @@ use crate::{
|
||||
error::Error,
|
||||
terminal::{self, Terminal},
|
||||
};
|
||||
use greet_proto::{
|
||||
use greetd_ipc::{
|
||||
codec::{Error as CodecError, TokioCodec},
|
||||
ErrorType, Request, Response,
|
||||
};
|
||||
|
@@ -1,8 +1,13 @@
|
||||
[package]
|
||||
name = "greet_proto"
|
||||
name = "greetd_ipc"
|
||||
version = "0.5.0"
|
||||
authors = ["Kenny Levinsen <kl@kl.wtf>"]
|
||||
authors = ["Kenny Levinsen"]
|
||||
edition = "2018"
|
||||
license = "GPL-3.0"
|
||||
homepage = "https://kl.wtf/projects/greetd"
|
||||
repository = "https://git.sr.ht/~kennylevinsen/greetd/"
|
||||
description = "An implementation of the greetd IPC protocol"
|
||||
keywords = ["greetd"]
|
||||
|
||||
[features]
|
||||
codec = ["thiserror"]
|
@@ -1,6 +1,6 @@
|
||||
//! # `greetd` protocol library
|
||||
//! # `greetd` IPC protocol library
|
||||
//!
|
||||
//! This library implements the greetd wire protocol.
|
||||
//! This library implements the [greetd](https://git.sr.ht/~kennylevinsen/greetd) IPC protocol.
|
||||
//!
|
||||
//! The library exposes a [Request](enum.Request.html) and a
|
||||
//! [Response](enum.Response.html) enum, representing the valid protocol
|
Reference in New Issue
Block a user