Preheat your oven to 350°F (175°C). Line a muffin pan with cupcake liners.
In a mixing bowl, whisk together the flour, baking powder, baking soda, and salt. Set aside.
In another bowl, cream together the softened butter and granulated sugar using an electric mixer until light and fluffy.
Add the eggs one at a time, mixing well after each addition. Then, mix in the vanilla extract.
Gradually add the dry flour mixture to the butter mixture, alternating with the coconut milk and rum. Mix until fully combined. Be careful not to overmix.
Gently fold in the crushed pineapple until evenly distributed.
Divide the batter evenly among the cupcake liners, filling each one about ⅔ full.
Bake in the preheated oven for 15-18 minutes, or until a toothpick inserted into the center comes out clean.
Once baked, remove from the oven and let the cupcakes cool in the pan for 5 minutes, then transfer them to a cooling rack to cool completely.
For the frosting, beat the softened butter until creamy. Gradually add the powdered sugar, mixing on low speed until incorporated.
Mix in the coconut cream, rum, and vanilla extract until smooth and fluffy.
Frost the cooled cupcakes with the coconut rum frosting and garnish with toasted coconut flakes.