Use CG library to generate proxy code