better way to get Cargo to generate code