For the toasted coconut: Preheat the oven to 350 degrees F. Spread the coconut evenly onto a sheet pan, then bake for about 15 minutes, stirring the coconut every five minutes, until golden brown and crispy. Set aside to cool
For the pastry cream: Put the milk in a saucepan over medium-high heat, and heat until it reaches a scalding temperature (180 degrees F), when bubbles begin to form on the side of the pan, just before the boiling point.
Meanwhile, whisk the sugar, egg yolks, and cornstarch together.
Once the milk is scalding, temper the egg mixture and milk by pouring milk, a little at a time, over the eggs while continuously whisking. Pour everything back into the saucepan and return to the stove over medium-high heat.
Cook while whisking until the pastry cream thickens. It should be the consistency of pudding. Once the cream reaches desired thickness, remove from heat and whisk in the vanilla, coconut milk, and rum.
Chill the pastry cream in an ice bath before spooning or piping into the eclairs.
For the glaze on top: Whisk together the confectioner’s sugar and milk or water, until smooth. Dip the top of each eclair into the icing, then top with the toasted coconut. Enjoy!