error: can't find crate

error: can't find crate

我正在尝试使用 this library
但是,cargo build 是这样说的:

   Compiling test v0.1.0 (file:///C:/path/to/project/test)
src\main.rs:1:1: 1:28 error: can't find crate for `jvm_assembler` [E0463]
src\main.rs:1 extern crate jvm_assembler;
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
error: aborting due to previous error
Could not compile `test`.

To learn more, run the command again with --verbose.

我的Cargo.toml是这样的:

[package]
name = "test"
version = "0.1.0"
authors = ["yomizu_rai"]

[dependencies]
jvm-assembler = "*"

src/main.rs就是这个,没有其他源文件。

extern crate jvm_assembler;
use jvm_assembler::*;
fn main() {}

我觉得我的Cargo.toml没有错,src/main.rs也没有错的余地
为什么rustc找不到jvm-assembler?
我该如何解决?

Cargo 只能按名称找到 crates.io 上的箱子。在您的情况下,您需要指定 git URL,请参阅 Cargo 文档中的 section on dependencies