我正在使用Rocket设置 Rust 服务器,并尝试将它与JWT library一起使用。他们使用不同版本的 *ring* crate,我在以下过程中遇到错误cargo build
:
error: multiple packages link to native library `ring-asm`, but a native library can be linked only once
package `ring v0.12.1`
... which is depended on by `jsonwebtoken v4.0.1`
... which is depended on by `auther v0.1.0 (file:///home/drpytho/x/downloadble/auther)`
links to native library `ring-asm`
package `ring v0.11.0`
... which is depended on by `cookie v0.9.2`
... which is depended on by `rocket v0.3.6`
... which is depended on by `rocket_codegen v0.3.6`
... which is depended on by `auther v0.1.0 (file:///home/drpytho/x/downloadble/auther)`
also links to native library `ring-asm`
我的货物.toml
[package]
name = "auther"
version = "0.1.0"
authors = ["Name <Email@mail.se>"]
[dependencies]
rocket = "0.3.6"
rocket_codegen = "0.3.6"
jsonwebtoken = "4"
serde_derive = "1"
serde = "1"
我读到您应该修复 Cargo 文件中不匹配的依赖项,但我不知道该怎么做。