Cook onion, garlic, salt, and pepper in butter in a 1 1/2- to 2-quart heavy saucepan over moderate heat, stirring occasionally, until onion is golden, 6 to 9 minutes. Add curry and cook, stirring, 1 minute.
Add rice and cook, stirring, 1 minute, then add water and bring to a boil. Cover and reduce heat to low, then cook 18 minutes. Remove from heat and let rice stand, covered, 5 minutes, then fluff with a fork. Gently toss with cashews and cilantro.