H1B stamping in Canada, Urgent

Hi, My nationality is Indian. Currently I’m residing in USA. I am planning to attend my H1B stamping in Canada. My question is if I get 221g, and I go to India(because I can’t return to USA) and after 2-3 weeks( or more) Consulate is ready to approve the visa, so should I appear(or send my passport for stamping) in US embassy in Canada or I can appear in US emabassy in India.

legally you are not supposed to mail your passport out of country