Cannot find `include_paths` for nettle

141 Views Asked by At

I am pretty new in Rust and I am trying to include the Nettle cryptographic library in a project.

After adding Nettle in my Cargo.toml, whenever I try to run the project I get a

"error[E0425]: cannot find value include_paths in this scope"

when Rust compiles nettle-sys, a dependency of Nettle.

The error is traced down to a certain build.rs file, in a function named try_vcpkg() which ideally returns a Configuration. The function in which the error comes up looks like this:

#[cfg(target_env = "msvc")]
fn try_vcpkg() -> Result<Config> {
    let lib = vcpkg::Config::new()
        .emit_includes(true)
        .find_package("nettle")?;

    Ok(Config {
        have_cv448: check_cv448(&include_paths),
        include_paths,
    })
}

I've installed all libraries mentioned here and here . I run Windows 10. Visual Studio is installed, and "C:\msys64\usr\bin" is included in my path.

Is it probable that the compilation of the bindings mentioned in the aforementioned links does not happen automatically and I have to do it manually?

Does that "target_env = "msvc"" play some role?

I know Windows is not the best OS to run Rust (or to program in general), but it's my employer's laptop and I don't even have the alternative of trying in a VM.

0

There are 0 best solutions below