Combine sugar, cocoa, butter, and 2 cups water in a small saucepan; bring to a boil. Boil 5 minutes, stirring until sugar dissolves. Dissolve cornstarch in 1 tablespoon water; add to cocoa mixture, stirring well. Return to a boil. Reduce heat; simmer, stirring until mixture thickens. Remove from heat; stir in vanilla, salt, and raisins. Serve warm or chilled over ice cream or cake. Store in refrigerator.