Is there a list of all cfg features?

前端 未结 3 956
太阳男子
太阳男子 2020-12-04 23:03

Rust has the ability to check configuration at build time with, e.g., #[cfg(target_os = \"linux\")] or if cfg!(target_os = \"linux\") {...}, where

3条回答
  •  执笔经年
    2020-12-04 23:23

    See also https://internals.rust-lang.org/t/all-the-rust-features/4322 for a comprehensive list of features.

    Bear in mind that some / most of the features won't be stabilized so will only be available in nightly for some time and are subject to breaking improvements / upgrades until they are either stabilized or discontinued.

    Features in rust nightly is survival of the fittest.

提交回复
热议问题