Error running kafka in cargo

error: failed to run custom build command for `rdkafka-sys v4.8.0+2.3.0`

Caused by:
  process didn't exit successfully: `C:\Users\trueb\OneDrive\Desktop\dope\dope-rs\target\debug\build\rdkafka-sys-9263c5b01c6b21ca\build-script-build` (exit code: 101)
  --- stdout
  Cloning librdkafka

  --- stderr
  Building and linking librdkafka statically
  Running command: "cp -a librdkafka/. C:\Users\trueb\OneDrive\Desktop\dope\dope-rs\target\debug\build\rdkafka-sys-1bb6e35733dddb53\out" in dir: .
  thread 'main' panicked at C:\Users\trueb\.cargo\registry\src\index.crates.io-6f17d22bba15001f\rdkafka-sys-4.8.0+2.3.0\build.rs:38:19:
  Command failed with error: program not found
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
    let line = io::stdin();
    let mut billionaire = "";
    let line = io::BufReader::new(line).lines();
    // println!("{:?}", line);
    for line in line {
        let line = line.unwrap();
        billionaire = &line;
        break;
    }
    let producer: FutureProducer = rdkafka::ClientConfig::new()
        .set("bootstrap.server", "localhost:9092")
        .set("acks", "all")
        .set("retries", "4")
        .set("retry.backoff.ms", "600")
        .create()
        .unwrap();
    // let user_record = FutureRecord::to("chat").payload("");
    let billionaire_record = FutureRecord::to("billionaire").payload(billionaire);
    println!("{:?}", billionaire_record);

Please post the full error message. Are you sure you have the necessary setup to install librdkafka? Most notably:

By default a submodule with the librdkafka sources pinned to a specific commit will be used to compile and statically link the library.

Do you have a librdkafka/ directory in your project that contains the source code of librdkafka?

I solved the error by adding cmake feature

rdkafka = { version = "0.37.0", features = ["cmake_build"] }