Skip to main content

Crate vorma

Crate vorma 

Source
Expand description

Rust full-stack framework runtime and app declaration API.

Application code declares views, resources, middleware, document defaults, and build/runtime config through this crate. vorma-build consumes the same declarations to generate manifests and TypeScript contracts, while RuntimeHost serves the runtime handler that users mount into their HTTP stack.

Modules§

middleware
Optional Tower middleware helpers for Vorma app servers.

Macros§

app
Declare a typed local module of Vorma app aliases and declaration macros.

Structs§

App
Normalized app ready to become a runtime host.
AppConfig
Complete app declaration consumed by both vorma-build and RuntimeHost.
CancelToken
Host-agnostic cancellation token for one execution context.
DevWatchConfig
Dev watcher patterns and change classification.
Document
Build-safe document shell and default head declaration.
DocumentAttributes
Builder for document element attributes.
DocumentBuildCtx
Context passed to the document builder.
DocumentBuilder
Async document builder used by build/live-state and runtime HTML rendering.
Error
Simple framework error for app setup and runtime helper failures.
ExecCtx
One execution context with task memoization, cancellation, and dependency coalescing.
FieldDef
Field definition for a TypeScript record.
FormData
Parsed form request body or query-string form input.
FormField
Text field parsed from a form request.
FormFile
File field parsed from a multipart form request.
FrontendConfig
Frontend build and static asset configuration.
HeadAttr
Head element attribute marker for low-level head builder definitions.
HeadBooleanAttribute
Boolean head element attribute marker.
HeadBuilder
Builder for default head, route head effects, and head dedupe rules.
HeadHandle
Mutable head-effect handle.
HeadInnerHtml
Trusted inner HTML marker for low-level head builder definitions.
HeadSelfClosing
Whether a low-level head element renders as self-closing.
HeadTag
Head element tag marker for low-level head builder definitions.
HeadTextContent
Escaped text-content marker for low-level head builder definitions.
HtmlAttribute
Helpers for constructing low-level HTML attributes in head/document builders.
HttpCookie
Representation of an HTTP cookie.
HttpHeaderName
Represents an HTTP header field name
HttpHeaderValue
Represents an HTTP header field value.
HttpMethod
The Request Method (VERB)
HttpRequest
Read-only HTTP request view exposed to Vorma handlers.
HttpSearchParams
Iterator-style view over URL query/search params.
HttpStatusCode
An HTTP status code (status-code in RFC 9110 et al.).
Middleware
Request-scoped middleware declaration shared by views and resources.
MiddlewareCtx
Context passed to middleware.
Middlewares
Collection of middleware declarations.
Params
Parameters exposed to middleware.
PathConfig
Public URL and API mount path configuration.
PreparedTask
A task with input bound, ready for ExecCtx::run_parallel.
Resource
Resource declaration.
ResourceCtx
Context passed to resource handlers.
Resources
Collection of resource declarations.
ResponseHandle
Mutable response-effect handle.
RuntimeHost
Runtime service that serves Vorma static assets, resources, and views.
SafeHtml
Helpers for explicitly trusted HTML fragments.
ServerConfig
Cargo target that produces the user app server.
SystemTaskClock
Native monotonic clock backed by std::time::Instant.
Task
Stable typed unit of async work.
TaskClockInstant
Monotonic timestamp used for cross-execution-context cache expiry.
TaskEvent
Snapshot emitted by the task runtime.
TaskId
Opaque identity for one task definition inside the current process.
TaskOverrides
Typed task-body substitutions for tests and dry-run task graphs.
Tasks
Owns shared cross-execution-context task state.
TasksOptions
Configuration for a Tasks runtime.
TsDrafter
Builder for supplemental TypeScript declarations.
TsError
TypeScript generation error.
TsExtraType
Extra Rust type to include in generated TypeScript output.
TsGenConfig
Generated TypeScript output configuration.
TypeRegistry
Registry of TypeScript definitions collected while resolving app types.
View
Nested view declaration.
ViewCtx
Context passed to view handlers.
ViewError
View error with an optional client-safe message.
Views
Collection of nested view declarations.

Enums§

HtmlElementDef
Low-level head element definition part.
RawTsPart
Part of a raw TypeScript type expression.
ResourceKind
Generated-client classification for a resource.
TaskError
Error returned while resolving a task.
TaskEventKind
Task-runtime event kind.
TaskEventOutcome
Coarse task outcome for passive observation.
TaskOverrideMode
Policy for tasks that do not have an explicit test override.
TaskRunSource
Task body source that performed real work.
TypeDef
TypeScript definition emitted into the generated file.
TypePhase
Whether a Rust type is being used for serialized output or deserialized input.
TypeRef
TypeScript type reference used by Vorma’s generated contract machinery.
UiVariant
Supported UI adapter.

Constants§

CLIENT_BUILD_ID_HEADER_KEY
Response header carrying the expected Vorma client build ID.
DEFAULT_REQUEST_BODY_LIMIT
Default maximum request body size collected by Vorma handlers.
PUBLIC_STATIC_OUT_NAME_PREFIX
Prefix added to hashed public static asset output filenames.

Traits§

TaskClock
Monotonic clock used by crate::Tasks for TTL expiry.
TaskObserver
Passive task-runtime observer.
Type
Trait implemented by Rust types that can describe their generated TypeScript shape.
ViewErrorClientMsg
Provides an optional client-safe message for handler errors.

Functions§

bind_addr
Read PORT and return 0.0.0.0:<PORT> for deployment-style app servers.
is_build
Whether the current process is running as a Vorma build/live-state entry.
is_dev
Whether the current process is running an app server under Vorma dev mode.

Type Aliases§

BoxError
Boxed application error type used by the default Vorma error parameter.
Result
Result type returned by Vorma public helpers.
TaskResult
Result returned by task functions and task execution.
TsResult
Result type for TypeScript generation helpers.

Derive Macros§

TsGen
Derive Vorma’s TypeScript generation trait for a serializable Rust type.