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.
Germany
Slovakia
Canada
Brazil
Singapore
Hungary
Philippines
Mexico
Thailand
Ukraine
Luxembourg
Estonia
Lithuania
Norway
Chile
United States
Great Britain
India
Spain
South Korea
Ecuador
Colombia
Taiwan
Switzerland
Indonesia
Cyprus
Denmark
Finland
Poland
Malta
Czechia
New Zealand
Austria
Turkey
France
Sweden
Italy
Egypt
Belgium
Portugal
Slovenia
Ireland
Romania
Greece
Argentina
Malaysia
South Africa
Netherlands
Bulgaria
Latvia
Australia
Japan
Russia