Background: Most of the stars in the Universe will end their evolution by losing their envelope during the thermally pulsing asymptotic giant branch (TP-AGB) phase, enriching the interstellar medium of galaxies with heavy elements, partially condensed into dust grains formed in their extended circumstellar envelopes. Among these stars, carbon-rich TP-AGB stars (C-stars) are particularly relevant for the chemical enrichment of galaxies. We here investigated the role of the metallicity in the dust formation process from a theoretical viewpoint. Methods: We coupled an up-to-date description of dust growth and dust-driven wind, which included the time-averaged effect of shocks, with FRUITY stellar evolutionary tracks. We compared our predictions with observations of C-stars in our Galaxy, in the Magellanic Clouds (LMC and SMC) and in the Galactic Halo, characterised by metallicity between solar and 1/10 of solar. Results: Our models explained the variation of the gas and dust content around C-stars derived from the IRS Spitzer spectra. The wind speed of the C-stars at varying metallicity was well reproduced by our description. We predicted the wind speed at metallicity down to 1/10 of solar in a wide range of mass-loss rates.