无法使用来自 git 存储库的 alacritty 依赖项
Cannot use alacritty dependency from git repository
我正在尝试使用 alacritty
作为 Git 的依赖项作为 stated in the docs。我收到此错误:
error[E0432]: unresolved import `alacritty`
--> src\main.rs:1:5
|
1 | use alacritty;
| ^^^^^^^^^ no `alacritty` external crate
要创建 MRE,请使用 cargo new hello_world --bin
创建一个新的 Cargo 项目,将 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" }
Alacritty 是一个可执行文件。您不能将可执行文件用作依赖项,因为它们不是库。
作为, alacritty uses another crate called alacritty_terminal。也许这就是你要找的?如果没有,您可能希望向开发人员提出一个问题,解释您的需求并建议一种重组代码的方法。
我正在尝试使用 alacritty
作为 Git 的依赖项作为 stated in the docs。我收到此错误:
error[E0432]: unresolved import `alacritty`
--> src\main.rs:1:5
|
1 | use alacritty;
| ^^^^^^^^^ no `alacritty` external crate
要创建 MRE,请使用 cargo new hello_world --bin
创建一个新的 Cargo 项目,将 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" }
Alacritty 是一个可执行文件。您不能将可执行文件用作依赖项,因为它们不是库。
作为