cfg_compiler 0.1.0

cfg setup
Documentation
  • Coverage
  • 75%
    3 out of 4 items documented0 out of 3 items with examples
  • Size
  • Source code size: 4.77 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.13 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 11s Average build duration of successful builds.
  • all releases: 11s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • quratoop

cfg-compiler

this crate is for use in the build script section.

function app

The app function is used to configure the cfg setup for relaxed work with the correct compiler. It configures the following five cfg attributes (dev, beta, stable, nightly, bootstrap), which can be used to adapt the code to the corresponding compiler (e.g., you provide a function under cfg(nightly) that uses optimizations that it otherwise wouldn't be able to use). The bootstrap cfg is used to obfuscate any nightly functions to maintain stability guarantees.

// main.rs

fn main() -> Result<(), Box<dyn std::error::Error>> {
    /* ... run other stuff */
    cfg_compiler::app()?;
    Ok(())
}

documentation

need someone for optimize the documentation or the README file.