RST codes