diff --git a/CHANGELOG b/CHANGELOG index c83d657..001f6f7 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,7 @@ +Changes in v0.10.7: + * Feature: Support of notify-styled watchdogs. + * Few minor bug fixes. + Changes in v0.10.6: * BREAKING: Extensions now uses the registering connection, rather than listen to a new UNIX socket and let the daemon connect. * BREAKING: Service sideloading is now a part of the supervisor cache system. diff --git a/SECURITY.md b/SECURITY.md index 7b4fc4b..3aea6cf 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -2,8 +2,8 @@ ## Supported Versions The `HEAD` and the latest release are supported by the Airup developers. The maintained versions are: - - Mainline: `0.10.6` - - Stable: `0.10.6` + - Mainline: `0.10.7` + - Stable: `0.10.7` ## Reporting a Vulnerability Please [contact @sisungo](mailto:sisungo@icloud.com) to report a vulnerability. diff --git a/airup-sdk/Cargo.toml b/airup-sdk/Cargo.toml index 83bfa71..af409f1 100644 --- a/airup-sdk/Cargo.toml +++ b/airup-sdk/Cargo.toml @@ -4,7 +4,7 @@ authors = ["sisungo "] description = "SDK library of Airup" documentation = "https://docs.rs/airup-sdk" repository = "https://github.com/sisungo/airup" -version = "0.10.6" +version = "0.10.7" edition = "2021" license = "MIT" diff --git a/airup-sdk/src/lib.rs b/airup-sdk/src/lib.rs index 0d470ac..bf3c4ba 100644 --- a/airup-sdk/src/lib.rs +++ b/airup-sdk/src/lib.rs @@ -1,5 +1,5 @@ //! # The Airup SDK -//! The Airup SDK provides interface to deal with Airup elements, for example, interacting with the daemon, `airupd`. +//! The Airup SDK provides interface to access Airup facilities, for example, interacting with the daemon, `airupd`. pub mod build; pub mod debug; diff --git a/airup/Cargo.toml b/airup/Cargo.toml index 5279f94..5d5a736 100644 --- a/airup/Cargo.toml +++ b/airup/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "airup" authors = ["sisungo "] -version = "0.10.6" +version = "0.10.7" edition = "2021" license = "MIT" publish = false diff --git a/airup/src/main.rs b/airup/src/main.rs index aa8a9b2..7476da3 100644 --- a/airup/src/main.rs +++ b/airup/src/main.rs @@ -1,4 +1,4 @@ -//! # Airup CLI +//! Command-line utility for accessing Airup facilities. mod daemon; mod debug; diff --git a/airupd/Cargo.toml b/airupd/Cargo.toml index 3c4b140..4585dbe 100644 --- a/airupd/Cargo.toml +++ b/airupd/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "airupd" authors = ["sisungo "] -version = "0.10.6" +version = "0.10.7" edition = "2021" license = "MIT" publish = false diff --git a/airupd/src/app.rs b/airupd/src/app.rs index b914109..2a1d889 100644 --- a/airupd/src/app.rs +++ b/airupd/src/app.rs @@ -26,8 +26,8 @@ pub struct Airupd { /// The extension manager. pub extensions: extension::Extensions, - /// The IPC context. - pub ipc: rpc::Context, + /// The RPC context. + pub rpc: rpc::Context, /// The lifetime manager of the `airupd` process. pub lifetime: lifetime::System, @@ -76,7 +76,7 @@ impl Airupd { }); _ = signal::signal(SIGHUP, |_| async { - self.ipc.reload(); + self.rpc.reload(); }); } @@ -107,7 +107,7 @@ pub async fn init() { let object = Airupd { storage: storage::Storage::new().await, extensions: extension::Extensions::new(), - ipc: rpc::Context::new(), + rpc: rpc::Context::new(), lifetime: lifetime::System::new(), milestones: milestones::Manager::new(), supervisors: supervisor::Manager::new(), diff --git a/airupd/src/main.rs b/airupd/src/main.rs index 5f55fb8..4a527d5 100644 --- a/airupd/src/main.rs +++ b/airupd/src/main.rs @@ -1,4 +1,4 @@ -//! # airupd +//! The Airup daemon. mod ace; mod app; diff --git a/airupd/src/rpc/mod.rs b/airupd/src/rpc/mod.rs index 340b870..88e844b 100644 --- a/airupd/src/rpc/mod.rs +++ b/airupd/src/rpc/mod.rs @@ -32,7 +32,7 @@ impl Default for Context { } } -/// Represents to an IPC server. +/// Represents to an RPC server. #[derive(Debug)] pub struct Server { path: PathBuf, @@ -72,7 +72,7 @@ impl Server { /// Runs the server in place. async fn run(&mut self) { - let mut reload = airupd().ipc.reload.subscribe(); + let mut reload = airupd().rpc.reload.subscribe(); loop { tokio::select! { @@ -120,7 +120,7 @@ impl Session { .rpc_invoke(Request::new::<&str, ciborium::Value, _>(method, req.params)) .await } - None => airupd().ipc.api.invoke(req).await, + None => airupd().rpc.api.invoke(req).await, }; self.conn.send(&resp).await?; } diff --git a/airupfx/airupfx-extensions/src/lib.rs b/airupfx/airupfx-extensions/src/lib.rs index cc42845..d517e57 100644 --- a/airupfx/airupfx-extensions/src/lib.rs +++ b/airupfx/airupfx-extensions/src/lib.rs @@ -1,5 +1,5 @@ //! # AirupFX Extension Framework -//! This crate provides a high-level framework for writing Airup extensions in Rust easily. +//! This crate provides a high-level framework for writing Airup extensions in async Rust easily. use airup_sdk::{ info::ConnectionExt, diff --git a/airupfx/airupfx-io/src/lib.rs b/airupfx/airupfx-io/src/lib.rs index f504fc3..baafaff 100644 --- a/airupfx/airupfx-io/src/lib.rs +++ b/airupfx/airupfx-io/src/lib.rs @@ -1,3 +1,5 @@ +//! IO toolkit. + pub mod line_piper; pub use line_piper::LinePiper; diff --git a/airupfx/airupfx-io/src/line_piper.rs b/airupfx/airupfx-io/src/line_piper.rs index 86bfc95..60c802b 100644 --- a/airupfx/airupfx-io/src/line_piper.rs +++ b/airupfx/airupfx-io/src/line_piper.rs @@ -1,3 +1,5 @@ +//! A cancel-safe solution for reading lines from a stream. + use std::{future::Future, pin::Pin}; use tokio::{ io::{AsyncRead, AsyncReadExt}, @@ -40,8 +42,11 @@ impl Drop for LinePiper { } /// Sets up a line piper and sets a callback for it. The line piper is automatically closed when stream `reader` reached EOF. -pub fn set_callback(reader: impl AsyncRead + Unpin + Send + 'static, callback: Box) { - LinePiperEntity::new(reader, callback).start(); +pub fn set_callback( + reader: impl AsyncRead + Unpin + Send + 'static, + callback: Box, +) -> JoinHandle<()> { + LinePiperEntity::new(reader, callback).start() } struct LinePiperEntity { diff --git a/airupfx/airupfx-isolator/src/fallback.rs b/airupfx/airupfx-isolator/src/fallback.rs index 0c31e38..ebad5ab 100644 --- a/airupfx/airupfx-isolator/src/fallback.rs +++ b/airupfx/airupfx-isolator/src/fallback.rs @@ -1,3 +1,7 @@ +//! A fallback isolator implementation that does no-op for all operations. +//! +//! This is useful for compatibility with operating systems that support no isolators. + #[derive(Debug)] pub struct Realm; impl Realm { diff --git a/airupfx/airupfx-isolator/src/lib.rs b/airupfx/airupfx-isolator/src/lib.rs index 1195f44..f3fa689 100644 --- a/airupfx/airupfx-isolator/src/lib.rs +++ b/airupfx/airupfx-isolator/src/lib.rs @@ -1,3 +1,5 @@ +//! Utilities for handling resource isolation. + cfg_if::cfg_if! { if #[cfg(all(target_os = "linux", feature = "cgroups"))] { #[path = "linux.rs"] diff --git a/airupfx/airupfx-process/src/unix.rs b/airupfx/airupfx-process/src/unix.rs index e01e6ab..240895a 100644 --- a/airupfx/airupfx-process/src/unix.rs +++ b/airupfx/airupfx-process/src/unix.rs @@ -115,7 +115,7 @@ impl ExitStatusExt for ExitStatus { macro_rules! map_stdio { ($fx:expr, $std:expr) => { match &$fx { - Stdio::Callback(c) => line_piper::set_callback($std, c.clone_boxed()), + Stdio::Callback(c) => _ = line_piper::set_callback($std, c.clone_boxed()), _ => (), } }; diff --git a/extensions/fallback-logger/src/main.rs b/extensions/fallback-logger/src/main.rs index fb5df8e..170d2c4 100644 --- a/extensions/fallback-logger/src/main.rs +++ b/extensions/fallback-logger/src/main.rs @@ -1,7 +1,7 @@ //! A simple logger for fallback use. //! -//! This has some limitations and has poor performance. Being designed as an "fallback choice", the implementation aims to be -//! small. +//! This has some limitations and has poor performance. Being designed as a "fallback choice", the implementation aims to be +//! small and simple. use airup_sdk::{blocking::fs::DirChain, system::LogRecord, Error}; use airupfx::extensions::*;