Skip to main content

nexus_rt/codegen_audit/
mod.rs

1// Builder return types are necessarily complex — each combinator returns
2// PipelineChain<In, Out, impl FnMut(...)>. Same pattern as iterator adapters.
3#![allow(clippy::type_complexity)]
4// Audit functions intentionally have similar structure.
5#![allow(clippy::too_many_lines)]
6// Unused variables in closures that exist only as codegen probes.
7#![allow(unused_variables)]
8// Audit functions are not public API — no docs needed.
9#![allow(missing_docs)]
10// `world.registry()` returns `&Registry`; `&reg` is idiomatic in audit code.
11#![allow(clippy::needless_borrow)]
12// Audit helpers use short names (a, b, c) for resource params — intentional.
13#![allow(clippy::many_single_char_names)]
14// DAG steps take &u64 by design — we're auditing the reference-based codegen.
15#![allow(clippy::trivially_copy_pass_by_ref)]
16// Local fn items inside audit functions keep error handlers near usage.
17#![allow(clippy::items_after_statements)]
18// Audit helpers intentionally use approximate values.
19#![allow(clippy::approx_constant)]
20// `if b { 1 } else { 0 }` is the exact pattern we're auditing.
21#![allow(clippy::bool_to_int_with_if)]
22// Audit handler functions intentionally take params by value for codegen probing.
23#![allow(clippy::needless_pass_by_value)]
24// High-arity handlers are intentional — we're auditing the calling convention codegen.
25#![allow(clippy::too_many_arguments)]
26
27//! Assembly audit harness for verifying codegen quality.
28//!
29//! Every `pub fn` in this module is `#[inline(never)]` to provide
30//! clean symbol boundaries for `cargo asm` inspection:
31//!
32//! ```bash
33//! cargo asm --lib -p nexus-rt --features codegen-audit "pipe_linear_3"
34//! ```
35//!
36//! These functions are NOT part of the public API. They exist solely
37//! for codegen verification. The `codegen-audit` feature flag ensures
38//! none of this compiles unless explicitly requested.
39
40pub mod helpers;
41
42mod pipeline;
43pub use pipeline::*;
44
45mod dag;
46pub use dag::*;
47
48mod batch;
49pub use batch::*;
50
51mod adapters;
52pub use adapters::*;
53
54mod stress;
55pub use stress::*;