HAMILTON, Ontario — Up on the third floor of a commercial building near the city’s edge is a vision of Canada’s future.

To the sound of throbbing music, hundreds of people jockey around the marijuana-infused products laid out for sale in a pop-up cannabis market. Marijuana cinnamon buns. Marijuana cereal bars and gluten-free cookies. Marijuana foot scrub, bath bombs, lip chap. Marijuana mixed nuts, marijuana chewy candies and marijuana cherry tarts.

Amid a haze of smoke, from people taking hits of cannabis distillate from “rigs,” or high-tech bongs, sits a portable Tim Hortons coffee urn, offering shoppers a cannabis version of the classic Canadian beverage — a double double, or double cream and double sugar — infused with tetrahydrocannabinol, the chemical that causes a high.

On Wednesday, after 95 years of prohibition, Canada will become the second country in the world to legalize cannabis, after Uruguay — a country with less than one-10th its population.