Tech
Server functions in Fitz: call the server from a WASM component, no plumbing
TL;DR — Mark an async fn with @rpc and call it from a .fitzv
component as if it were local : let u = get_user(42).await? . The
compiler generates both halves from that one declaration — a
POST /__rpc/get_user endpoint on the server (which can touch the DB,
auth, secrets) and a fetch -based stub on the client — with the same
type shared back and front. No hand-written HTTP handler, no
fetch , no JSON glue, no route strings, no external deps. (Part 7 of
the FitzLiveViews se...
Read the full discussion on Dev.to
This article was aggregated from Dev.to. Click to join the conversation.
View on Dev.to