Files
Ruben Fiszel 79780ff8ac pg_embed
2026-01-09 12:50:08 +00:00
..
2025-11-18 12:59:00 +00:00
2024-03-05 18:51:47 +01:00
2026-01-09 12:50:08 +00:00
2026-01-09 07:23:45 +00:00
2026-01-09 07:29:07 +00:00
2026-01-09 12:43:03 +00:00
2026-01-09 12:50:08 +00:00
2026-01-09 12:43:03 +00:00
2026-01-09 12:43:03 +00:00
2024-02-08 16:09:11 +01:00
2025-10-23 20:15:34 +00:00
2025-04-12 11:09:21 +00:00
2026-01-09 12:43:03 +00:00
2024-11-19 14:28:12 +01:00

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.

Features

Embedded PostgreSQL (pg_embed)

The pg_embed feature allows Windmill to run with an embedded PostgreSQL database, eliminating the need for a separate PostgreSQL instance. This is useful for local development, testing, or single-machine deployments.

Building with pg_embed:

cargo build --features pg_embed

System Dependencies:

The embedded PostgreSQL requires certain system libraries to be installed:

  • Arch Linux:

    sudo pacman -S libxml2 icu openssl
    
  • Ubuntu/Debian:

    sudo apt-get install libxml2 libicu-dev libssl-dev
    
  • RHEL/Fedora:

    sudo dnf install libxml2 libicu openssl-libs
    

Usage:

When the pg_embed feature is enabled, if DATABASE_URL is not set, Windmill will automatically start an embedded PostgreSQL instance.

You can customize the embedded PostgreSQL behavior with these environment variables:

  • PG_EMBED_DATA_DIR: Directory for PostgreSQL data (default: ./postgresql_data)
  • PG_EMBED_PORT: Port for PostgreSQL (default: 5432)
  • PG_EMBED_DATABASE: Database name (default: windmill)
  • PG_EMBED: Set to any value to force embedded PostgreSQL even if DATABASE_URL exists

Example:

# Run with default embedded PostgreSQL
./windmill

# Or with custom settings
PG_EMBED_DATA_DIR=/my/data PG_EMBED_PORT=5433 ./windmill

Compile sqlx for offline ci

cargo sqlx prepare --workspace -- --bin windmill --features enterprise