Skip to content

v0.6.11 - Random Generation & Workspace Modernization

Choose a tag to compare

@crumplecup crumplecup released this 09 Feb 03:11
· 1102 commits to main since this release

Elicitation v0.6.11 - Random Generation & Workspace Modernization

🎲 Major Features

Contract-Aware Random Generation

This release introduces comprehensive random data generation capabilities with the new elicitation_rand crate and #[derive(Rand)] macro.

#[derive(Elicit, Rand)]
#[contract(And<Positive, Bounded<1, 100>>)]
struct Score(u32);

// Generates values in [1, 100] range
let generator = Score::random_generator(42);
let score = generator.generate(); // Always valid!

What's Included:

  • 🎯 Contract-aware generation - Respects #[contract(...)] attributes
  • 🏗️ Struct & enum support - Per-field contracts, uniform variant selection
  • 📚 Collections - VecGenerator with configurable length bounds
  • 🌐 Third-party types - String, UUID, URL, PathBuf, chrono, time, jiff
  • 🎭 Paradigm integration - Works with Select, Survey, Affirm patterns
  • Full feature bundle - Default full feature includes all third-party support

Consolidated Derive Macros

Following standard Rust patterns (like serde), we've consolidated into a single derive crate:

use elicitation_derive::{Elicit, Rand};  // One crate, two derives

Workspace Dependency Coordination

All crates now use centralized version management for consistent dependency versions across the workspace.

🔧 Technical Improvements

  • Rand 0.10 Migration - Updated to latest rand with Edition 2024 compatibility
  • Kani Verification - Generator proofs for UUID, datetime types, and error types
  • API Modernization - Cleaner imports, better error messages

📚 Documentation

  • Complete README rewrite with tutorial-driven approach
  • Comprehensive random generation guide
  • MCP tool router integration documentation

🐛 Bug Fixes

  • Fixed Edition 2024 gen keyword conflicts
  • Workspace dependency coordination
  • Feature gate checks for all combinations

📦 Installation

[dependencies]
elicitation = "0.6.11"

For random generation:

[dependencies]
elicitation = { version = "0.6.11", features = ["full"] }

🎯 Use Cases

Perfect for:

  • Testing - Generate valid test data with contracts
  • Fuzzing - Contract-aware fuzz testing
  • Game Development - Procedural content generation
  • Simulation - Realistic random data with constraints

Full Changelog: https://github.com/crumplecup/elicitation/blob/main/CHANGELOG.md