Prepare an 8-inch square baking dish by lining it with parchment paper.
In a medium saucepan, combine sugar, cocoa powder, and salt.
Add heavy cream and butter to the saucepan and stir to combine.
Bring the mixture to a boil over medium heat, stirring constantly.
Once boiling, stop stirring and allow it to boil for 5 minutes without stirring.
Remove the saucepan from heat and let it cool for a minute.
Add vanilla extract and mix well.
If desired, fold in nuts or chocolate chips at this stage.
Pour the mixture into the prepared baking dish and spread evenly.
Let it cool completely at room temperature, then refrigerate for at least 2 hours before cutting into squares.