json-escape 0.2.0

A highly ergonomic, well-tested, no_std library for streaming JSON string escaping and unescaping. It processes JSON strings with zero-copy slicing and no intermediate allocations, ensuring both high performance and RFC-compliant correctness, ideal for I/O and memory-constrained environments.
Documentation
use std::env;
use std::process::Command;

fn main() {
    // Get the rustc version
    let rustc = env::var("RUSTC").unwrap_or_else(|_| "rustc".to_string());
    let output = Command::new(rustc)
        .arg("--version")
        .output()
        .expect("failed to run rustc --version");
    let version = String::from_utf8(output.stdout).unwrap();

    println!("cargo:rustc-check-cfg=cfg(nightly)");

    // Check if the version string contains "-nightly"
    if version.contains("-nightly") {
        println!("cargo:rustc-cfg=feature=\"simd\"");
        println!("cargo:rustc-cfg=nightly");
    }
}