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