You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are two places where we need an RPC wrapper of a function:
In the main funciton of the rpc executable to expose an endpoint. We can always define a wrapper here inline without having to create a wrapper in the module where the function is defined.
At the invocation site where we call an rpc function. We can create a wrapper here as well automatically. But if a function is being called at multiple sites we would like to avoid having to create the wrapper at all call sites, instead we create the wrapper in the module where the function is defined and export it for use everywhere.
Now, instead of creating a record for all rpc symbols from a module, can we instead export them individually, something like this:
module A
(
funcX
, RPC(funcX)
)
where
where the macro RPC would just have an effect of adding a prefix or suffix to the name to create a unique wrapper name. Where we use the RPC wrapper of a function we can use that macro.
To define the wrapper in the module we would have:
We should be able to create an endpoint for any available function as long as the function arguments and the result are serializable.
The text was updated successfully, but these errors were encountered: