Preheat an oven to 300°F.
Place the nuts in a bowl. In a small, heavy saucepan over medium-low heat, warm the olive oil. Add the rosemary and stir until aromatic, about 1 minute. Pour the seasoned oil over the nuts. Add the sugar, cumin, salt, black pepper and cayenne and stir to coat the nuts evenly. Transfer the nuts to a baking pan.
Bake, stirring occasionally, until the nuts are toasted, about 20 minutes. Transfer to a plate and let cool completely. Can be made 1 week in advance
Meanwhile, heat a large pot of salted water. Cook the green beans until al dente, about 5 minutes. Drain in a colander and run under cool water to stop the cooking. Toss the beans in a mixing bowl with a little olive oil, then transfer to a serving platter and top with the rosemary nuts.