As we saw in the previous recipes in this chapter, macros can save a lot of writing and provide convenience functions without having to rethink the entire application architecture. Consequently, the Rust standard library provides several macros for a range of features that might otherwise be surprisingly complex to implement. One example is cross-platform prints—how would that work? Is there an equivalent way to output console text for every platform? What about color support? What is the default encoding? There are a lot of questions, which is an indicator of how many things need to be configurable—yet in a typical program, we only call print!("hello") and it works. Let's see what else there is.
United States
Great Britain
India
Germany
France
Canada
Russia
Spain
Brazil
Australia
Singapore
Hungary
Ukraine
Luxembourg
Estonia
Lithuania
South Korea
Turkey
Switzerland
Colombia
Taiwan
Chile
Norway
Ecuador
Indonesia
New Zealand
Cyprus
Denmark
Finland
Poland
Malta
Czechia
Austria
Sweden
Italy
Egypt
Belgium
Portugal
Slovenia
Ireland
Romania
Greece
Argentina
Netherlands
Bulgaria
Latvia
South Africa
Malaysia
Japan
Slovakia
Philippines
Mexico
Thailand