type-lib 1.0.0

Validation and type constraint library. Declare domain types with invariants enforced at construction. Parse-dont-validate pattern as a first-class citizen. Zero-overhead wrappers with derive macros.
Documentation
# type-lib v0.9.0 — Hardening & Pre-1.0 Audit

**Feature freeze.** v0.9.0 is the quality gate before 1.0: no new public API, no
behavioural changes. This note doubles as the written pre-1.0 audit report. One
defect was found and fixed (feature-specific `cargo doc` warnings), the CI gap
that allowed it was closed, and the public surface was reviewed for 1.0
stability. Everything else passed.

## What is type-lib?

A validation and type-constraint library for Rust. You declare domain types whose
invariants are enforced at construction and proven by the type system thereafter,
so code that receives a validated value never re-checks it. Wrappers are
zero-overhead, the core is `no_std`-friendly, and rules are reusable and
composable.

## Audit findings

### Fixed: `cargo doc` warned under non-default feature sets

`cargo doc` (default features) and `cargo doc --no-default-features` emitted
`broken_intra_doc_links` warnings:

- `[`Validated`]` in the crate-level feature list resolves only when the `derive`
  feature is on.
- `[`std::error::Error`]` on `ValidationError` resolves only when `std` is on.

CI only ran `cargo doc --all-features`, where both links resolve, so the warnings
never failed a build. Both were demoted to plain code spans, so docs now build
warning-free under every feature configuration.

### Fixed: CI did not cover the `no_std` configuration

The workflow ran only `--all-features`. It now also runs
`cargo clippy --no-default-features --lib --tests`, `cargo test
--no-default-features`, and `cargo doc --no-default-features` (all with
`-D warnings`), so the `no_std` surface — and feature-specific doc links — are
gated on every push.

### Reviewed, no change required

- **API stability.** The public surface is final for 1.0. `Validator` and
  `HasLength` are deliberately **left open** (not sealed) because they are the
  intended extension points — users implement `Validator` for their own rules and
  `HasLength` for their own containers. There are no public enums, so
  `#[non_exhaustive]` does not apply; `ValidationError` already has private fields
  and a constructor, so adding fields later is non-breaking.
- **Error codes are stable.** The `&'static str` codes returned by the built-in
  rules (`"non_empty"`, `"max_len"`, `"in_range"`, `"trimmed"`, `"not"`, …) are
  part of the contract and will not change in 1.x; only human-readable messages
  may be reworded.
- **No panics / no dead code.** No `unwrap`/`expect`/`panic!`/`todo!`/
  `unimplemented!`/`unreachable!` in shipping code (enforced by crate-root
  `deny` lints). The only `#[allow]`s are `clippy::unwrap_used` in `#[cfg(test)]`
  modules, which REPS explicitly permits.
- **Documentation.** Every one of the public items carries rustdoc with at least
  one runnable example; five `examples/` programs cover the main use cases.
- **Error paths tested.** Every `Result`-returning path — `Refined::new`, each
  built-in rule, each combinator, and the derived `new` — has both `Ok` and `Err`
  coverage across unit, integration, and property tests.

## Breaking changes

**None.** v0.9.0 is feature-frozen and API-compatible with v0.6.0.

## Verification

Run on Windows x86_64 (Rust stable 1.95 and MSRV 1.75.0) and on Linux (WSL2
Ubuntu); identical commands pass via the CI matrix (Linux/macOS/Windows ×
{stable, 1.75.0}):

```bash
cargo fmt --all -- --check
cargo clippy --workspace --all-targets --all-features -- -D warnings
cargo clippy --no-default-features --lib --tests -- -D warnings
cargo test --workspace --all-features
cargo test --no-default-features
RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps --all-features
RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --no-default-features
cargo bench --bench validation
```

All green. Counts at this tag:

- `--all-features`: 26 unit + 4 derive + 6 other integration + 8 property + 38 doctests.
- `--no-default-features`: 26 unit + 6 integration + 8 property + 37 doctests.

The published `type-lib` crate has no runtime dependencies by default; the
`derive` feature adds `syn` / `quote` / `proc-macro2` at build time. The committed
`Cargo.lock` keeps the dev-dependency tree on the MSRV (Rust 1.75).

## What's next

- **v0.9.x — Audit fixes.** Iterate on any further findings while feature-frozen.
- **v1.0.0 — Stable.** Final API freeze, captured benchmark numbers, and the
  SemVer promise; publish `type-lib` and `type-lib-derive` to crates.io.

## Installation

```toml
[dependencies]
type-lib = "0.9.0"

# with the derive macro
type-lib = { version = "0.9.0", features = ["derive"] }
```

MSRV: Rust 1.75.

## Documentation

- [README]https://github.com/jamesgober/type-lib/blob/main/README.md
- [API Reference]https://github.com/jamesgober/type-lib/blob/main/docs/API.md
- [CHANGELOG]https://github.com/jamesgober/type-lib/blob/main/CHANGELOG.md

---

**Full diff:** [`v0.6.0...v0.9.0`](https://github.com/jamesgober/type-lib/compare/v0.6.0...v0.9.0).
**Changelog:** [`CHANGELOG.md`](https://github.com/jamesgober/type-lib/blob/main/CHANGELOG.md#090---2026-05-27).