-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rust errors #3
Comments
rusthttps://www.rust-lang.org/zh-CN/learn Cargohttps://doc.rust-lang.org/cargo/index.html https://doc.rust-lang.org/cargo/getting-started/installation.html # generate a new package
$ cargo new hello_world
https://doc.rust-lang.org/cargo/appendix/glossary.html#manifest
https://doc.rust-lang.org/cargo/appendix/glossary.html#package
https://doc.rust-lang.org/cargo/appendix/glossary.html#crate ??? package => binary ??? library => ??? rustchttps://doc.rust-lang.org/rustc/index.html rustdochttps://doc.rust-lang.org/rustdoc/index.html rustwasmhttps://rustwasm.github.io/docs/book/ rust-cli |
ferris-says v0.2.1A Rust flavored replacement for the classic https://crates.io/search?q=ferris_says https://crates.io/crates/ferris-says Cargo.toml [dependencies]
ferris-says = "0.2" https://github.com/mgattozzi/ferris-says ferris-says = "0.2.1"
https://github.com/mgattozzi/ferris-says/blob/master/fsays/Cargo.toml#L22 https://github.com/mgattozzi/ferris-says/blob/master/Cargo.toml#L1 https://github.com/mgattozzi/ferris-says/blob/master/src/lib.rs#L12 #[cfg(not(feature = "clippy"))]
const FERRIS: &[u8] = br#"
\
\
_~^~^~_
\) / o o \ (/
'_ - _'
/ '-----' \
"#;
#[cfg(feature = "clippy")]
const CLIPPY: &[u8] = br#"
\
\
__
/ \
| |
@ @
| |
|| |/
|| ||
|\_/|
\___/
"#; cowsayhttps://crates.io/search?q=cowsay cowsay is a program that generates ASCII art pictures of a cow with a message. cowsay 是一个程序,它可以生成带有信息的奶牛的 ASCII 艺术图片。 |
println 插值https://doc.rust-lang.org/std/macro.println.html fn main() {
println!("🦀 Hello, world!");
println!("\n$ rustc -V");
println!("rustc 1.63.0 (4b91a6ea7 2022-08-08)");
// 调用 function
add(1, 2);
}
// fn 定义 function
fn add(left: usize, right: usize) -> usize {
// {} 插值,占位符
println!("\n🦀 left = {}, right = {}", left, right);
println!("🦀🦀 left + right = {}", left + right);
println!("\n🦀🦀🦀 left = {}, right = {}, left + right = {}", left, right, left + right);
left + right
}
|
rust errors
crate 箱
rustc --explain E0463
A
plugin
/crate
was declared but cannot be found.You need to link your code to the relevant crate in order to be able to use it (through
Cargo
or the-L
option of rustc example).Plugins are crates as well, and you link to them the same way.
https://rustc-dev-guide.rust-lang.org/building/how-to-build-and-run.html#building-the-compiler
The text was updated successfully, but these errors were encountered: