compiler: generate RPC calls