{flake.lock,Cargo.*}: bump
Build and test / check (push) Successful in 1m12s
Build and test / build (push) Successful in 1m40s
Build and test / test (push) Successful in 2m12s
Build and test / docs (push) Successful in 6m20s

This commit is contained in:
2026-07-20 17:29:29 +09:00
parent 3297d145b4
commit a89deefceb
9 changed files with 295 additions and 207 deletions
+1 -1
View File
@@ -174,7 +174,7 @@ async fn main() -> anyhow::Result<()> {
return Ok(());
}
let mut conn = zlink::unix::connect("/run/roowho2/roowho2.varlink")
let mut conn = zlink::tokio::unix::connect("/run/roowho2/roowho2.varlink")
.await
.expect("Failed to connect to fingerd server");
+1 -1
View File
@@ -166,7 +166,7 @@ async fn client_server(
let std_socket =
unsafe { std::os::unix::net::UnixListener::from_raw_fd(socket_fd.as_raw_fd()) };
std_socket.set_nonblocking(true)?;
let zlink_listener = zlink::unix::Listener::try_from(OwnedFd::from(std_socket))?;
let zlink_listener = zlink::tokio::unix::Listener::try_from(OwnedFd::from(std_socket))?;
let client_server_task = varlink_client_server_task(
zlink_listener,
whod_status_store,
+1 -1
View File
@@ -65,7 +65,7 @@ async fn main() -> anyhow::Result<()> {
return Ok(());
}
let mut conn = zlink::unix::connect("/run/roowho2/roowho2.varlink")
let mut conn = zlink::tokio::unix::connect("/run/roowho2/roowho2.varlink")
.await
.expect("Failed to connect to rwhod server");
+1 -1
View File
@@ -45,7 +45,7 @@ async fn main() -> anyhow::Result<()> {
return Ok(());
}
let mut conn = zlink::unix::connect("/run/roowho2/roowho2.varlink")
let mut conn = zlink::tokio::unix::connect("/run/roowho2/roowho2.varlink")
.await
.expect("Failed to connect to rwhod server");
+6 -1
View File
@@ -205,7 +205,12 @@ impl Whod {
let mut wd_we = array::from_fn(|_| Whoent::zeroed());
for (byte_chunk, whoent) in bytes.chunks_exact(Whoent::SIZE).zip(wd_we.iter_mut()) {
for (byte_chunk, whoent) in bytes
.as_chunks::<{ Whoent::SIZE }>()
.0
.iter()
.zip(wd_we.iter_mut())
{
let mut chunk_bytes = bytes::Bytes::copy_from_slice(byte_chunk);
let mut out_line = [0u8; Outmp::MAX_TTY_NAME_LEN];
+16 -7
View File
@@ -1,10 +1,15 @@
use std::{os::fd::OwnedFd, time::Duration};
use anyhow::Context;
use futures_util::stream;
use itertools::Itertools;
use serde::{Deserialize, Serialize};
use tokio::time::timeout;
use zlink::{ReplyError, service::MethodReply};
use zlink::{
ReplyError,
service::MethodReply,
tokio::unix::{Listener as UnixListener, Stream as UnixStream},
};
use crate::{
proto::{WhodStatusUpdate, WhodUserEntry, finger_protocol::FingerResponseUserEntry},
@@ -260,18 +265,22 @@ impl VarlinkRoowhoo2ClientServer {
}
}
impl zlink::Service<zlink::unix::Stream> for VarlinkRoowhoo2ClientServer {
impl zlink::Service<UnixStream> for VarlinkRoowhoo2ClientServer {
type MethodCall<'de> = VarlinkMethod;
type ReplyParams<'se> = VarlinkReply;
type ReplyStreamParams = ();
type ReplyStream = futures_util::stream::Empty<(zlink::Reply<()>, Vec<OwnedFd>)>;
type ReplyError<'se> = VarlinkReplyError;
type ReplyStreamParams = ();
type ReplyStream = stream::Empty<(
Result<zlink::Reply<Self::ReplyStreamParams>, Self::ReplyStreamError>,
Vec<OwnedFd>,
)>;
type ReplyStreamError = ();
async fn handle<'service>(
&'service mut self,
call: &'service zlink::Call<Self::MethodCall<'_>>,
_conn: &mut zlink::Connection<zlink::unix::Stream>,
_fds: Vec<std::os::fd::OwnedFd>,
_conn: &mut zlink::Connection<UnixStream>,
_fds: Vec<OwnedFd>,
) -> zlink::service::HandleResult<
Self::ReplyParams<'service>,
Self::ReplyStream,
@@ -398,7 +407,7 @@ impl zlink::Service<zlink::unix::Stream> for VarlinkRoowhoo2ClientServer {
}
pub async fn varlink_client_server_task(
socket: zlink::unix::Listener,
socket: UnixListener,
whod_status_store: RwhodStatusStore,
rwhod_enabled: bool,
fingerd_enabled: bool,