From 550d70644148e5dd28eb0f073188d0dfb9b4ccfe Mon Sep 17 00:00:00 2001 From: squidfunk Date: Mon, 23 Mar 2026 13:53:25 +0100 Subject: [PATCH] chore: release v0.0.15 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary This version introduces **Specificity** — an ordering and tie-breaking concept for selectors and expressions that allows our runtime to determine which module wins when multiple modules compete for a resource. The idea is borrowed from CSS, where more specific selectors take precedence, and adapted here for globs, selectors, and expressions in ZRX. ### Background ZRX uses **selectors** to query and subscribe to resources. Selectors can be combined into **expressions** using `ANY`, `ALL`, and `NOT` operators. Each selector has 6 components, each of which can be a glob pattern: ``` zrs:::::: ``` ### How Specificity works Each component contributes to a 4-tuple `(A, B, C, L)`: - **A** — literal segments (most specific) - **B** — single-wildcard segments (`*`, `?`) - **C** — double-wildcard segments (`**`) - **L** — literal character count (tiebreaker) Tuples are compared lexicographically — higher is more specific. Expressions combine specificities according to their operator: `ALL` sums them (constraints stack), `ANY` takes the minimum (only as specific as the broadest arm), and `NOT` contributes nothing (it filters, but doesn't select). ### Examples ```sh zrs:{git,file}:::{docs}:index.md: # (3, 0, 0, 15) zrs::::docs:{index,about}.md: # (2, 0, 0, 12) zrs:::::index.{md,rst}: # (1, 0, 0, 8) zrs:::::{*}: # (0, 1, 0, 0) ``` This is an early alpha — documentation on using specificity in the router and other modules will follow. This release includes the core implementation for selectors and expressions. Signed-off-by: squidfunk --- Cargo.lock | 10 +++++----- Cargo.toml | 8 ++++---- crates/zrx-graph/Cargo.toml | 2 +- crates/zrx-id/Cargo.toml | 2 +- crates/zrx-scheduler/Cargo.toml | 2 +- crates/zrx-stream/Cargo.toml | 2 +- crates/zrx/Cargo.toml | 2 +- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 64d4aa7..4893ba0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -344,7 +344,7 @@ dependencies = [ [[package]] name = "zrx" -version = "0.0.14" +version = "0.0.15" dependencies = [ "zrx-diagnostic", "zrx-executor", @@ -370,7 +370,7 @@ dependencies = [ [[package]] name = "zrx-graph" -version = "0.0.9" +version = "0.0.10" dependencies = [ "ahash", "thiserror", @@ -378,7 +378,7 @@ dependencies = [ [[package]] name = "zrx-id" -version = "0.0.10" +version = "0.0.11" dependencies = [ "ahash", "globset", @@ -394,7 +394,7 @@ version = "0.0.1" [[package]] name = "zrx-scheduler" -version = "0.0.11" +version = "0.0.12" dependencies = [ "ahash", "crossbeam", @@ -418,7 +418,7 @@ dependencies = [ [[package]] name = "zrx-stream" -version = "0.0.11" +version = "0.0.12" dependencies = [ "ahash", "thiserror", diff --git a/Cargo.toml b/Cargo.toml index 0c5bc3c..9bd1b8d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,12 +41,12 @@ pedantic = { level = "warn", priority = -1 } zrx-diagnostic = { version = "0.0.1", path = "crates/zrx-diagnostic" } zrx-event = { version = "0.0.1", path = "crates/zrx-event" } zrx-executor = { version = "0.0.3", path = "crates/zrx-executor" } -zrx-graph = { version = "0.0.9", path = "crates/zrx-graph" } -zrx-id = { version = "0.0.10", path = "crates/zrx-id" } +zrx-graph = { version = "0.0.10", path = "crates/zrx-graph" } +zrx-id = { version = "0.0.11", path = "crates/zrx-id" } zrx-path = { version = "0.0.1", path = "crates/zrx-path" } -zrx-scheduler = { version = "0.0.11", path = "crates/zrx-scheduler" } +zrx-scheduler = { version = "0.0.12", path = "crates/zrx-scheduler" } zrx-store = { version = "0.0.6", path = "crates/zrx-store" } -zrx-stream = { version = "0.0.11", path = "crates/zrx-stream" } +zrx-stream = { version = "0.0.12", path = "crates/zrx-stream" } ahash = "0.8.12" crossbeam = "0.8.4" diff --git a/crates/zrx-graph/Cargo.toml b/crates/zrx-graph/Cargo.toml index b39cf1b..bba7bc6 100644 --- a/crates/zrx-graph/Cargo.toml +++ b/crates/zrx-graph/Cargo.toml @@ -23,7 +23,7 @@ [package] name = "zrx-graph" -version = "0.0.9" +version = "0.0.10" description = "Graph construction and traversal utilities" edition.workspace = true rust-version.workspace = true diff --git a/crates/zrx-id/Cargo.toml b/crates/zrx-id/Cargo.toml index f9c772e..db24a72 100644 --- a/crates/zrx-id/Cargo.toml +++ b/crates/zrx-id/Cargo.toml @@ -23,7 +23,7 @@ [package] name = "zrx-id" -version = "0.0.10" +version = "0.0.11" description = "Identifier abstractions and utilities" edition.workspace = true rust-version.workspace = true diff --git a/crates/zrx-scheduler/Cargo.toml b/crates/zrx-scheduler/Cargo.toml index 43fdb03..30c8b99 100644 --- a/crates/zrx-scheduler/Cargo.toml +++ b/crates/zrx-scheduler/Cargo.toml @@ -23,7 +23,7 @@ [package] name = "zrx-scheduler" -version = "0.0.11" +version = "0.0.12" description = "Scheduler for workflow execution" edition.workspace = true rust-version.workspace = true diff --git a/crates/zrx-stream/Cargo.toml b/crates/zrx-stream/Cargo.toml index 226c378..c8a5a7d 100644 --- a/crates/zrx-stream/Cargo.toml +++ b/crates/zrx-stream/Cargo.toml @@ -23,7 +23,7 @@ [package] name = "zrx-stream" -version = "0.0.11" +version = "0.0.12" description = "Stream interface" edition.workspace = true rust-version.workspace = true diff --git a/crates/zrx/Cargo.toml b/crates/zrx/Cargo.toml index d628e6f..2ff9931 100644 --- a/crates/zrx/Cargo.toml +++ b/crates/zrx/Cargo.toml @@ -23,7 +23,7 @@ [package] name = "zrx" -version = "0.0.14" +version = "0.0.15" description = "Zen Reactive Extensions" edition.workspace = true rust-version.workspace = true