rust 学习笔记

  1. 基本类型使用 u32 u64 i32 f32 , str String 等
  2. 泛型简单实现 Vector HashMap
  3. 选择 循环结构 if for loop while
  4. 模块定义及引用 mod pub
  5. 面向对象 struct 类型 impl 方法定义
  6. 发布程序到 crates.io

shell cargo new cargo login # 需要一个token cargo publish # 需要 Cargo.toml 中有足够的说明 cargo install # 安装crates.io

  1. 其他