That is an interesting idea !

I have been looking into rust for some time now, but have not really tried to make any code in it as I cant get my head around this RPC in Rust issue.

I have been looking into how to map values given from data like JSON or msgpack into rust, but I am a bit lost here.

Normally this is done by some kind of reflection or introspection, but I have not found any solid info on this subject.

The raw RPC mapping would be something like

look for a function name on a trait (if I understand the model)

map parameters (runtime check types)

make a call to the function using the given valid parameters.

I like to here if anyone have an idea as to how this may be done elegantly in Rust ?