找不到nettle
我在Rust中很新,我正在尝试将Nettle密码库包括在一个项目中。
在我的货物中添加荨麻后,每当我尝试运行项目时,我都会得到一个
“错误[E0425]:在此范围中找不到值
当Rust编译Nettle-Sys(荨麻的依赖)时。
该错误可追溯到一个名为try_vcpkg()的函数中的一个构建。RS文件,该函数理想地返回配置。出现错误的函数看起来像这样:
#[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,
})
}
我已经安装了所有提到的库此处和在这里。 我运行Windows10。Visual Studio已安装,并且“ C:\ msys64 \ usr \ bin”包含在我的路径中。
上述链接中提到的绑定的汇编是否可能不会自动发生,我必须手动进行?
那“ target_env =“ msvc””是否扮演角色?
我知道Windows不是生锈的最佳操作系统(或一般编程),但这是我的雇主笔记本电脑,我什至没有尝试使用VM的选择。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论