Files
windmill/backend/windmill-api-auth
Ruben Fiszel b838e6caff refactor: extract windmill-api-auth and windmill-triggers crates
Split the 90K-line windmill-api crate into three crates to improve
incremental compilation times. Changes to trigger protocol code no
longer recompile API endpoint code and vice versa.

New crate dependency DAG:
  windmill-common → windmill-audit → windmill-api-auth → windmill-triggers → windmill-api

windmill-api-auth (~2K lines): API authentication infrastructure
- ApiAuthed struct and trait impls
- AuthCache and token extraction
- FromRequestParts extractors for axum
- Scope checking (ScopeDefinition, check_scopes)
- fetch_api_authed for listener contexts

windmill-triggers (~14.6K lines): All trigger protocol code
- HTTP, WebSocket, Kafka, NATS, MQTT, PostgreSQL, SQS, GCP, email triggers
- Native triggers (workspace integrations)
- JobOps trait with OnceLock-based dependency injection for functions
  that must stay in windmill-api (push_*_job, run_wait_result, etc.)
- Extension modules (args_ext, capture_ext, jobs_ext, etc.)

windmill-api changes:
- Depends on both new crates
- Implements JobOps trait in job_ops_impl.rs
- Re-exports jobs_ext and resource_ext for EE file compatibility
- Feature flags forwarded to windmill-triggers

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 12:33:20 +00:00
..