Fitz Framework Lets WASM Components Call Server Functions Without HTTP Boilerplate
Fitz, a full-stack web framework, introduces an @rpc decorator that automatically generates both a server-side HTTP endpoint and a client-side fetch stub from a single async function declaration. Developers can call server logic directly from a WebAssembly component as if it were a local function, using standard await syntax, with no hand-written HTTP handlers, fetch calls, or JSON parsing required. The same type definition is compiled for both the server and the WASM client, eliminating type drift between front and back ends. This is the seventh installment in a series documenting Fitz's component model, and the feature draws conceptual parallels to server actions in Next.js, tRPC, and Remix. The framework handles serialization, routing, and async state updates automatically, requiring no external dependencies beyond the built-in HTTP stack.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.


Discussion (0)
Log in to join the discussion and vote.
Log in