You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iggy.apache.org by hg...@apache.org on 2026/08/21 10:03:13 UTC
(iggy) 01/01: ci(rust): fail the build on rustdoc and rustc warnings
This is an automated email from the ASF dual-hosted git repository.
hubcio pushed a commit to branch ci/doctest-deny-warnings
in repository https://gitbox.apache.org/repos/asf/iggy.git
commit 9d32af9c8f886d6eabdaaa702ff3e9e315765a0e
Author: Hubert Gruszecki <h....@gmail.com>
AuthorDate: Wed Aug 19 14:02:37 2026 +0200
ci(rust): fail the build on rustdoc and rustc warnings
Two classes of warning were accumulating unseen. The doctest
leg ran cargo doc with no gate and stayed green through 69
rustdoc diagnostics across 20 crates; broken intra-doc links
are the costly ones, since they render as plain text and the
docs quietly lose their navigation. Separately, the clippy
leg denies warnings but runs with --all-features while the
test legs build at default features, so a warning that only
shows up when a feature is off was invisible - that is how
four dead_code findings in the integration test binary sat
in CI output.
RUSTDOCFLAGS closes the first and is cache-safe: it enters
the fingerprint of doc units only, never lib or bin units.
For the second the Cargo lints table beat RUSTFLAGS=-D
warnings. RUSTFLAGS enters the fingerprint of every unit
including registry dependencies, so it forces a full rebuild
of the dep tree and would have to be mirrored into
coverage-baseline, the sole writer of the shared cargo
cache. Measured both ways here: the lints table rebuilt 50
workspace crates and zero registry crates.
Eleven crates keep a local [lints.rust] block because cargo
refuses to merge an inherited table with the [lints.clippy]
they already carry. That makes their nursery = "warn"
effectively deny, since rustc resolves the warnings group at
emission time and catches anything left at warn whatever the
flag order. CI behaviour is unchanged: the clippy leg
already appended -D warnings.
Most rustdoc fixes drop the link brackets where the target
is private and rustdoc has nothing to point at under
--no-deps. Widening visibility to satisfy a doc comment is
backwards, and --document-private-items would publish the
internals of every crate.
The dead ci-qemu feature goes with it; nothing has
referenced it since the monorepo restructure in 8db64db94.
---
.github/actions/rust/pre-merge/action.yml | 2 ++
Cargo.toml | 3 +++
bdd/rust/Cargo.toml | 3 +++
core/ai/mcp/Cargo.toml | 3 +++
core/bench/Cargo.toml | 3 +++
core/bench/dashboard/frontend/Cargo.toml | 3 +++
core/bench/dashboard/server/Cargo.toml | 3 +++
core/bench/dashboard/shared/Cargo.toml | 3 +++
core/bench/report/Cargo.toml | 3 +++
core/bench/runner/Cargo.toml | 3 +++
core/binary_protocol/Cargo.toml | 3 +++
core/cli/Cargo.toml | 3 +++
core/cli/src/args/context.rs | 2 +-
core/clock/Cargo.toml | 3 +++
core/common/Cargo.toml | 3 +++
core/common/src/types/options/mod.rs | 12 ++++++------
core/common/src/wire_conversions.rs | 4 ++--
core/configs/Cargo.toml | 3 +++
core/configs/src/server_config/cluster.rs | 2 +-
core/configs/src/server_config/server.rs | 4 ++--
core/configs_derive/Cargo.toml | 3 +++
core/configs_derive/src/lib.rs | 4 ++--
core/connectors/runtime/Cargo.toml | 3 +++
.../configs/connectors/http_provider/response_extractor.rs | 2 +-
core/connectors/sdk/Cargo.toml | 3 +++
core/connectors/sinks/clickhouse_sink/Cargo.toml | 3 +++
core/connectors/sinks/delta_sink/Cargo.toml | 3 +++
core/connectors/sinks/doris_sink/Cargo.toml | 3 +++
core/connectors/sinks/elasticsearch_sink/Cargo.toml | 3 +++
core/connectors/sinks/http_sink/Cargo.toml | 3 +++
core/connectors/sinks/http_sink/src/lib.rs | 2 +-
core/connectors/sinks/iceberg_sink/Cargo.toml | 3 +++
core/connectors/sinks/influxdb_sink/Cargo.toml | 3 +++
core/connectors/sinks/meilisearch_sink/Cargo.toml | 3 +++
core/connectors/sinks/mongodb_sink/Cargo.toml | 3 +++
core/connectors/sinks/postgres_sink/Cargo.toml | 3 +++
core/connectors/sinks/quickwit_sink/Cargo.toml | 3 +++
core/connectors/sinks/s3_sink/Cargo.toml | 3 +++
core/connectors/sinks/stdout_sink/Cargo.toml | 3 +++
core/connectors/sinks/surrealdb_sink/Cargo.toml | 3 +++
core/connectors/sources/elasticsearch_source/Cargo.toml | 3 +++
core/connectors/sources/influxdb_source/Cargo.toml | 3 +++
core/connectors/sources/postgres_source/Cargo.toml | 3 +++
core/connectors/sources/random_source/Cargo.toml | 3 +++
core/consensus/Cargo.toml | 3 +++
core/consensus/src/client_table.rs | 4 ++--
core/consensus/src/dvc_merge.rs | 2 +-
core/consensus/src/impls.rs | 4 ++--
core/consensus/src/vsr_state.rs | 2 +-
core/cpu_allocation/Cargo.toml | 3 +++
core/harness_derive/Cargo.toml | 3 +++
core/integration/Cargo.toml | 6 +++---
core/integration/src/harness/config/resolve.rs | 2 +-
.../tests/cli/context/test_context_create_command.rs | 2 +-
core/journal/Cargo.toml | 3 +++
core/journal/src/prepare_journal.rs | 2 +-
core/message_bus/Cargo.toml | 3 +++
core/message_bus/src/lib.rs | 2 +-
core/message_bus/src/lifecycle/connection_registry.rs | 2 +-
core/message_bus/src/replica/handshake.rs | 2 +-
core/message_bus/src/transports/quic.rs | 2 +-
core/metadata/Cargo.toml | 3 +++
core/metadata/src/impls/metadata.rs | 4 ++--
core/metadata/src/stm/authz.rs | 6 +++---
core/metadata/src/stm/mod.rs | 8 ++++----
core/metadata/src/stm/stream.rs | 2 +-
core/partitions/Cargo.toml | 3 +++
core/partitions/src/iggy_index_reader.rs | 6 +++---
core/partitions/src/iggy_partition.rs | 6 +++---
core/partitions/src/state_transfer.rs | 4 ++--
core/sdk/Cargo.toml | 3 +++
core/server/Cargo.toml | 3 +++
core/server/src/bootstrap.rs | 2 +-
core/server/src/partition_reconciler.rs | 2 +-
core/server/src/responses.rs | 2 +-
core/server/src/users.rs | 2 +-
core/server_common/Cargo.toml | 3 +++
core/shard/Cargo.toml | 3 +++
core/shard/src/lib.rs | 10 +++++-----
core/shard_allocator/Cargo.toml | 3 +++
core/simulator/Cargo.toml | 3 +++
core/simulator/src/bus.rs | 2 +-
core/simulator/src/deps.rs | 6 +++---
core/simulator/src/network.rs | 2 +-
core/simulator/src/workload/mod.rs | 2 +-
core/simulator/src/workload/ops/mod.rs | 2 +-
core/simulator/src/workload/shadow.rs | 2 +-
core/system_stats/Cargo.toml | 3 +++
core/tools/Cargo.toml | 3 +++
examples/rust/Cargo.toml | 3 +++
90 files changed, 222 insertions(+), 67 deletions(-)
diff --git a/.github/actions/rust/pre-merge/action.yml b/.github/actions/rust/pre-merge/action.yml
index e2d2d3c30..2018cf995 100644
--- a/.github/actions/rust/pre-merge/action.yml
+++ b/.github/actions/rust/pre-merge/action.yml
@@ -180,6 +180,8 @@ runs:
- name: Doc test
if: inputs.task == 'doctest'
+ env:
+ RUSTDOCFLAGS: -D warnings
run: |
cargo test --locked --doc
cargo doc --no-deps --all-features --quiet
diff --git a/Cargo.toml b/Cargo.toml
index eff5c6669..7cefb5fdf 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -75,6 +75,9 @@ resolver = "3"
[workspace.package]
rust-version = "1.95"
+[workspace.lints.rust]
+warnings = "deny"
+
[workspace.dependencies]
actix-cors = "0.7.1"
actix-files = "0.6.10"
diff --git a/bdd/rust/Cargo.toml b/bdd/rust/Cargo.toml
index daf09dd67..d9e60a518 100644
--- a/bdd/rust/Cargo.toml
+++ b/bdd/rust/Cargo.toml
@@ -54,3 +54,6 @@ required-features = ["bdd"]
name = "stream_crud"
harness = false
required-features = ["bdd"]
+
+[lints]
+workspace = true
diff --git a/core/ai/mcp/Cargo.toml b/core/ai/mcp/Cargo.toml
index 10e920b8b..e36c87638 100644
--- a/core/ai/mcp/Cargo.toml
+++ b/core/ai/mcp/Cargo.toml
@@ -65,3 +65,6 @@ tracing-subscriber = { workspace = true }
[dev-dependencies]
tempfile = { workspace = true }
+
+[lints]
+workspace = true
diff --git a/core/bench/Cargo.toml b/core/bench/Cargo.toml
index 922af4da2..cc5807361 100644
--- a/core/bench/Cargo.toml
+++ b/core/bench/Cargo.toml
@@ -60,3 +60,6 @@ uuid = { workspace = true }
enum_glob_use = "deny"
pedantic = "deny"
nursery = "warn"
+
+[lints.rust]
+warnings = "deny"
diff --git a/core/bench/dashboard/frontend/Cargo.toml b/core/bench/dashboard/frontend/Cargo.toml
index c76ae7427..595cec1d0 100644
--- a/core/bench/dashboard/frontend/Cargo.toml
+++ b/core/bench/dashboard/frontend/Cargo.toml
@@ -40,3 +40,6 @@ wasm-bindgen = { workspace = true }
web-sys = { workspace = true }
yew = { workspace = true }
yew-router = { workspace = true }
+
+[lints]
+workspace = true
diff --git a/core/bench/dashboard/server/Cargo.toml b/core/bench/dashboard/server/Cargo.toml
index 82ca242c8..726df33be 100644
--- a/core/bench/dashboard/server/Cargo.toml
+++ b/core/bench/dashboard/server/Cargo.toml
@@ -45,3 +45,6 @@ tracing-subscriber = { workspace = true }
uuid = { workspace = true }
walkdir = { workspace = true }
zip = { workspace = true, features = ["deflate"] }
+
+[lints]
+workspace = true
diff --git a/core/bench/dashboard/shared/Cargo.toml b/core/bench/dashboard/shared/Cargo.toml
index 7f6637db7..779b9c98e 100644
--- a/core/bench/dashboard/shared/Cargo.toml
+++ b/core/bench/dashboard/shared/Cargo.toml
@@ -27,3 +27,6 @@ bench-report = { workspace = true }
human-repr = { workspace = true }
serde = { workspace = true, features = ["derive"] }
uuid = { workspace = true, features = ["serde"] }
+
+[lints]
+workspace = true
diff --git a/core/bench/report/Cargo.toml b/core/bench/report/Cargo.toml
index 88b7dac81..a418cdd25 100644
--- a/core/bench/report/Cargo.toml
+++ b/core/bench/report/Cargo.toml
@@ -37,3 +37,6 @@ sysinfo = { workspace = true }
terminal_size = { workspace = true }
tracing = { workspace = true }
uuid = { workspace = true }
+
+[lints]
+workspace = true
diff --git a/core/bench/runner/Cargo.toml b/core/bench/runner/Cargo.toml
index 0c981113e..eb8062820 100644
--- a/core/bench/runner/Cargo.toml
+++ b/core/bench/runner/Cargo.toml
@@ -35,3 +35,6 @@ tempfile = { workspace = true }
tokio = { workspace = true }
tracing = { workspace = true }
tracing-subscriber = { workspace = true }
+
+[lints]
+workspace = true
diff --git a/core/binary_protocol/Cargo.toml b/core/binary_protocol/Cargo.toml
index 09fee0dd4..4cb4325d9 100644
--- a/core/binary_protocol/Cargo.toml
+++ b/core/binary_protocol/Cargo.toml
@@ -44,3 +44,6 @@ aligned-vec = { workspace = true }
enum_glob_use = "deny"
nursery = "warn"
pedantic = "deny"
+
+[lints.rust]
+warnings = "deny"
diff --git a/core/cli/Cargo.toml b/core/cli/Cargo.toml
index 1f9cb09bb..fbdba38ea 100644
--- a/core/cli/Cargo.toml
+++ b/core/cli/Cargo.toml
@@ -94,3 +94,6 @@ cfg_aliases = { workspace = true }
[dev-dependencies]
tempfile = { workspace = true }
tokio = { workspace = true, features = ["macros", "rt"] }
+
+[lints]
+workspace = true
diff --git a/core/cli/src/args/context.rs b/core/cli/src/args/context.rs
index b87404a1b..99ff0a6ff 100644
--- a/core/cli/src/args/context.rs
+++ b/core/cli/src/args/context.rs
@@ -40,7 +40,7 @@ pub(crate) enum ContextAction {
/// Create a new context
///
/// Creates a new named context in the contexts configuration file.
- /// After creating a context, use 'iggy context use <name>' to activate it.
+ /// After creating a context, use `iggy context use <name>` to activate it.
///
/// Examples
/// iggy context create production --transport tcp --tcp-server-address 10.0.0.1:8090
diff --git a/core/clock/Cargo.toml b/core/clock/Cargo.toml
index b1dc9ebfa..374a27b18 100644
--- a/core/clock/Cargo.toml
+++ b/core/clock/Cargo.toml
@@ -29,3 +29,6 @@ iggy_common = { workspace = true }
enum_glob_use = "deny"
pedantic = "deny"
nursery = "warn"
+
+[lints.rust]
+warnings = "deny"
diff --git a/core/common/Cargo.toml b/core/common/Cargo.toml
index 1bb932893..cdfaa64b3 100644
--- a/core/common/Cargo.toml
+++ b/core/common/Cargo.toml
@@ -59,3 +59,6 @@ twox-hash = { workspace = true }
ulid = { workspace = true }
url = { workspace = true }
uuid = { workspace = true }
+
+[lints]
+workspace = true
diff --git a/core/common/src/types/options/mod.rs b/core/common/src/types/options/mod.rs
index a7ff727f2..44a2eaf9c 100644
--- a/core/common/src/types/options/mod.rs
+++ b/core/common/src/types/options/mod.rs
@@ -213,12 +213,12 @@ pub mod topic_option_keys {
/// Must be non-zero.
pub const MESSAGES_REQUIRED_TO_SAVE: &str = "messages_required_to_save";
/// Flush the journal once it holds this many bytes: `Uint64` or a
- /// byte-size string. Paired with [`Self::MESSAGES_REQUIRED_TO_SAVE`];
+ /// byte-size string. Paired with [`MESSAGES_REQUIRED_TO_SAVE`];
/// whichever threshold trips first flushes.
pub const SIZE_OF_MESSAGES_REQUIRED_TO_SAVE: &str = "size_of_messages_required_to_save";
/// Reserve the segment's bytes up front on a filesystem that supports it:
/// `Bool`, or the strings `true` / `false`. Pairs with
- /// [`Self::SEGMENT_SIZE`] -- preallocation reserves exactly that much, so
+ /// [`SEGMENT_SIZE`] -- preallocation reserves exactly that much, so
/// the two only make sense decided together.
pub const PREALLOCATE_SEGMENTS: &str = "preallocate_segments";
}
@@ -557,7 +557,7 @@ impl StreamUpdateOptions {
///
/// # Errors
///
- /// See [`raw_options_to_wire`].
+ /// See `raw_options_to_wire`.
pub fn to_wire(&self) -> Result<WireOptions, IggyError> {
raw_options_to_wire(&self.raw)
}
@@ -579,7 +579,7 @@ impl UserUpdateOptions {
///
/// # Errors
///
- /// See [`raw_options_to_wire`].
+ /// See `raw_options_to_wire`.
pub fn to_wire(&self) -> Result<WireOptions, IggyError> {
raw_options_to_wire(&self.raw)
}
@@ -658,7 +658,7 @@ impl TopicUpdateOptions {
///
/// # Errors
///
- /// See [`raw_options_map`].
+ /// See `raw_options_map`.
pub fn to_wire(&self) -> Result<WireOptions, IggyError> {
let mut options = raw_options_map(&self.raw)?;
if let Some(compression_algorithm) = self.compression_algorithm {
@@ -875,7 +875,7 @@ impl TopicCreateOptions {
///
/// # Errors
///
- /// See [`raw_options_map`].
+ /// See `raw_options_map`.
pub fn to_option_map(&self) -> Result<ResourceOptions, IggyError> {
let mut options = raw_options_map(&self.raw)?;
if let Some(compression_algorithm) = self.compression_algorithm {
diff --git a/core/common/src/wire_conversions.rs b/core/common/src/wire_conversions.rs
index d87e392a0..80be3e4da 100644
--- a/core/common/src/wire_conversions.rs
+++ b/core/common/src/wire_conversions.rs
@@ -732,7 +732,7 @@ fn topic_permissions_to_wire(topic_id: usize, tp: &TopicPermissions) -> WireTopi
// -- User Headers conversions --
-/// Encode domain user headers into a [`WireUserHeaders`] wrapper.
+/// Encode domain user headers into a [`WireUserHeaders`](iggy_binary_protocol::WireUserHeaders) wrapper.
pub fn user_headers_to_wire(
headers: &BTreeMap<HeaderKey, HeaderValue>,
) -> iggy_binary_protocol::WireUserHeaders {
@@ -762,7 +762,7 @@ pub fn user_headers_to_wire(
WireUserHeaders::from_validated(buf.freeze())
}
-/// Decode a [`WireUserHeaders`] wrapper into domain user headers.
+/// Decode a [`WireUserHeaders`](iggy_binary_protocol::WireUserHeaders) wrapper into domain user headers.
///
/// Wire-level validation accepts unknown kind codes for forward compatibility
/// (VSR rolling upgrades). Domain-level `from_code()` rejects them - the wire
diff --git a/core/configs/Cargo.toml b/core/configs/Cargo.toml
index d195feed8..a1f5d5142 100644
--- a/core/configs/Cargo.toml
+++ b/core/configs/Cargo.toml
@@ -36,3 +36,6 @@ serde_with = { workspace = true }
server_common = { workspace = true }
static-toml = { workspace = true }
tracing = { workspace = true }
+
+[lints]
+workspace = true
diff --git a/core/configs/src/server_config/cluster.rs b/core/configs/src/server_config/cluster.rs
index d71f86ae6..033ea6f77 100644
--- a/core/configs/src/server_config/cluster.rs
+++ b/core/configs/src/server_config/cluster.rs
@@ -616,7 +616,7 @@ pub struct TransportPorts {
///
/// Hostnames follow RFC 1123: ASCII letters, digits and hyphens in labels of
/// 1-63 characters that do not start or end with a hyphen, at most
-/// [`MAX_HOSTNAME_LEN`] characters total, no port and no trailing dot. Names
+/// `MAX_HOSTNAME_LEN` characters total, no port and no trailing dot. Names
/// consisting solely of digits and dots are rejected as malformed IPv4 rather
/// than accepted as hostnames, so `10.0.0.256` fails loudly instead of being
/// handed to DNS. Hostnames normalize to lowercase and IPs to their canonical
diff --git a/core/configs/src/server_config/server.rs b/core/configs/src/server_config/server.rs
index bd7d168b3..e4c6910d0 100644
--- a/core/configs/src/server_config/server.rs
+++ b/core/configs/src/server_config/server.rs
@@ -102,9 +102,9 @@ pub type ServerSystemConfig = SystemConfig<super::sharding::ShardingConfig>;
/// Top-level on-disk config schema for the `iggy-server` binary.
///
-/// Composes the shared section types from [`crate::common`] with the
+/// Composes the shared section types from `crate::common` with the
/// transport, cluster, metadata and [`MessageBusConfig`] sections owned
-/// by [`super`].
+/// by `super`.
#[derive(Debug, Deserialize, Serialize, Clone, ConfigEnv)]
#[config_env(prefix = "IGGY_", name = "iggy-server-config")]
pub struct ServerConfig {
diff --git a/core/configs_derive/Cargo.toml b/core/configs_derive/Cargo.toml
index 6945a7e1d..3555e3f09 100644
--- a/core/configs_derive/Cargo.toml
+++ b/core/configs_derive/Cargo.toml
@@ -30,3 +30,6 @@ darling = { workspace = true }
proc-macro2 = { workspace = true }
quote = { workspace = true }
syn = { workspace = true }
+
+[lints]
+workspace = true
diff --git a/core/configs_derive/src/lib.rs b/core/configs_derive/src/lib.rs
index 1f5c4a48a..457b57f43 100644
--- a/core/configs_derive/src/lib.rs
+++ b/core/configs_derive/src/lib.rs
@@ -33,8 +33,8 @@
//!
//! - **Leaf types** (primitives, String, known value types): generate direct mappings
//! - **Nested types** (structs with `ConfigEnv` derive): include their mappings recursively
-//! - **Vec<T>**: expands to indexed mappings (e.g., `FIELD_0_NAME`, `FIELD_1_NAME`, ...)
-//! - **Arc<T>**, **Box<T>**, **Option<T>**: transparently unwrapped
+//! - **`Vec<T>`**: expands to indexed mappings (e.g., `FIELD_0_NAME`, `FIELD_1_NAME`, ...)
+//! - **`Arc<T>`**, **`Box<T>`**, **`Option<T>`**: transparently unwrapped
mod config_env;
diff --git a/core/connectors/runtime/Cargo.toml b/core/connectors/runtime/Cargo.toml
index dba184d85..d6767edd6 100644
--- a/core/connectors/runtime/Cargo.toml
+++ b/core/connectors/runtime/Cargo.toml
@@ -78,3 +78,6 @@ tracing-subscriber = { workspace = true, features = ["json"] }
[dev-dependencies]
tempfile = { workspace = true }
+
+[lints]
+workspace = true
diff --git a/core/connectors/runtime/src/configs/connectors/http_provider/response_extractor.rs b/core/connectors/runtime/src/configs/connectors/http_provider/response_extractor.rs
index a48e54a03..a5b1cc106 100644
--- a/core/connectors/runtime/src/configs/connectors/http_provider/response_extractor.rs
+++ b/core/connectors/runtime/src/configs/connectors/http_provider/response_extractor.rs
@@ -77,7 +77,7 @@ impl ResponseExtractor {
/// Navigates through a JSON structure using dot-notation path
///
- /// Example: "data.config" navigates to json["data"]["config"]
+ /// Example: `"data.config"` navigates to `json["data"]["config"]`
fn navigate_path<'a>(&self, json: &'a Value, path: &str) -> Option<&'a Value> {
let parts: Vec<&str> = path.split('.').collect();
let mut current = json;
diff --git a/core/connectors/sdk/Cargo.toml b/core/connectors/sdk/Cargo.toml
index 70d191909..fae1b4a0a 100644
--- a/core/connectors/sdk/Cargo.toml
+++ b/core/connectors/sdk/Cargo.toml
@@ -67,3 +67,6 @@ tokio = { workspace = true }
tracing = { workspace = true }
tracing-subscriber = { workspace = true }
uuid = { workspace = true }
+
+[lints]
+workspace = true
diff --git a/core/connectors/sinks/clickhouse_sink/Cargo.toml b/core/connectors/sinks/clickhouse_sink/Cargo.toml
index 5ca6a29cc..07cf33456 100644
--- a/core/connectors/sinks/clickhouse_sink/Cargo.toml
+++ b/core/connectors/sinks/clickhouse_sink/Cargo.toml
@@ -46,3 +46,6 @@ tracing = { workspace = true }
[dev-dependencies]
toml = { workspace = true }
+
+[lints]
+workspace = true
diff --git a/core/connectors/sinks/delta_sink/Cargo.toml b/core/connectors/sinks/delta_sink/Cargo.toml
index 51a2e5419..d96a1e3ee 100644
--- a/core/connectors/sinks/delta_sink/Cargo.toml
+++ b/core/connectors/sinks/delta_sink/Cargo.toml
@@ -47,3 +47,6 @@ serde_json = { workspace = true }
tokio = { workspace = true }
tracing = { workspace = true }
url = { workspace = true }
+
+[lints]
+workspace = true
diff --git a/core/connectors/sinks/doris_sink/Cargo.toml b/core/connectors/sinks/doris_sink/Cargo.toml
index ca031b566..b26dc395c 100644
--- a/core/connectors/sinks/doris_sink/Cargo.toml
+++ b/core/connectors/sinks/doris_sink/Cargo.toml
@@ -49,3 +49,6 @@ tracing = { workspace = true }
[dev-dependencies]
wiremock = { workspace = true }
+
+[lints]
+workspace = true
diff --git a/core/connectors/sinks/elasticsearch_sink/Cargo.toml b/core/connectors/sinks/elasticsearch_sink/Cargo.toml
index 8c83d51be..2c39be883 100644
--- a/core/connectors/sinks/elasticsearch_sink/Cargo.toml
+++ b/core/connectors/sinks/elasticsearch_sink/Cargo.toml
@@ -48,3 +48,6 @@ serde_json = { workspace = true }
simd-json = { workspace = true }
tokio = { workspace = true }
tracing = { workspace = true }
+
+[lints]
+workspace = true
diff --git a/core/connectors/sinks/http_sink/Cargo.toml b/core/connectors/sinks/http_sink/Cargo.toml
index 1ab4fc63f..04e058c44 100644
--- a/core/connectors/sinks/http_sink/Cargo.toml
+++ b/core/connectors/sinks/http_sink/Cargo.toml
@@ -51,3 +51,6 @@ tracing = { workspace = true }
[dev-dependencies]
toml = { workspace = true }
+
+[lints]
+workspace = true
diff --git a/core/connectors/sinks/http_sink/src/lib.rs b/core/connectors/sinks/http_sink/src/lib.rs
index da896b0db..ea97cedf1 100644
--- a/core/connectors/sinks/http_sink/src/lib.rs
+++ b/core/connectors/sinks/http_sink/src/lib.rs
@@ -150,7 +150,7 @@ struct EncodedHeader {
iggy_header_encoding: &'static str,
}
-/// Configuration for the HTTP sink connector, deserialized from [plugin_config] in config.toml.
+/// Configuration for the HTTP sink connector, deserialized from `[plugin_config]` in config.toml.
#[derive(Debug, Serialize, Deserialize)]
pub struct HttpSinkConfig {
/// Target URL for HTTP requests (required).
diff --git a/core/connectors/sinks/iceberg_sink/Cargo.toml b/core/connectors/sinks/iceberg_sink/Cargo.toml
index 1d7f5d362..ec6574214 100644
--- a/core/connectors/sinks/iceberg_sink/Cargo.toml
+++ b/core/connectors/sinks/iceberg_sink/Cargo.toml
@@ -48,3 +48,6 @@ simd-json = { workspace = true }
strum = { workspace = true }
tracing = { workspace = true }
uuid = { workspace = true }
+
+[lints]
+workspace = true
diff --git a/core/connectors/sinks/influxdb_sink/Cargo.toml b/core/connectors/sinks/influxdb_sink/Cargo.toml
index 0b5d56717..1ccf055f2 100644
--- a/core/connectors/sinks/influxdb_sink/Cargo.toml
+++ b/core/connectors/sinks/influxdb_sink/Cargo.toml
@@ -50,3 +50,6 @@ tracing = { workspace = true }
axum = { workspace = true }
simd-json = { workspace = true }
toml = { workspace = true }
+
+[lints]
+workspace = true
diff --git a/core/connectors/sinks/meilisearch_sink/Cargo.toml b/core/connectors/sinks/meilisearch_sink/Cargo.toml
index 6a12ffbad..9ca5339b3 100644
--- a/core/connectors/sinks/meilisearch_sink/Cargo.toml
+++ b/core/connectors/sinks/meilisearch_sink/Cargo.toml
@@ -45,3 +45,6 @@ simd-json = { workspace = true }
tokio = { workspace = true }
tracing = { workspace = true }
url = { workspace = true }
+
+[lints]
+workspace = true
diff --git a/core/connectors/sinks/mongodb_sink/Cargo.toml b/core/connectors/sinks/mongodb_sink/Cargo.toml
index f705c1dc3..d4564dec6 100644
--- a/core/connectors/sinks/mongodb_sink/Cargo.toml
+++ b/core/connectors/sinks/mongodb_sink/Cargo.toml
@@ -43,3 +43,6 @@ serde = { workspace = true }
serde_json = { workspace = true }
tokio = { workspace = true }
tracing = { workspace = true }
+
+[lints]
+workspace = true
diff --git a/core/connectors/sinks/postgres_sink/Cargo.toml b/core/connectors/sinks/postgres_sink/Cargo.toml
index 315cbed70..144ff9d1b 100644
--- a/core/connectors/sinks/postgres_sink/Cargo.toml
+++ b/core/connectors/sinks/postgres_sink/Cargo.toml
@@ -49,3 +49,6 @@ simd-json = { workspace = true }
sqlx = { workspace = true }
tokio = { workspace = true }
tracing = { workspace = true }
+
+[lints]
+workspace = true
diff --git a/core/connectors/sinks/quickwit_sink/Cargo.toml b/core/connectors/sinks/quickwit_sink/Cargo.toml
index b571c6b8c..b9b9fe8f4 100644
--- a/core/connectors/sinks/quickwit_sink/Cargo.toml
+++ b/core/connectors/sinks/quickwit_sink/Cargo.toml
@@ -44,3 +44,6 @@ serde = { workspace = true }
serde_yaml_ng = { workspace = true }
simd-json = { workspace = true }
tracing = { workspace = true }
+
+[lints]
+workspace = true
diff --git a/core/connectors/sinks/s3_sink/Cargo.toml b/core/connectors/sinks/s3_sink/Cargo.toml
index caa128c8e..4ca39a179 100644
--- a/core/connectors/sinks/s3_sink/Cargo.toml
+++ b/core/connectors/sinks/s3_sink/Cargo.toml
@@ -56,3 +56,6 @@ tracing = { workspace = true }
[dev-dependencies]
simd-json = { workspace = true }
+
+[lints]
+workspace = true
diff --git a/core/connectors/sinks/stdout_sink/Cargo.toml b/core/connectors/sinks/stdout_sink/Cargo.toml
index 864e77658..5b1888315 100644
--- a/core/connectors/sinks/stdout_sink/Cargo.toml
+++ b/core/connectors/sinks/stdout_sink/Cargo.toml
@@ -42,3 +42,6 @@ iggy_connector_sdk = { workspace = true }
serde = { workspace = true }
tokio = { workspace = true }
tracing = { workspace = true }
+
+[lints]
+workspace = true
diff --git a/core/connectors/sinks/surrealdb_sink/Cargo.toml b/core/connectors/sinks/surrealdb_sink/Cargo.toml
index 916920710..211a2a7bc 100644
--- a/core/connectors/sinks/surrealdb_sink/Cargo.toml
+++ b/core/connectors/sinks/surrealdb_sink/Cargo.toml
@@ -47,3 +47,6 @@ tracing = { workspace = true }
[dev-dependencies]
simd-json = { workspace = true }
+
+[lints]
+workspace = true
diff --git a/core/connectors/sources/elasticsearch_source/Cargo.toml b/core/connectors/sources/elasticsearch_source/Cargo.toml
index be79d85a0..03c9101b5 100644
--- a/core/connectors/sources/elasticsearch_source/Cargo.toml
+++ b/core/connectors/sources/elasticsearch_source/Cargo.toml
@@ -48,3 +48,6 @@ serde_json = { workspace = true }
simd-json = { workspace = true }
tokio = { workspace = true }
tracing = { workspace = true }
+
+[lints]
+workspace = true
diff --git a/core/connectors/sources/influxdb_source/Cargo.toml b/core/connectors/sources/influxdb_source/Cargo.toml
index 7efb4a804..844e8dbfa 100644
--- a/core/connectors/sources/influxdb_source/Cargo.toml
+++ b/core/connectors/sources/influxdb_source/Cargo.toml
@@ -64,3 +64,6 @@ uuid = { workspace = true }
[dev-dependencies]
axum = { workspace = true }
toml = { workspace = true }
+
+[lints]
+workspace = true
diff --git a/core/connectors/sources/postgres_source/Cargo.toml b/core/connectors/sources/postgres_source/Cargo.toml
index 6999acc0b..0bfb77f65 100644
--- a/core/connectors/sources/postgres_source/Cargo.toml
+++ b/core/connectors/sources/postgres_source/Cargo.toml
@@ -56,3 +56,6 @@ sqlx = { workspace = true }
tokio = { workspace = true }
tracing = { workspace = true }
uuid = { workspace = true }
+
+[lints]
+workspace = true
diff --git a/core/connectors/sources/random_source/Cargo.toml b/core/connectors/sources/random_source/Cargo.toml
index ed18d5479..9616a5fc2 100644
--- a/core/connectors/sources/random_source/Cargo.toml
+++ b/core/connectors/sources/random_source/Cargo.toml
@@ -47,3 +47,6 @@ simd-json = { workspace = true }
tokio = { workspace = true }
tracing = { workspace = true }
uuid = { workspace = true }
+
+[lints]
+workspace = true
diff --git a/core/consensus/Cargo.toml b/core/consensus/Cargo.toml
index 342ce604d..889e6e56b 100644
--- a/core/consensus/Cargo.toml
+++ b/core/consensus/Cargo.toml
@@ -52,3 +52,6 @@ futures = { workspace = true }
enum_glob_use = "deny"
pedantic = "deny"
nursery = "warn"
+
+[lints.rust]
+warnings = "deny"
diff --git a/core/consensus/src/client_table.rs b/core/consensus/src/client_table.rs
index 1294558e4..5d70919c3 100644
--- a/core/consensus/src/client_table.rs
+++ b/core/consensus/src/client_table.rs
@@ -166,7 +166,7 @@ pub struct ClientEntrySnapshot {
pub watermark: u64,
pub watermark_checksum: u128,
/// Wire bytes of the entry's latest committed reply, round-tripped through
- /// [`CachedReply::from_message`]. Never empty: registration seeds the ring.
+ /// `CachedReply::from_message`. Never empty: registration seeds the ring.
///
/// Serialized as a msgpack `bin` blob, not the integer array a plain `Vec<u8>`
/// produces, which spends 2 bytes on every byte >= 0x80 and runs a checkpoint's
@@ -652,7 +652,7 @@ impl ClientTable {
/// previous register reply is dropped), and preserves the watermark -
/// session resume keeps dedup history.
///
- /// Full table evicts the oldest commit, see [`Self::evict_oldest`].
+ /// Full table evicts the oldest commit, see `Self::evict_oldest`.
///
/// # Panics
/// If `client_id == 0` or `client_id != reply.header().client`.
diff --git a/core/consensus/src/dvc_merge.rs b/core/consensus/src/dvc_merge.rs
index 93387dae7..516ef8ff8 100644
--- a/core/consensus/src/dvc_merge.rs
+++ b/core/consensus/src/dvc_merge.rs
@@ -84,7 +84,7 @@ pub struct MergedLog {
/// The new primary installs these over its own log.
pub headers: Vec<PrepareHeader>,
/// Headers non-canonical senders report committed and the canonical chain
- /// corroborates. See [`committed_elsewhere`].
+ /// corroborates. See `committed_elsewhere`.
pub committed_elsewhere: Vec<PrepareHeader>,
}
diff --git a/core/consensus/src/impls.rs b/core/consensus/src/impls.rs
index 3a83c0e2c..2e4741dab 100644
--- a/core/consensus/src/impls.rs
+++ b/core/consensus/src/impls.rs
@@ -1713,7 +1713,7 @@ impl<B: MessageBus, P: Pipeline<Entry = PipelineEntry>> VsrConsensus<B, P> {
/// the head has to either stop it (nothing left to retransmit) or restart it
/// (the next entry becomes the oldest, and it must be timed from now rather
/// than inheriting the drained entry's elapsed ticks). Arming happens in
- /// [`Self::push_prepare_entry`]; between the two the invariant is "ticking
+ /// `Self::push_prepare_entry`; between the two the invariant is "ticking
/// iff the pipeline is non-empty".
pub fn pop_committed_prepare(&self) -> Option<P::Entry> {
let popped = self.pipeline.borrow_mut().pop();
@@ -1804,7 +1804,7 @@ impl<B: MessageBus, P: Pipeline<Entry = PipelineEntry>> VsrConsensus<B, P> {
}
}
- /// Undo the [`Self::push_prepare_entry`] pre-advance for a prepare whose
+ /// Undo the `Self::push_prepare_entry` pre-advance for a prepare whose
/// journal append failed, so the op it claimed is handed back.
///
/// The pre-advance runs the sequencer ahead of the WAL on purpose, so that a
diff --git a/core/consensus/src/vsr_state.rs b/core/consensus/src/vsr_state.rs
index b9e270168..9040906ad 100644
--- a/core/consensus/src/vsr_state.rs
+++ b/core/consensus/src/vsr_state.rs
@@ -177,7 +177,7 @@ fn field<const N: usize>(bytes: &[u8; ENCODED_LEN], start: usize) -> [u8; N] {
/// Failure decoding a [`VsrState`] from bytes.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum VsrStateError {
- /// The byte slice was not exactly [`ENCODED_LEN`] long.
+ /// The byte slice was not exactly `ENCODED_LEN` long.
WrongLength { expected: usize, actual: usize },
/// The record violates `log_view <= view`, so it cannot be a state any replica
/// reached.
diff --git a/core/cpu_allocation/Cargo.toml b/core/cpu_allocation/Cargo.toml
index 24cfb9b17..a248a1aad 100644
--- a/core/cpu_allocation/Cargo.toml
+++ b/core/cpu_allocation/Cargo.toml
@@ -31,3 +31,6 @@ nix = { workspace = true }
[dev-dependencies]
serde_json = { workspace = true }
+
+[lints]
+workspace = true
diff --git a/core/harness_derive/Cargo.toml b/core/harness_derive/Cargo.toml
index 4dcd3f77b..398ba082b 100644
--- a/core/harness_derive/Cargo.toml
+++ b/core/harness_derive/Cargo.toml
@@ -29,3 +29,6 @@ proc-macro = true
proc-macro2 = { workspace = true }
quote = { workspace = true }
syn = { workspace = true }
+
+[lints]
+workspace = true
diff --git a/core/integration/Cargo.toml b/core/integration/Cargo.toml
index bb7bdc51b..a487e3d04 100644
--- a/core/integration/Cargo.toml
+++ b/core/integration/Cargo.toml
@@ -28,10 +28,7 @@ publish = false
[package.metadata.cargo-machete]
ignored = ["cfg_aliases", "rust-s3"]
-# Some tests are failing in CI due to lack of IPv6 interfaces
-# inside the docker containers. This is a temporary workaround (hopefully).
[features]
-ci-qemu = []
default = ["login-session"]
login-session = ["dep:zbus-secret-service-keyring-store"]
@@ -109,3 +106,6 @@ zbus-secret-service-keyring-store = { workspace = true, optional = true }
[build-dependencies]
cfg_aliases = { workspace = true }
+
+[lints]
+workspace = true
diff --git a/core/integration/src/harness/config/resolve.rs b/core/integration/src/harness/config/resolve.rs
index 4f35b8535..fbb536084 100644
--- a/core/integration/src/harness/config/resolve.rs
+++ b/core/integration/src/harness/config/resolve.rs
@@ -119,7 +119,7 @@ fn find_mapping(path: &str) -> Option<&'static EnvVarMapping> {
///
/// Names outside the `IGGY_` prefix are left alone: those address the process
/// environment (`RUST_LOG`, test scaffolding), not the config schema.
-/// [`NON_CONFIG_ENV_VARS`] carries the `IGGY_`-prefixed names the server reads
+/// `NON_CONFIG_ENV_VARS` carries the `IGGY_`-prefixed names the server reads
/// outside the config struct.
///
/// # Errors
diff --git a/core/integration/tests/cli/context/test_context_create_command.rs b/core/integration/tests/cli/context/test_context_create_command.rs
index 2e9dbe45c..64571dd4c 100644
--- a/core/integration/tests/cli/context/test_context_create_command.rs
+++ b/core/integration/tests/cli/context/test_context_create_command.rs
@@ -151,7 +151,7 @@ pub async fn should_help_match() {
r#"Create a new context
Creates a new named context in the contexts configuration file.
-After creating a context, use 'iggy context use <name>' to activate it.
+After creating a context, use `iggy context use <name>` to activate it.
Examples
iggy context create production --transport tcp --tcp-server-address 10.0.0.1:8090
diff --git a/core/journal/Cargo.toml b/core/journal/Cargo.toml
index 0a522f1c7..ed2130f8c 100644
--- a/core/journal/Cargo.toml
+++ b/core/journal/Cargo.toml
@@ -44,3 +44,6 @@ tempfile = { workspace = true }
enum_glob_use = "deny"
pedantic = "deny"
nursery = "warn"
+
+[lints.rust]
+warnings = "deny"
diff --git a/core/journal/src/prepare_journal.rs b/core/journal/src/prepare_journal.rs
index a5f1fde47..4c0f3dc54 100644
--- a/core/journal/src/prepare_journal.rs
+++ b/core/journal/src/prepare_journal.rs
@@ -629,7 +629,7 @@ impl PrepareJournal {
}
/// How many entries the opening scan replayed unverified
- /// ([`CHECKSUM_BODY_UNSEALED`]). `0` once every producer seals; the boot path
+ /// (`CHECKSUM_BODY_UNSEALED`). `0` once every producer seals; the boot path
/// warns while it is not, so the fail-open stretch is visible to an operator.
pub const fn unsealed_entry_count(&self) -> u64 {
self.unsealed_entries
diff --git a/core/message_bus/Cargo.toml b/core/message_bus/Cargo.toml
index a5017d127..f0a4005d4 100644
--- a/core/message_bus/Cargo.toml
+++ b/core/message_bus/Cargo.toml
@@ -62,3 +62,6 @@ tempfile = { workspace = true }
enum_glob_use = "deny"
pedantic = "deny"
nursery = "warn"
+
+[lints.rust]
+warnings = "deny"
diff --git a/core/message_bus/src/lib.rs b/core/message_bus/src/lib.rs
index 414312ad0..f41f50e30 100644
--- a/core/message_bus/src/lib.rs
+++ b/core/message_bus/src/lib.rs
@@ -180,7 +180,7 @@ impl ReplicaOwnerTable {
/// * `compare_exchange(OWNER_NONE -> shard_id)` wins. Common case.
/// * The CAS fails because the slot already stores `shard_id`. A
/// same-shard reclaim during the post-loop clear window
- /// ([`IggyMessageBus::notify_connection_lost`]) is benign: the
+ /// (`IggyMessageBus::notify_connection_lost`) is benign: the
/// slot already names us, and the stale post-loop will stand
/// down once it observes a live registry entry.
///
diff --git a/core/message_bus/src/lifecycle/connection_registry.rs b/core/message_bus/src/lifecycle/connection_registry.rs
index cda45a8ad..0fa89a13b 100644
--- a/core/message_bus/src/lifecycle/connection_registry.rs
+++ b/core/message_bus/src/lifecycle/connection_registry.rs
@@ -155,7 +155,7 @@ impl ReplyTarget {
}
}
-/// Outcome of routing a client reply through an [`Entry`]'s reply target.
+/// Outcome of routing a client reply through an `Entry`'s reply target.
///
/// `Delivered` is the socket fast path: `try_send` was attempted and its
/// result is carried through unchanged. `InProcess` hands the message back
diff --git a/core/message_bus/src/replica/handshake.rs b/core/message_bus/src/replica/handshake.rs
index 13d81ce54..c0f9fcbb4 100644
--- a/core/message_bus/src/replica/handshake.rs
+++ b/core/message_bus/src/replica/handshake.rs
@@ -127,7 +127,7 @@ pub struct ReplicaTlsCtx {
/// therefore binds `dialer_id = peer_id`, `acceptor_id = self_id`.
///
/// On a rejection an authenticated, still-waiting dialer is answered
-/// with a nonzero-status [`build_challenge_message`] (see [`reject`]) so
+/// with a nonzero-status `build_challenge_message` (see `reject`) so
/// it learns the cause from its own logs rather than seeing a bare
/// connection close.
///
diff --git a/core/message_bus/src/transports/quic.rs b/core/message_bus/src/transports/quic.rs
index 26550d547..8968a18e4 100644
--- a/core/message_bus/src/transports/quic.rs
+++ b/core/message_bus/src/transports/quic.rs
@@ -49,7 +49,7 @@
//! connection share ONE request id (only metadata ops advance the dedup
//! counter), so a stranded reply would be consumed by the NEXT partition
//! op's bidi and shift the connection's data-plane stream off by one,
-//! permanently. Instead, [`REPLY_WAIT_BACKSTOP`] (longer than the SDK's
+//! permanently. Instead, `REPLY_WAIT_BACKSTOP` (longer than the SDK's
//! whole-request deadline, so the client always gives up first and
//! reconnects) closes the CONNECTION, which drops the mailbox and every
//! pending reply with it -- nothing can strand or cross request ids. A
diff --git a/core/metadata/Cargo.toml b/core/metadata/Cargo.toml
index e3328af8a..08bc6cf02 100644
--- a/core/metadata/Cargo.toml
+++ b/core/metadata/Cargo.toml
@@ -64,3 +64,6 @@ tempfile = { workspace = true }
enum_glob_use = "deny"
pedantic = "deny"
nursery = "warn"
+
+[lints.rust]
+warnings = "deny"
diff --git a/core/metadata/src/impls/metadata.rs b/core/metadata/src/impls/metadata.rs
index 9856dd02a..7682c66b1 100644
--- a/core/metadata/src/impls/metadata.rs
+++ b/core/metadata/src/impls/metadata.rs
@@ -316,7 +316,7 @@ impl Snapshot for IggySnapshot {
///
/// Owns the data directory path and the snapshot creation function. The
/// three-phase checkpoint (persist snapshot, record the pairing durably, drain the
-/// WAL) is orchestrated one layer up in [`IggyMetadata::checkpoint_if_needed`], so
+/// WAL) is orchestrated one layer up in `IggyMetadata::checkpoint_if_needed`, so
/// the superblock write can sit between persist and drain; this type owns only the
/// snapshot I/O and the last-checkpoint bookkeeping.
pub struct SnapshotCoordinator<M> {
@@ -3455,7 +3455,7 @@ where
///
/// `advance_commit_min(op)` and matching `client_table` mutation
/// (`commit_register` / `commit_reply`) run back-to-back, no `.await`
- /// between. [`crate::metadata_helpers::is_caught_up_primary`] reads
+ /// between. [`consensus::is_caught_up_primary`] reads
/// `commit_min == commit_max` as proof the table is caught up; an await
/// here lets another task observe transient equality with stale table,
/// dispatch a fresh Register on an already-registered client, and bump
diff --git a/core/metadata/src/stm/authz.rs b/core/metadata/src/stm/authz.rs
index de3341451..667b87f02 100644
--- a/core/metadata/src/stm/authz.rs
+++ b/core/metadata/src/stm/authz.rs
@@ -22,7 +22,7 @@
//! state, so the op commits as a deterministic no-op whose error rides the
//! cached reply and replays on retry, exactly like a business rejection.
//!
-//! Replay-determinism invariant: [`authorize`] is a pure function of the
+//! Replay-determinism invariant: `authorize` is a pure function of the
//! prepare header (`operation` + the acting `user_id`, stamped into the
//! replicated header at submit time) and the committed permission/stream
//! state as of the op immediately before this one. That state is applied in
@@ -83,7 +83,7 @@ where
mux.update(prepare)
}
-/// Generic entry point to [`gated_apply`] for the WAL-replay path.
+/// Generic entry point to `gated_apply` for the WAL-replay path.
///
/// The replay path is generic over the state machine and cannot name the
/// concrete accessors, so it dispatches through this trait. Implemented only
@@ -92,7 +92,7 @@ where
pub trait GatedApply:
StateMachine<Input = Message<PrepareHeader>, Output = ApplyReply, Error = IggyError>
{
- /// See [`gated_apply`].
+ /// See `gated_apply`.
///
/// # Errors
/// Propagates the underlying [`StateMachine::update`] error.
diff --git a/core/metadata/src/stm/mod.rs b/core/metadata/src/stm/mod.rs
index 8dd3ae9c4..833f196cc 100644
--- a/core/metadata/src/stm/mod.rs
+++ b/core/metadata/src/stm/mod.rs
@@ -88,7 +88,7 @@ pub trait Command {
/// Per-command handler for a given state type.
///
/// Each command implements it for the state it mutates, returning an
-/// [`ApplyReply`]: a `code` (0 = success) plus the typed reply `body` to thread
+/// [`ApplyReply`](result::ApplyReply): a `code` (0 = success) plus the typed reply `body` to thread
/// into the Reply message.
///
/// Apply MUST be deterministic across replicas: both left/right buffers recompute
@@ -335,9 +335,9 @@ macro_rules! define_state {
}
impl $state {
- /// Mint a `Send + Sync` [`ReadHandleFactory`] for this state.
+ /// Mint a `Send + Sync` `ReadHandleFactory` for this state.
/// Allows the read side to be carried across shard threads
- /// without sharing the underlying `!Sync` [`ReadHandle`].
+ /// without sharing the underlying `!Sync` `ReadHandle`.
#[must_use]
pub fn factory(&self) -> $crate::stm::LeftRightFactory<[<$state Inner>]> {
self.inner.factory()
@@ -345,7 +345,7 @@ macro_rules! define_state {
/// Construct a reader-only state wrapper from a factory minted
/// by the writer-side shard. The thread that calls this owns
- /// the resulting [`ReadHandle`]; calling `apply` on the
+ /// the resulting `ReadHandle`; calling `apply` on the
/// returned wrapper panics because `write` is `None`.
#[must_use]
pub fn from_factory(
diff --git a/core/metadata/src/stm/stream.rs b/core/metadata/src/stm/stream.rs
index eefe9e4a7..5e6d7a4d9 100644
--- a/core/metadata/src/stm/stream.rs
+++ b/core/metadata/src/stm/stream.rs
@@ -1455,7 +1455,7 @@ impl Streams {
/// `s` / topic slab `t` means creating every slab below it too; those
/// fillers carry no partitions and are inert. Each level is skipped when
/// already present, so seeding sibling partitions of one topic adds only
- /// the missing partition. Mirrors [`Users::ensure_root_user`]: a seed
+ /// the missing partition. Mirrors [`Users::ensure_root_user`](crate::stm::user::Users::ensure_root_user): a seed
/// helper that bypasses consensus, never a production runtime path.
///
/// # Panics
diff --git a/core/partitions/Cargo.toml b/core/partitions/Cargo.toml
index 4e29b1a3b..74f81908c 100644
--- a/core/partitions/Cargo.toml
+++ b/core/partitions/Cargo.toml
@@ -63,3 +63,6 @@ tempfile = { workspace = true }
enum_glob_use = "deny"
pedantic = "deny"
nursery = "warn"
+
+[lints.rust]
+warnings = "deny"
diff --git a/core/partitions/src/iggy_index_reader.rs b/core/partitions/src/iggy_index_reader.rs
index a5dacf142..12246cb30 100644
--- a/core/partitions/src/iggy_index_reader.rs
+++ b/core/partitions/src/iggy_index_reader.rs
@@ -24,7 +24,7 @@ use tracing::trace;
/// Reader for the sparse index file written by [`crate::IggyIndexWriter`].
///
-/// The on-disk stride is [`IGGY_INDEX_SIZE`] (24 bytes: `offset` u64,
+/// The on-disk stride is `IGGY_INDEX_SIZE` (24 bytes: `offset` u64,
/// `timestamp` u64, `position` u64, little-endian) — distinct from the legacy
/// 16-byte dense per-message index that `server_common::IndexReader` parses.
/// Recovery reaches for this reader so the reader matches the writer.
@@ -119,7 +119,7 @@ impl IggyIndexReader {
))
}
- /// Load every whole entry into an [`IggyIndexCache`] for offset / timestamp
+ /// Load every whole entry into an `IggyIndexCache` for offset / timestamp
/// lower-bound lookups in one read. Density is one sparse entry per flushed
/// chunk, so an aggressive flush cadence (`messages_required_to_save = 1`)
/// makes the file track every message: callers that cannot afford an
@@ -158,7 +158,7 @@ impl IggyIndexReader {
/// Last entry with `offset` at or below the target, binary-searching the
/// file with single-entry preads instead of materializing it, for indexes
/// too large to load whole. `None` when every entry sits above the target;
- /// semantics match [`IggyIndexCache::offset_lower_bound`]. `entry_count`
+ /// semantics match `IggyIndexCache::offset_lower_bound`. `entry_count`
/// comes from [`Self::entry_count`]; entries are written in ascending
/// offset and timestamp order.
///
diff --git a/core/partitions/src/iggy_partition.rs b/core/partitions/src/iggy_partition.rs
index 23a9f1b93..fb1ba35c2 100644
--- a/core/partitions/src/iggy_partition.rs
+++ b/core/partitions/src/iggy_partition.rs
@@ -324,7 +324,7 @@ pub enum PurgeError {
/// so the reconciler's `committed > applied` gate re-issues this purge on
/// its next pass. Retry, do not fence.
///
- /// Sets [`Self::purge_deferred`], which withholds `PrepareOk` for this
+ /// Sets `purge_deferred`, which withholds `PrepareOk` for this
/// group until the purge lands, so the replica goes quorum-invisible THERE
/// while every other partition on the node keeps serving. Without that
/// fence the counter would still name the pre-purge offset space and every
@@ -347,7 +347,7 @@ pub enum PurgeError {
/// reconciler re-issues the purge. Retry, do not fence: the partition is
/// serviceable and re-purging an already-empty chain is cheap.
///
- /// Sets [`Self::purge_deferred`] for the same reason as
+ /// Sets `purge_deferred` for the same reason as
/// [`Self::FrontierNotRecorded`]: an op acked between this failure and the
/// retry would be wiped by that retry while every peer that recorded the
/// generation keeps it.
@@ -2095,7 +2095,7 @@ where
/// against view-change-reset flipping status across `on_replicate` await.
///
/// View-change safety: `reset_view_change_state` calls
- /// [`crate::Pipeline::clear_request_queue`]; resumed loop breaks via
+ /// [`consensus::Pipeline::clear_request_queue`]; resumed loop breaks via
/// `else { break }`.
///
/// # Panics
diff --git a/core/partitions/src/state_transfer.rs b/core/partitions/src/state_transfer.rs
index 1653b1913..4e331eb5c 100644
--- a/core/partitions/src/state_transfer.rs
+++ b/core/partitions/src/state_transfer.rs
@@ -1822,7 +1822,7 @@ where
/// entry are swept.
///
/// A scan against a segment set this partition already scanned short-
- /// circuits through [`ReuseScanMemo`]: rotating to another peer would
+ /// circuits through `ReuseScanMemo`: rotating to another peer would
/// otherwise re-read and re-walk every staged file, up to 2 GiB each,
/// sequentially, on the pump.
pub async fn reuse_staged_segments(
@@ -2885,7 +2885,7 @@ async fn hash_segment_range(
}
/// Read the first `entry.len` bytes of a served segment file and re-verify them
-/// against the manifest entry, chunked through [`hash_segment_range`] with one
+/// against the manifest entry, chunked through `hash_segment_range` with one
/// reactor yield per chunk.
///
/// The serving side runs this on the pump to answer a single chunk request, so
diff --git a/core/sdk/Cargo.toml b/core/sdk/Cargo.toml
index 7d496c44b..e6658fd47 100644
--- a/core/sdk/Cargo.toml
+++ b/core/sdk/Cargo.toml
@@ -60,3 +60,6 @@ webpki-roots = { workspace = true }
[dev-dependencies]
mockall = { workspace = true }
+
+[lints]
+workspace = true
diff --git a/core/server/Cargo.toml b/core/server/Cargo.toml
index 35cd5e5ba..eb66213ff 100644
--- a/core/server/Cargo.toml
+++ b/core/server/Cargo.toml
@@ -192,3 +192,6 @@ tokio = { workspace = true, features = ["full", "test-util"] }
enum_glob_use = "deny"
pedantic = "deny"
nursery = "warn"
+
+[lints.rust]
+warnings = "deny"
diff --git a/core/server/src/bootstrap.rs b/core/server/src/bootstrap.rs
index 3d983f9e6..894a8a90b 100644
--- a/core/server/src/bootstrap.rs
+++ b/core/server/src/bootstrap.rs
@@ -157,7 +157,7 @@ impl<B: MessageBus + ConnectionInstaller + Clone + 'static> ShellBus for B {}
/// The five dispatch handlers a shard is built with, plus the
/// [`SessionManager`] the request-plane pair shares.
///
-/// Both production ([`build_shard_for_thread`]) and the simulator's shell
+/// Both production (`build_shard_for_thread`) and the simulator's shell
/// mode construct these through [`wire_shell_handlers`], so the request
/// plane is wired one way. The simulator's shell-off fast path uses
/// [`ShellHandlers::noop`] instead.
diff --git a/core/server/src/partition_reconciler.rs b/core/server/src/partition_reconciler.rs
index 4df3e5402..d3a3b1f80 100644
--- a/core/server/src/partition_reconciler.rs
+++ b/core/server/src/partition_reconciler.rs
@@ -61,7 +61,7 @@
//! frame's provenance, which is why the park stamp above is separate.
//! - Nothing is left unanswered: a tombstoned namespace, an overflowing park
//! buffer, and a namespace this shard has given up materialising
-//! ([`reconcile_parked_frames`]) all reply with a retriable status, so a
+//! (`reconcile_parked_frames`) all reply with a retriable status, so a
//! lockstep transport never waits out its read timeout on silence.
//!
//! `shards_table` is therefore a **cache of a deterministic hash**, never a
diff --git a/core/server/src/responses.rs b/core/server/src/responses.rs
index 35c1b672b..f4e6bc4e5 100644
--- a/core/server/src/responses.rs
+++ b/core/server/src/responses.rs
@@ -20,7 +20,7 @@
//! Assemble `get_me` / `get_clients` / `get_stream(s)` / `get_topic(s)` /
//! `get_user(s)` / `get_personal_access_tokens` / stats / cluster-metadata
//! responses from per-shard session state and the metadata state machine, plus the
-//! [`NonReplicatedResponse`] dispatch shim and the partition-namespace
+//! `NonReplicatedResponse` dispatch shim and the partition-namespace
//! resolvers.
use crate::bootstrap::{ShellBus, ShellShard};
diff --git a/core/server/src/users.rs b/core/server/src/users.rs
index 63368cd5b..129bbfca8 100644
--- a/core/server/src/users.rs
+++ b/core/server/src/users.rs
@@ -33,7 +33,7 @@
//! replicated prepare/WAL. A mismatch is committed as a rejecting no-op
//! (signalled by an empty new password) rather than denied pre-consensus, so
//! the caller's request sequence stays contiguous; see
-//! [`verify_and_rewrite_change_password`].
+//! `verify_and_rewrite_change_password`.
use crate::bootstrap::{ShellBus, ShellShard};
use crate::wire::{request_body, rewrite_request_body};
diff --git a/core/server_common/Cargo.toml b/core/server_common/Cargo.toml
index d0f7057f6..ce10ca165 100644
--- a/core/server_common/Cargo.toml
+++ b/core/server_common/Cargo.toml
@@ -71,3 +71,6 @@ nix = { workspace = true }
[dev-dependencies]
serial_test = { workspace = true }
tempfile = { workspace = true }
+
+[lints]
+workspace = true
diff --git a/core/shard/Cargo.toml b/core/shard/Cargo.toml
index 874fb5353..b803be13a 100644
--- a/core/shard/Cargo.toml
+++ b/core/shard/Cargo.toml
@@ -52,3 +52,6 @@ tracing = { workspace = true }
enum_glob_use = "deny"
pedantic = "deny"
nursery = "warn"
+
+[lints.rust]
+warnings = "deny"
diff --git a/core/shard/src/lib.rs b/core/shard/src/lib.rs
index 762c932f2..37de132e4 100644
--- a/core/shard/src/lib.rs
+++ b/core/shard/src/lib.rs
@@ -1719,7 +1719,7 @@ where
/// channel path -- and collects their replies.
///
/// Bounded: a shard that doesn't reply within
- /// [`LIST_CLIENTS_GATHER_TIMEOUT`] is skipped and the partial result is
+ /// `LIST_CLIENTS_GATHER_TIMEOUT` is skipped and the partial result is
/// logged, so one wedged shard cannot hang the read. Callers should
/// treat the result as best-effort-complete.
#[allow(clippy::future_not_send)]
@@ -1786,7 +1786,7 @@ where
/// Routes a [`LifecycleFrame::PartitionRead`] through the shards table
/// (self-sends included, so a locally-owned partition takes the same
/// path). `None` = unroutable namespace, full owning-shard inbox,
- /// dropped reply sender, or [`PARTITION_READ_TIMEOUT`] expiry; the
+ /// dropped reply sender, or `PARTITION_READ_TIMEOUT` expiry; the
/// caller maps it to a client-visible error.
#[allow(clippy::future_not_send)]
pub async fn partition_read(
@@ -2743,7 +2743,7 @@ where
/// lockstep, so silence wedges the connection until the SDK read-timeout.
///
/// The one retirement path a prepare still travels. It is retained
- /// everywhere else (see [`ParkedFrame::passes`]); here the namespace itself
+ /// everywhere else (see `ParkedFrame::passes`); here the namespace itself
/// is unreachable, so holding it buys nothing.
pub fn discard_parked_partition_frames(&self, namespace: IggyNamespace) {
// Bound the borrow to this statement: the guard in an `if let`
@@ -3007,10 +3007,10 @@ where
}
/// Age every frame under `namespace` by one pass, answering CLIENT REQUESTS
- /// past [`MAX_PARKED_PASSES`]. Returns the number answered.
+ /// past `MAX_PARKED_PASSES`. Returns the number answered.
///
/// Prepares age but never expire. Expiry destroys a committed op with
- /// nothing to recover it (see [`ParkedFrame::passes`]), and passes are
+ /// nothing to recover it (see `ParkedFrame::passes`), and passes are
/// commit-driven: a non-empty buffer defeats the reconciler fast-skip, so a
/// create burst elapses four in milliseconds, across every parked namespace
/// rather than the one it concerns. Byte budgets bound them instead. Only
diff --git a/core/shard_allocator/Cargo.toml b/core/shard_allocator/Cargo.toml
index d44574376..1d51d3a8d 100644
--- a/core/shard_allocator/Cargo.toml
+++ b/core/shard_allocator/Cargo.toml
@@ -36,3 +36,6 @@ hwlocality = { workspace = true, features = ["vendored"] }
[target.'cfg(target_os = "linux")'.dependencies]
nix = { workspace = true }
+
+[lints]
+workspace = true
diff --git a/core/simulator/Cargo.toml b/core/simulator/Cargo.toml
index 37df9a52e..3154b2957 100644
--- a/core/simulator/Cargo.toml
+++ b/core/simulator/Cargo.toml
@@ -53,3 +53,6 @@ tracing = { workspace = true }
enum_glob_use = "deny"
pedantic = "deny"
nursery = "warn"
+
+[lints.rust]
+warnings = "deny"
diff --git a/core/simulator/src/bus.rs b/core/simulator/src/bus.rs
index 3f542411d..39ff8feb7 100644
--- a/core/simulator/src/bus.rs
+++ b/core/simulator/src/bus.rs
@@ -65,7 +65,7 @@ pub struct Envelope {
///
/// Consensus code calls `send_to_replica()` / `send_to_client()` which stage
/// messages here. The simulator's tick loop drains each replica's outbox and
-/// feeds the messages into the [`Network`] for simulated delivery.
+/// feeds the messages into the [`Network`](crate::network::Network) for simulated delivery.
pub struct SimOutbox {
/// Replica id that owns this outbox. Populated as `from_replica` on every envelope.
self_id: u8,
diff --git a/core/simulator/src/deps.rs b/core/simulator/src/deps.rs
index 9b7f89b79..7c73f1a41 100644
--- a/core/simulator/src/deps.rs
+++ b/core/simulator/src/deps.rs
@@ -347,7 +347,7 @@ impl SimJournal<MemStorage> {
/// Read the entry at `op` synchronously, for off-executor WAL replay at restart.
/// Mirrors [`Journal::entry`] without the never-suspending `MemStorage` await, so
- /// it needs no [`JournalAccessGuard`]: a synchronous read offers no suspension
+ /// it needs no `JournalAccessGuard`: a synchronous read offers no suspension
/// point for another task to interleave on.
///
/// # Panics
@@ -401,13 +401,13 @@ impl SimSuperblock {
}
/// Make every subsequent write fail, a persistent write fault, so the durability
- /// gate withholds view-scoped sends. See [`Self::fail_writes`].
+ /// gate withholds view-scoped sends. See `Self::fail_writes`.
pub fn set_fail_writes(&self) {
self.fail_writes.set(true);
}
/// Make every subsequent write suspend once before completing, so tasks that
- /// are ready at persist time interleave with it. See [`Self::yield_writes`].
+ /// are ready at persist time interleave with it. See `Self::yield_writes`.
pub fn set_yield_writes(&self) {
self.yield_writes.set(true);
}
diff --git a/core/simulator/src/network.rs b/core/simulator/src/network.rs
index 6a4aa795e..30aaa36a3 100644
--- a/core/simulator/src/network.rs
+++ b/core/simulator/src/network.rs
@@ -18,7 +18,7 @@
//! Network abstraction layer for the cluster simulator.
//!
//! **Note:** Currently a thin passthrough over `PacketSimulator`. Once the
-//! Cluster and [`MessageBus`] layers are built, this will own
+//! Cluster and [`MessageBus`](message_bus::MessageBus) layers are built, this will own
//! process-to-bus routing, and node enable/disable logic.
use crate::packet::{
diff --git a/core/simulator/src/workload/mod.rs b/core/simulator/src/workload/mod.rs
index 2e641066c..03c7388b9 100644
--- a/core/simulator/src/workload/mod.rs
+++ b/core/simulator/src/workload/mod.rs
@@ -362,7 +362,7 @@ const FAULT_SEED_SALT: u64 = 0x5A1A_F0E5_FACE_0001;
/// The invariants are asserted after every tick, so a consensus or
/// workload regression panics at the tick it occurs (the seed in the message
/// replays it). When `crash_per_tick_ratio > 0` the driver also injects
-/// crash-only faults via [`maybe_inject_crash`].
+/// crash-only faults via `maybe_inject_crash`.
pub fn run(
sim: &mut Simulator,
workload: &mut Workload,
diff --git a/core/simulator/src/workload/ops/mod.rs b/core/simulator/src/workload/ops/mod.rs
index 604e110bb..d1aa4b483 100644
--- a/core/simulator/src/workload/ops/mod.rs
+++ b/core/simulator/src/workload/ops/mod.rs
@@ -26,7 +26,7 @@
//! - `classify_reply`: decode reply into a declared outcome
//! - `predicted_effect`: predicted shadow mutation on commit
//!
-//! Dispatch via the [`op_dispatch!`] macro; missing variants are a compile
+//! Dispatch via the `op_dispatch!` macro; missing variants are a compile
//! error.
pub mod change_password;
diff --git a/core/simulator/src/workload/shadow.rs b/core/simulator/src/workload/shadow.rs
index 69f64b2e4..6a34207fe 100644
--- a/core/simulator/src/workload/shadow.rs
+++ b/core/simulator/src/workload/shadow.rs
@@ -178,7 +178,7 @@ impl Shadow {
self.fresh_name(prefix)
}
- /// Apply a predicted effect. Returns [`SimCommand`]s for the driver
+ /// Apply a predicted effect. Returns [`SimCommand`](crate::workload::effect::SimCommand)s for the driver
/// plus an `applied` flag gating `auditor.note_committed`.
///
/// `applied = false` when a precondition no longer holds (parent
diff --git a/core/system_stats/Cargo.toml b/core/system_stats/Cargo.toml
index c3f596057..f642fd853 100644
--- a/core/system_stats/Cargo.toml
+++ b/core/system_stats/Cargo.toml
@@ -29,3 +29,6 @@ sysinfo = { workspace = true }
[dev-dependencies]
tempfile = { workspace = true }
+
+[lints]
+workspace = true
diff --git a/core/tools/Cargo.toml b/core/tools/Cargo.toml
index e262a02b6..5895ef300 100644
--- a/core/tools/Cargo.toml
+++ b/core/tools/Cargo.toml
@@ -34,3 +34,6 @@ rand = { workspace = true }
tokio = { workspace = true }
tracing = { workspace = true }
tracing-subscriber = { workspace = true }
+
+[lints]
+workspace = true
diff --git a/examples/rust/Cargo.toml b/examples/rust/Cargo.toml
index 2027745aa..0f05f003e 100644
--- a/examples/rust/Cargo.toml
+++ b/examples/rust/Cargo.toml
@@ -134,3 +134,6 @@ path = "src/tcp-tls/producer/main.rs"
[[example]]
name = "tcp-tls-consumer"
path = "src/tcp-tls/consumer/main.rs"
+
+[lints]
+workspace = true