Toast the coconut in a dry pan over medium heat, stirring constantly until lightly golden. Tip onto a plate and cool completely.
Run a thin layer of cream of coconut around the rim of your glass. Press into the toasted coconut and rotate slowly to coat. Chill the glass in the freezer.
Add the rum, cream of coconut, and lime juice to a cocktail shaker with a generous handful of ice.
Shake hard for about 15 seconds until well chilled.
Strain into the prepared glass.
Garnish with a lime twist or lime slice.
Notes
Cream of Coconut: This is a very sweet coconut mixture. Full recipe at cream of coconut. Just coconut cream and sugar stirred until dissolved. Keeps in the fridge for two weeks.Use desiccated coconut for the rim if you have it. If using shredded coconut, blitz briefly in a blender first to make it finer so it sticks better. Make a bigger batch and store in an airtight jar - it keeps well and is ready to go for future cocktails.Shake hard, you want the drink properly cold and slightly diluted to balance the coconut and lime.You could swap the white rum for coconut rum for an extra coconut hit. The flavor will be sweeter and less natural than using cream of coconut, but it works if that's what you have.