atproto_codegen/plugins/xrpc_client
The xrpc-client plugin: one whole module of typed Gleam functions that
call the corpus’s query/procedure methods over HTTP through
atproto/xrpc. Unlike types/decode-json (which contribute per-unit
parts the host interleaves), this plugin owns the entire client module
and emits a single WholeFile (its own banner, doc, imports, and every
method’s params/input/output types, typed error union, and function).
Refs in a method’s body resolve against that method’s own nsid and are
then rendered fully qualified (the client module imports every referenced
generated module), reusing emit/def + emit/exprs against a synthetic
object with a sentinel current-module so their same-module shortcut never
fires. Names derive from the method nsid via naming.module_alias, the
same pattern the rest of the tool uses.
Values
pub fn plugin() -> plugin.Plugin