Atlas / Skills / windmill-labs / Rust Backend

Rust BackendCAUTION

skills/windmill-labs/rust-backend

Open-source developer platform to power your entire infra and turn scripts into webhooks, workflows and UIs. Fastest workflow engine (13x vs Airflow). Open-source alternative to Retool and Temporal.

Verdict
CAUTION
Grade
B
Trust score
87 /100
Version
—
Hosts
—
License
NOASSERTION
Stars
18,234
01

Overview

Open-source developer platform to power your entire infra and turn scripts into webhooks, workflows and UIs. Fastest workflow engine (13x vs Airflow). Open-source alternative to Retool and Temporal.

Read from source at commit 4de492eb38f5OBSERVED · 2026-10-21
Advertisement
02

What it tells the agent

The instruction file, verbatim from the audited commit — this is the text the model reads, and the surface the audit's instruction layer examines. Quoted here so you can judge it without cloning anything.

---
name: rust-backend
description: Rust coding guidelines for the Windmill backend. MUST use when writing or modifying Rust code in the backend directory.
---

# Windmill Rust Patterns

Apply these Windmill-specific patterns when writing Rust code in `backend/`.

## Error Handling

Use `Error` from `windmill_common::error`. Return `Result<T, Error>` or `JsonResult<T>`:

```rust
use windmill_common::error::{Error, Result};

pub async fn get_job(db: &DB, id: Uuid) -> Result<Job> {
    sqlx::query_as!(Job, "SELECT id, workspace_id FROM v2_job WHERE id = $1", id)
        .fetch_optional(db)
        .await?
        .ok_or_else(|| Error::NotFound("job not found".to_string()))?;
}
```

Never panic in library code. Reserve `.unwrap()` for compile-time guarantees.

## SQLx Patterns

**Never use `SELECT *`** — always list columns explicitly. Critical for backwards compatibility when workers lag behind API version:

```rust
// Correct
sqlx::query_as!(Job, "SELECT id, workspace_id, path FROM v2_job WHERE id = $1", id)

// Wrong — breaks when columns are added
sqlx::query_as!(Job, "SELECT * FROM v2_job WHERE id = $1", id)
```

Use batch operations to avoid N+1:

```rust
// Preferred — single query with IN clause
sqlx::query!("SELECT ... WHERE id = ANY($1)", &ids[..]).fetch_all(db).await?
```

Use transactions for multi-step operations. Parameterize all queries.

## JSON Handling

Prefer `Box<serde_json::value::RawValue>` over `serde_json::Value` when storing/passing JSON without inspection:

```rust
pub struct Job {
    pub args: Option<Box<serde_json::value::RawValue>>,
}
```

Only use `serde_json::Value` when you need to inspect or modify the JSON.

## Serde Optimizations

```rust
#[derive(Serialize, Deserialize)]
pub struct Job {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub parent_job: Option<Uuid>,
    #[serde(skip_serializing_if = "Vec::is_empty")]
    pub tags: Vec<String>,
    #[serde(default)]
    pub priority: i32,
}
```

## Async & Concurrency

Never block the async runtime. Use `spawn_blocking` for CPU-intensive work:

```rust
let result = tokio::task::spawn_blocking(move || expensive_computation(&data)).await?;
```

**Mutex selection**: Prefer `std::sync::Mutex` (or `parking_lot::Mutex`) for data protection. Only use `tokio::sync::Mutex` when holding locks across `.await` points.

Use `tokio::sync::mpsc` (bounded) for channels. Avoid `std::thread::sleep` in async contexts.

## Module Structure & Visibility

- Use `pub(crate)` instead of `pub` when possible
- Place new code in the appropriate crate based on functionality
- API endpoints go in `windmill-api/src/` organized by domain
- Shared functionality goes in `windmill-common/src/`

## Code Navigation

Always use rust-analyzer LSP for go-to-definition, find-references, and type info. Do not guess at module paths.

## Feature Telemetry

