Add event marshalling on the client side

[#79618110]