1. Preheat oven to 350ºF (180ºC.)
2. Spread the sugar in an even layer in the bottom of a large, heavy-duty saucepan or Dutch oven. Cook the sugar over moderate heat until the edges liquefy and being to caramelize. Use a heatproof utensil to gently drag the liquefied sugar toward the center of the pan, encouraging the sugar to melt evenly.
3. Once the sugar is melted, it was caramelize rather quickly. When it starts to smoke, but before it burns, turn off the heat and stir in the coffee. (The mixture will bubble and seize a bit. Be sure to avert your face and you may wish to wear oven mitts.)
4. If the caramel has seized up in places, stir it gently over low heat until smooth. Then add the butter and salt, and stir until melted, then stir in both chocolates until smooth*.
5. Mix in the eggs, then the flour. Stir in the rum or vanilla extract.
6. Pour the mixture into the pre-baked tart shell, then bake for 15 to 20 minutes, just until the filling starts to rise and crack at the edges but the center is still jiggly. Do not overbake.
Remove from oven and let cool completely before slicing.