Heriot-Watt University is a public university based in Edinburgh, established in 1821 as the world's first mechanics' institute.