diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d287c2d --- /dev/null +++ b/.gitignore @@ -0,0 +1,22 @@ +# Build and Release Folders +bin-debug/ +bin-release/ +[Oo]bj/ +[Bb]in/ + +# Executables +*.swf +*.air +*.ipa +*.apk +*.log +*.exe +*.lock +logs/ +# Project files, i.e. `.project`, `.actionScriptProperties` and `.flexProperties` +# should NOT be excluded as they contain compiler settings and other important +# information for Eclipse / Flash Builder. + +# 忽略名为__pycache__的目录及其所有内target/ +*/node_modules/ +*/target/ \ No newline at end of file diff --git a/rust_docs/00初始化项目.md b/rust_docs/00初始化项目.md new file mode 100644 index 0000000..a2b3a35 --- /dev/null +++ b/rust_docs/00初始化项目.md @@ -0,0 +1,12 @@ +# https://colobu.com/rust100/ + + +## 创建Rust项目 +```bash +cargo new my_rust_project +cd my_rust_project +``` +## 运行与调试项目 +```bash +cargo run +``` \ No newline at end of file diff --git a/rust_docs/01语法.md b/rust_docs/01语法.md new file mode 100644 index 0000000..366360c --- /dev/null +++ b/rust_docs/01语法.md @@ -0,0 +1,17 @@ +# 参考文档 https://colobu.com/rust100/ + +## 注释 +```rust +// rust中的注释也是 // + +``` + +## 函数 +```rust +// `fn` ( ) -> { } +fn greeting() -> &'static str { + // TODO: fix me 👇 + "I'm ready to __!" +} +``` +- greeting没有输入参数,返回一个字符串切片引用(&'static str)。 \ No newline at end of file