Weave Compliance
Documentation
API documentation surfaces produced by Weave Compliance for regulator-facing exports and audit packages.
Purpose
Audit trails, regulatory reports, ethics checks, governance, evidence IDs, and compliance documentation.
This page follows the real source shape for Weave Compliance and explains the workflow a developer is likely to use first.
Developer workflow
Start from the smallest constructor or builder, perform one meaningful operation, inspect the returned state, then add the relevant policy, storage, or network integration. The examples below should be expanded whenever the crate API changes.
Primary types to know
AIDecision— libs/weave-compliance/src/ethics.rsAIOperation— libs/weave-compliance/src/compliance.rsApiDocumentation— libs/weave-compliance/src/docs.rsAuditEvent— libs/weave-compliance/src/audit.rsAuditEventId— libs/weave-compliance/src/audit.rsAuditReport— libs/weave-compliance/src/audit.rsAuditReportCriteria— libs/weave-compliance/src/audit.rsBiasAnalysis— libs/weave-compliance/src/ethics.rsDataAsset— libs/weave-compliance/src/governance.rsDataGovernanceResult— libs/weave-compliance/src/governance.rsDataOperation— libs/weave-compliance/src/lib.rsDataOperationRecord— libs/weave-compliance/src/governance.rs
Example shape
use weave_compliance::docs::{
ComplianceDocumentationGenerator, ProductionComplianceDocs, ProductionDocumentationSystem,
StaticVersionManager,
};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// The documentation system pairs a version manager with API + compliance
// generators so every release ships with a matching documentation suite.
let version = StaticVersionManager("0.1.0".into());
let docs = ProductionDocumentationSystem::new(version);
let suite = docs.generate_comprehensive_documentation().await?;
let compliance_docs = ProductionComplianceDocs
.generate_compliance_documentation()
.await?;
println!(
"version={} endpoints={} compliance_chars={}",
suite.version,
suite.api_documentation.endpoints.len(),
compliance_docs.len(),
);
Ok(())
}