Implement client.c in plain rust

Implement the client.c in plain rust but still depend on on the caller.c