6 Commits

Author SHA1 Message Date
cuddle-please
098e34915c chore(release): 0.0.4
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
2025-07-22 20:18:31 +00:00
9fb20eb5d4 feat: add readme
All checks were successful
continuous-integration/drone/push Build is passing
2025-07-22 22:17:17 +02:00
ca0eaa2492 chore(release): v0.0.3 (#3)
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
chore(release): 0.0.3

Co-authored-by: cuddle-please <bot@cuddle.sh>
Reviewed-on: https://git.front.kjuulh.io/kjuulh/drop-queue/pulls/3
2025-07-22 22:15:38 +02:00
0c33863c1d feat: rename
All checks were successful
continuous-integration/drone/push Build is passing
2025-07-22 22:12:40 +02:00
58647725f9 chore(release): v0.0.2 (#2)
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
chore(release): 0.0.2

Co-authored-by: cuddle-please <bot@cuddle.sh>
Reviewed-on: https://git.front.kjuulh.io/kjuulh/nodrop/pulls/2
2025-07-22 22:09:29 +02:00
b0fe26597c docs: use public packages
All checks were successful
continuous-integration/drone/push Build is passing
2025-07-22 22:08:45 +02:00
7 changed files with 42 additions and 26 deletions

View File

@@ -6,6 +6,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased] ## [Unreleased]
## [0.0.4] - 2025-07-22
### Added
- add readme
## [0.0.3] - 2025-07-22
### Added
- rename
## [0.0.2] - 2025-07-22
### Docs
- use public packages
## [0.0.1] - 2025-07-22 ## [0.0.1] - 2025-07-22
### Added ### Added

24
Cargo.lock generated
View File

@@ -73,6 +73,18 @@ version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268" checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268"
[[package]]
name = "drop-queue"
version = "0.0.3"
dependencies = [
"anyhow",
"async-trait",
"notmad",
"tokio",
"tokio-util",
"tracing",
]
[[package]] [[package]]
name = "futures" name = "futures"
version = "0.3.31" version = "0.3.31"
@@ -239,18 +251,6 @@ dependencies = [
"windows-sys 0.59.0", "windows-sys 0.59.0",
] ]
[[package]]
name = "nodrop"
version = "0.1.0"
dependencies = [
"anyhow",
"async-trait",
"notmad",
"tokio",
"tokio-util",
"tracing",
]
[[package]] [[package]]
name = "notmad" name = "notmad"
version = "0.7.2" version = "0.7.2"

View File

@@ -3,10 +3,10 @@ members = ["crates/*"]
resolver = "2" resolver = "2"
[workspace.package] [workspace.package]
version = "0.0.1" version = "0.0.4"
[workspace.dependencies] [workspace.dependencies]
nodrop = { path = "crates/nodrop" } drop-queue = { path = "crates/drop-queue" }
anyhow = { version = "1" } anyhow = { version = "1" }
tokio = { version = "1", features = ["full"] } tokio = { version = "1", features = ["full"] }

View File

@@ -1,6 +1,6 @@
# 🧊 nodrop # 🧊 drop-queue
**`nodrop`** is a simple, composable async drop queue for Rust — built to run queued tasks in FIFO order and ensure graceful shutdown via draining. It's useful in lifecycle-managed environments (e.g., `notmad`) or as a lightweight alternative until async drop is stabilized in Rust. **`drop-queue`** is a simple, composable async drop queue for Rust — built to run queued tasks in FIFO order and ensure graceful shutdown via draining. It's useful in lifecycle-managed environments (e.g., `notmad`) or as a lightweight alternative until async drop is stabilized in Rust.
> 💡 Tasks are executed one at a time. If the queue is marked for draining, no further items can be added. > 💡 Tasks are executed one at a time. If the queue is marked for draining, no further items can be added.
@@ -22,14 +22,14 @@
```toml ```toml
[dependencies] [dependencies]
nodrop = { git = "https://github.com/kjuulh/nodrop" } drop-queue = "*"
``` ```
### Enable `notmad` integration (optional) ### Enable `notmad` integration (optional)
```toml ```toml
[dependencies] [dependencies]
nodrop = { git = "https://github.com/kjuulh/nodrop", features = ["notmad"] } drop-queue = { version = "*", features = ["notmad"] }
``` ```
--- ---
@@ -37,7 +37,7 @@ nodrop = { git = "https://github.com/kjuulh/nodrop", features = ["notmad"] }
## 🛠 Example ## 🛠 Example
```rust ```rust
use nodrop::DropQueue; use drop-queue::DropQueue;
use tokio::sync::oneshot; use tokio::sync::oneshot;
#[tokio::main] #[tokio::main]
@@ -69,7 +69,7 @@ If using the [`notmad`](https://crates.io/crates/notmad) lifecycle framework:
```rust ```rust
#[tokio::main] #[tokio::main]
async fn main() -> anyhow::Result<()> { async fn main() -> anyhow::Result<()> {
let queue = nodrop::DropQueue::new(); let queue = drop-queue::DropQueue::new();
let app = notmad::Mad::new().add(queue); let app = notmad::Mad::new().add(queue);
app.run().await?; app.run().await?;
Ok(()) Ok(())

View File

@@ -1,10 +1,11 @@
[package] [package]
name = "nodrop" name = "drop-queue"
edition = "2024" edition = "2024"
description = "nodrop, is a simple drop queue system for async operations. (Until async-drop is a thing)" description = "drop-queue, is a simple drop queue system for async operations. (Until async-drop is a thing)"
license = "MIT" license = "MIT"
repository = "https://github.com/kjuulh/nodrop" repository = "https://github.com/kjuulh/drop-queue"
authors = ["kjuulh <contact@kasperhermansen.com>"] authors = ["kjuulh <contact@kasperhermansen.com>"]
readme = "./../../README.md"
version.workspace = true version.workspace = true

View File

@@ -160,7 +160,7 @@ mod notmad {
#[async_trait] #[async_trait]
impl notmad::Component for DropQueue { impl notmad::Component for DropQueue {
fn name(&self) -> Option<String> { fn name(&self) -> Option<String> {
Some("nodrop/drop-queue".into()) Some("drop-queue/drop-queue".into())
} }
async fn run(&self, cancellation_token: CancellationToken) -> Result<(), MadError> { async fn run(&self, cancellation_token: CancellationToken) -> Result<(), MadError> {

View File

@@ -3,13 +3,13 @@
base: "git@git.front.kjuulh.io:kjuulh/cuddle-rust-lib-plan.git" base: "git@git.front.kjuulh.io:kjuulh/cuddle-rust-lib-plan.git"
vars: vars:
service: "nodrop" service: "drop-queue"
registry: kasperhermansen registry: kasperhermansen
please: please:
project: project:
owner: kjuulh owner: kjuulh
repository: "nodrop" repository: "drop-queue"
branch: main branch: main
settings: settings:
api_url: "https://git.front.kjuulh.io" api_url: "https://git.front.kjuulh.io"