Recipe: call a server function
generated Luau client · trusted JavaScript handler · about 25 minutesDeclare one public query, generate its typed Luau client, run its trusted handler locally, and correlate the asynchronous result before showing it.
You will send a name from Luau to greeting.message.v1. The local backend validates it, returns a greeting, and the generated decoder admits the result before UI state changes.
The declaration is the shared contract. Luastra uses it to validate the trusted handler boundary and generate client functions; the handler itself is never bundled into client Luau.
A Server function is not a remote Luau function call. It is an asynchronous request to trusted JavaScript code through a declared, validated, versioned contract.