mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-10-23 16:03:33 +00:00
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>
Windmill Backend
This folder holds all backend components, the src/ folder only contains files used to build the "root" binary.
Components
| name | description |
|---|---|
| windmill-api | The API server, exposing functionality to other components and the frontend |
| windmill-audit | Contains audit functionality, allowing different components to record important actions |
| windmill-common | Common code shared by all crates |
| windmill-queue | Contains job & flow queuing functionality, commonly written to by the API server and read from by workers |
| windmill-worker | The worker. Used to process and execute flows & jobs. |
| parsers | Contains code to parse signatures in different langauges. |
Compile sqlx for offline ci
cargo sqlx prepare --workspace -- --bin windmill --features enterprise