Skip to main content

Crate what_core

Crate what_core 

Source
Expand description

what-core - An HTML-first web framework

Build websites with semantic HTML components and server-side rendering. No JavaScript frameworks. No build steps. Just HTML.

Modules§

auth
Authentication module for the What framework
cache
Caching system for What framework
components
Component registry and rendering system
data
Data Store - Central state management for What framework
database
Database Adapter — unified interface for SQLite, Cloudflare D1, and Supabase backends
datasource
Named datasources — connect to multiple backends via dsn:name in fetch directives.
egress_guard
SSRF egress guard for template-driven fetch directives.
email
Email sending for What projects.
jobs
Background job queue for non-blocking operations.
parser
HTML parser for custom tags
policy
Declarative collection authorization policies.
prelude
Prelude for common imports
server
HTTP Server for What framework
sessions
Session management for What framework
uploads
Upload storage backends — local filesystem and Cloudflare R2
validation
Form validation for What

Structs§

AuthConfig
Authentication configuration
CollectionPolicyConfig
Raw per-collection authorization policy — one per [collections.name] in what.toml. Semantic validation (reserved words, invalid combinations) happens when the PolicyRegistry is built at startup, so errors fail loud with the collection name.
Config
Main configuration structure parsed from what.toml
DatasourceConfig
EmailApiConfig
API-based email provider configuration (e.g. Resend)
EmailConfig
Email configuration
FieldRulesConfig
Field-level policy rules for a collection
RateLimitConfig
Rate limiting configuration
SessionConfig
Session configuration
SmtpConfig
SMTP transport configuration
UploadConfig
Upload configuration

Enums§

DatasourceType
Named datasource configuration — one entry per [datasources.name] in what.toml
Error
Main error type for what-core

Functions§

parse_size_string
Parse human-readable size strings into bytes
resolve_config_path
Resolve the config file path for a project directory.

Type Aliases§

Result
Result type alias for What operations