How to Make It
Place rice in a deep saucepan and rinse rice with cold water until water runs clear. Let rice soak in cold water 20 minutes. Drain rice, and add cold water to cover by 2 inches. Bring to a boil over medium-high. Reduce heat and simmer until rice is tender, about 10 minutes. Pour rice through a fine wire-mesh strainer, and discard cooking liquid. Return rice to saucepan, and cover with a clean kitchen towel. Let rice steam until fluffy, about 5 minutes.
Meanwhile, heat a large skillet over medium. Add sesame seeds and toast, stirring, until golden brown, about 30 seconds. Tip seeds into a small bowl; set aside. Add oil to pan and, when hot, add curry leaves, if using. When the curry leaves crackle, add the red onions and cumin, and cook, stirring often, until the onions are soft, golden, and sweet, about 15 minutes. Stir in the tamarind paste, salt, black pepper, and cayenne. Remove pan from heat.
Using a fork, add rice to onion mixture. Return pan to heat over medium, and fold rice into onion mixture until fully incorporated and hot, about 5 minutes. Stir in the sesame seeds. Remove from heat, and serve immediately.