Make the pineapple syrup: In a medium saucepan, combine the granulated sugar, brown sugar, and water. Heat over medium heat, stirring until the sugar dissolves. Bring the mixture to a boil, then reduce the heat to medium-low and simmer for 5 minutes. Remove from heat and stir in the rum, if using. Let the syrup cool to room temperature.
Prepare the pineapple: Place the pineapple wedges in a shallow dish and pour the cooled syrup over them. Let the pineapple soak for at least 30 minutes, or up to 2 hours in the refrigerator.
Make the coconut crust: In a medium bowl, combine the shredded coconut, flour, confectioners' sugar, and salt. Stir in the melted butter and vanilla extract until the mixture forms a crumbly crust.
Coat the pineapple: Remove the pineapple wedges from the syrup, letting any excess liquid drip off. Dip each pineapple wedge into the coconut crust mixture, pressing the coconut onto the pineapple to adhere.
Fry the pineapple: Heat about 2-3 inches (5-7.5 cm) of vegetable oil in a deep frying pan over medium-high heat until it reaches 350°F. Fry the coconut-coated pineapple wedges in batches, if necessary, until golden brown, about 2-3 minutes per side. Drain the pineapple on paper towels.
Dust with confectioners' sugar: Dust the fried pineapple wedges with confectioners' sugar before serving.