`FEATURE_USAGE_KINDS` in `windmill-api-workspaces/src/workspaces.rs` is an allowlist: a
`(feature, kind)` pair missing from it is dropped by `valid_feature_usage_event` with a bare
`continue` — no error, and the route still returns 204. Adding a counter on the frontend without
registering it here records nothing. See `docs/feature-telemetry.md`.

## Axum Handlers

Destructure extractors directly in function signatures:

```rust
async fn process_job(
    Extension(db): Extension<DB>,
    Path((workspace, job_id)): Path<(String, Uuid)>,
    Query(pagination): Query<Pagination>,
) -> Result<Json<Job>> { ... }
```
03

Trust audit

CAUTIONgrade B · trust 87/100 Install with care. The audit found things worth knowing before you trust its output.

LayerWhat it checksResult
L0Provenance & inventoryWARN
L1Static analysis of the codeNA
L2Instruction surface (what it tells the agent)WARN
L3Class-specific surfacePASS
L4Behavioural (sandbox)SKIPPED

What the source does

Filesystem
none-observed
Network
none-observed
Shell
none-observed
Dependencies
pinned
Secrets in source
none-found

Findings (6)

MEDIUMInventory / provenance · inv.symlink · CWE-1104
.claude/skills/adding-a-trigger/SKILL.md
.claude/skills/adding-a-trigger/SKILL.md
Why it matters. link not followed
MEDIUMInventory / provenance · inv.symlink · CWE-1104
.claude/skills/ai-chat/SKILL.md
.claude/skills/ai-chat/SKILL.md
Why it matters. link not followed
MEDIUMInventory / provenance · inv.symlink · CWE-1104
.claude/skills/ai-evals/SKILL.md
.claude/skills/ai-evals/SKILL.md
Why it matters. link not followed
MEDIUMInventory / provenance · inv.symlink · CWE-1104
.claude/skills/codebase-design/SKILL.md
.claude/skills/codebase-design/SKILL.md
Why it matters. link not followed
MEDIUMInventory / provenance · inv.symlink · CWE-1104
.claude/skills/commit/SKILL.md
.claude/skills/commit/SKILL.md
Why it matters. link not followed
MEDIUMPrivilege escalation / persistence · review.unsafe_action · CWE-269, CWE-250
<listing:description>
MUST use when writing or modifying Rust code in the backend directory.
Why it matters. The MUST directive forces the agent to apply these specific patterns when changing backend code, overriding the user's chosen style and implementation approach.
Fix. rewrite it so the instruction says plainly what it does, and asks the user before it acts

Gates applied: no_behavioural_pass.

Audited 2026-10-21 · audit v0.4.1 · source sha 4de492eb38f5full audit observations/trust-audit/skill/windmill-labs__rust-backend.json · Report an issue / request a re-scan
04

Audit history

Every audit this skill has had.

DateSourceVerdictGradeScoreChange
2026-10-214de492eb38f5CAUTIONB87first audit
05

Questions

What does the rust-backend — windmill-labs/windmill skill do?

Open-source developer platform to power your entire infra and turn scripts into webhooks, workflows and UIs. Fastest workflow engine (13x vs Airflow). Open-source alternative to Retool and Temporal.

Is rust-backend — windmill-labs/windmill safe to install?

With care. The audit graded it B (87/100) and found 6 things worth knowing before you trust this skill, listed below with the exact line each was found on.

What can rust-backend — windmill-labs/windmill access on my machine?

The audit observed no filesystem, network or shell use at all in its source.

How current is this page?

The grade is for one exact copy of the source (4de492eb38f5), read on 2026-10-21. The repository is watched, and a new audit runs when it changes — this is the first audit.

Add this badge to your README

Shows this page's audit result and links back to it. It updates when the audit does.

ModelsAtlas audit badge

Markdown
[![ModelsAtlas audit: Rust Backend](https://modelsatlas.com/skills/windmill-labs/rust-backend/badge.svg)](https://modelsatlas.com/skills/windmill-labs/rust-backend/)

Not your listing, or something out of date? Claim or update your listing.

Advertisement