metrale_server/
lib.rs

1// SPDX-License-Identifier: MIT OR Apache-2.0
2
3#![deny(warnings)]
4#![deny(clippy::all)]
5#![allow(dead_code)]
6#![allow(clippy::too_many_arguments)]
7#![allow(clippy::needless_range_loop)]
8#![allow(clippy::large_enum_variant)]
9#![allow(clippy::doc_lazy_continuation)]
10#![allow(clippy::doc_overindented_list_items)]
11
12//! 2026-09-26: Library target of metrale-server: the modules that the
13//! integration tests, the `k3_tokenizer_check` example and
14//! `cargo test -p metrale-server --lib` use without building the `met` binary.
15//!
16//! Owner: server.
17//! Invariants: every module declared here is also declared in `main.rs`.
18
19pub mod tokenizer;
20
21// 2026-09-26: The tokenizer tests use `reasoning_parser::ReasoningFormat`, so
22// a `--lib` build needs it; its only in-crate dependency is `tokenizer`.
23pub mod reasoning_parser;
24
25// 2026-09-26: Declared here as well as in `main.rs` so their unit tests run
26// under `--lib`. `rate_limiter` calls `env_config::parse_min`, so
27// `env_config` has to be here too.
28#[path = "auth.rs"]
29pub mod auth;
30#[path = "env_config.rs"]
31pub mod env_config;
32#[path = "rate_limiter.rs"]
33pub mod rate_limiter;
34#[path = "refusal.rs"]
35pub mod refusal;