Expand description
FORGE - The Rust Full-Stack Framework
A batteries-included framework for building full-stack web applications with a Rust backend and generated SvelteKit or Dioxus frontends.
§Features
Cargo features control which subsystems are compiled in. The default
feature set is full — every subsystem enabled. To shrink your binary,
disable defaults and opt into a preset:
# Worker-only binary (no HTTP gateway)
forge = { version = "0.9", default-features = false, features = ["worker"] }
# API server (no background workers)
forge = { version = "0.9", default-features = false, features = ["api"] }Available presets: full, worker, api, minimal.
Available subsystems: gateway, jobs, workflows, cron, daemons,
geoip, otel.
Re-exports§
pub use forge_core::schemars;
Modules§
Macros§
- assert_
err - Assert that a result is Err.
- assert_
err_ matches - Assert that an error matches a pattern, with an optional guard expression.
- assert_
err_ variant - Assert that an error matches a specific variant (pattern matching, not substring).
- assert_
http_ called - Assert that an HTTP call was made.
- assert_
http_ not_ called - Assert that an HTTP call was not made.
- assert_
job_ dispatched - Assert that a job was dispatched.
- assert_
job_ not_ dispatched - Assert that a job was not dispatched.
- assert_
ok - Assert that a result is Ok.
- assert_
workflow_ not_ started - Assert that a workflow was not started.
- assert_
workflow_ started - Assert that a workflow was started.
Structs§
- Auto
Handler - A single auto-registration entry emitted by each
#[forge::*]macro viainventory::submit!. - Forge
- The main FORGE runtime.
- Forge
Builder - Builder for configuring the FORGE runtime.
- Handler
Registries - All registries bundled into one struct so a single
AutoHandlerclosure can target the right sub-registry without needing a separate inventory type per handler kind. - Migration
- A single migration with up SQL.
Functions§
- get_
internal_ sql - All internal FORGE schema SQL concatenated. Apply before user migrations in tests.
Attribute Macros§
- cron
- Marks a function as a scheduled cron task.
- daemon
- Marks a function as a long-running daemon.
- forge_
enum - Marks an enum for database storage as a PostgreSQL ENUM type.
- job
- Marks a function as a background job.
- mcp_
tool - Marks a function as an MCP tool.
- model
- Marks a struct as a FORGE model, generating schema metadata for TypeScript codegen.
- mutation
- Marks a function as a mutation (transactional write).
- query
- Marks a function as a query (read-only, cacheable, subscribable).
- webhook
- Marks a function as a webhook handler.
- workflow
- Marks a function as a durable workflow.