我正在尝试使用alacritty作为Git作为在文档中注明的依赖项。我知道这个错误:
error[E0432]: unresolved import `alacritty`
--> src\main.rs:1:5
|
1 | use alacritty;
| ^^^^^^^^^ no `alacritty` external crate若要创建MRE,请使用cargo new hello_world --bin创建一个新的货运项目,将main.rs替换为:
use alacritty;
fn main() {
println!("Hello world! :-)")
}和Cargo.toml,包括:
[package]
name = "my-project"
version = "0.1.0"
authors = ["rsheink"]
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
alacritty = { git = "https://github.com/alacritty/alacritty.git", tag = "v0.4.3" }发布于 2020-07-08 11:36:27
Alacritty是一个可执行文件。不能将可执行文件用作依赖项,因为它们不是库。
正如mer Erden指出,alacritty 用另一个箱子称为终端。也许这就是你要找的?如果没有,您可能希望与开发人员一起解释您的需求,并建议重新组织代码的方法。
https://stackoverflow.com/questions/62793835
复制相似问题