Whisk together the coconut milk, sugar, water, vanilla, cocoa powder and salt in a saucepan.
Place over a medium heat and stir regularly until the sugar has dissolved and the mixture is almost boiling.
Remove from the heat and add the chopped chocolate, stir until smooth.
Pour into a large jug, cover and refrigerate until completely cold; preferably overnight.
Once the mixture is chilled, add the rum (if using) and whisk well until smooth (the coconut milk may separate a bit as it chills).
Churn in an ice cream maker according to the manufacturers instructions. Transfer to a freezer-proof container, cover and freeze for a couple of hours before serving.