Heat the oil in a large wok over medium heat and sauté the onion until softened, about 5 minutes. Add the garlic, ginger, turmeric, cumin, and cayenne (to taste) and sauté for another 2 minutes. If the mixture begins to stick to the bottom of the pan, deglaze by adding a few tablespoons of water and use a spatula to loosen the browned bits.

Add the eggplant, tomatoes, salt, and sugar, and toss until the eggplant is well coated with the onion-spice mixture. Cover and cook over medium-low heat until the eggplant is soft but not mushy, about 10 minutes. Serve warm.