mcpField
R
rust

rust

github.com/fandhe-ai开发4965 次安装4 天前更新
代码仓库

关于 rust

按任务整理 Rust 官方文档资源的参考技能,适用于学习和开发。内容涵盖语言特性、Cargo、编译器工具、不安全代码、嵌入式开发和 CLI 项目。

主要功能

  1. 01按任务定位参考类别
  2. 02语言概念与语法示例
  3. 03Cargo 和 rustc 文档
  4. 04Unsafe Rust、FFI 与嵌入式参考
  5. 05CLI 开发和标准库主题

适用场景

  1. 01学习所有权、trait 或并发
  2. 02查询 Cargo 或编译器选项
  3. 03研究不安全 Rust 与 FFI 模式
  4. 04查阅嵌入式或 CLI 开发资料

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/fandhe-ai/agent-reference-skills --skill rust

安装后在 Claude Code 中输入/rust确认已加载。

包含的文件

除 SKILL.md 外,安装时一起下载的参考资料和脚本。

references/book/
01-getting-started.md
02-guessing-game.md
03-common-programming-concepts.md
04-ownership.md
05-structs.md
06-enums-and-pattern-matching.md
07-packages-crates-modules.md
08-common-collections.md
09-error-handling.md
10-generic-types-traits-lifetimes.md
11-testing.md
12-io-project.md
13-iterators-closures.md
14-cargo-crates-io.md
15-smart-pointers.md
16-fearless-concurrency.md
17-async-await.md
18-oop.md
19-patterns-and-matching.md
20-advanced-features.md
21-final-project.md
README.md
references/by-example/
01-hello-world.md
02-primitives.md
03-custom-types.md
04-variable-bindings.md
05-types.md
06-conversion.md
07-expressions.md
08-flow-of-control.md

详细介绍

Rust 参考文档

Rust——一种系统编程语言。通过所有权、借用、生命周期和类型系统保证内存安全与线程安全。 从官方文档 (doc.rust-lang.org) 中整理出 14 项主要资源。 可在查询语言规范、代码编写、构建(Cargo)、Unsafe Rust、嵌入式开发和 CLI 开发时参考。 适用版本:Rust 1.99.1 (2026-10-13)。The Reference / Edition Guide / rustc Book / rustdoc Book 为 rust-lang/rust 标签 1.99.1 随附版本(reference@82da570、edition-guide@5a14f72)。

目录结构

skills/rust/
  SKILL.md
  references/
    book/
      README.md
      01-getting-started.md
      02-guessing-game.md
      03-common-programming-concepts.md
      04-ownership.md
      05-structs.md
      06-enums-and-pattern-matching.md
      07-packages-crates-modules.md
      08-common-collections.md
      09-error-handling.md
      10-generic-types-traits-lifetimes.md
      11-testing.md
      12-io-project.md
      13-iterators-closures.md
      14-cargo-crates-io.md
      15-smart-pointers.md
      16-fearless-concurrency.md
      17-async-await.md
      18-oop.md
      19-patterns-and-matching.md
      20-advanced-features.md
      21-final-project.md
    by-example/
      README.md
      01-hello-world.md
      02-primitives.md
      03-custom-types.md
      04-variable-bindings.md
      05-types.md
      06-conversion.md
      07-expressions.md
      08-flow-of-control.md
      09-functions.md
      10-modules.md
      11-crates.md
      12-cargo.md
      13-attributes.md
      14-generics.md
      15-scoping-rules.md
      16-traits.md
      17-macros.md
      18-error-handling.md
      19-std-library-types.md
      20-std-misc.md
      21-testing.md
      22-unsafe-operations.md
      23-compatibility.md
      24-meta.md
    reference/
      README.md
      abi.md
      attributes.md
      behavior-considered-undefined.md
      conditional-compilation.md
      const-evaluation.md
      crates-and-source-files.md
      glossary.md
      influences.md
      inline-assembly.md
      items.md
      lexical-structure.md
      linkage.md
      macro-ambiguity.md
      macros.md
      memory-model.md
      names.md
      notation.md
      panic.md
      patterns.md
      runtime.md
      special-types-and-traits.md
      statements-and-expressions.md
      syntax-index.md
      type-system.md
      unsafety.md
    cargo/
      README.md
      cargo-guide.md
      commands.md
      faq.md
      getting-started.md
      reference-build-scripts.md
      reference-cargo-toml.md
      reference-config.md
      reference-environment-variables.md
      reference-external-tools.md
      reference-features.md
      reference-lints.md
      reference-manifest.md
      reference-overriding-dependencies.md
      reference-profiles.md
      reference-publishing.md
      reference-registries.md
      reference-registry-auth.md
      reference-resolver.md
      reference-semver.md
      reference-source-replacement.md
      reference-specifying-dependencies.md
      reference-unstable.md
      reference-workspaces.md
    rustc/
      README.md
      check-cfg.md
      codegen-options.md
      command-line-arguments.md
      contributing.md
      exploit-mitigations.md
      instrument-coverage.md
      jobserver.md
      json.md
      linker-plugin-lto.md
      lints.md
      platform-support.md
      print-options.md
      profile-guided-optimization.md
      remap-path-prefix.md
      sanitizers.md
      symbol-mangling.md
      targets.md
      tests.md
    rustdoc/
      README.md
      advanced-features.md
      attributes.md
      command-line.md
      documentation-tests.md
      how-to-read.md
      how-to-write.md
      linking-to-items-by-name.md
      lints.md
      passes.md
      references.md
      scraped-examples.md
      unstable-features.md
      what-is-rustdoc.md
    nomicon/
      README.md
      atomics.md
      beneath-std.md
      concurrency.md
      conversions.md
      data-layout.md
      ffi.md
      implementing-arc-and-mutex.md
      implementing-vec.md
      meet-safe-and-unsafe.md
      other-reprs.md
      ownership-based-resource-management.md
      ownership.md
      uninitialized.md
      unwinding.md
    edition-guide/
      README.md
      advanced-migrations.md
      creating-new-project.md
      rust-2015.md
      rust-2018.md
      rust-2021.md
      rust-2024.md
      transitioning-existing-project.md
      what-is-edition.md
    cli/
      README.md
      config-files.md
      error-handling.md
      human-communication.md
      in-depth-docs.md
      in-depth-exit-code.md
      in-depth-human-communication.md
      in-depth-signal-handling.md
      machine-communication.md
      packaging-distribution.md
      parsing-arguments.md
      project-setup.md
      testing.md
    embedded/
      README.md
      appendix.md
      collections.md
      concurrency.md
      design-patterns.md
      installation.md
      interoperability.md
      intro.md
      memory-mapped-registers.md
      no-std.md
      peripherals.md
      portability.md
      static-guarantees.md
      tips-for-embedded-c-devs.md
      unsorted.md
    stdlib/
      README.md
      module-categories.md
      overview.md
    errors/
      README.md
      error-categories.md
    unstable/
      README.md
      feature-categories.md
    rustlings/
      README.md
      overview.md
  samples/
    README.md
    async-tokio.md
    collections.md
    concurrency-threads.md
    enums-and-pattern-matching.md
    error-handling.md
    iterators-and-closures.md
    ownership-and-borrowing.md
    structs-and-methods.md
    testing.md
    traits-and-generics.md
  scripts/
    README.md
    build.md
    dependencies.md
    generate.md
    install.md
    lint.md
    publish.md
    test.md

探索步骤

根据任务查找类别,再通过类别 README.md 找到目标页面:

  1. 在下方映射表中查找与任务对应的类别
  2. 参阅该类别的 references/{category}/README.md,找到目标页面
  3. Read 对应的 .md 文件,查看详细信息

任务 → 类别映射

任务类别参考 README
学习语言入门、所有权、借用、生命周期、结构体、Enum、特征、泛型、并发和 asyncbookreferences/book/README.md
通过代码示例快速查看语言功能,查询语法快速参考by-examplereferences/by-example/README.md
查询严格的语言规范、语法、类型系统、内存模型、ABI、UB 定义、panic / unwinding、术语表和语法符号索引referencereferences/reference/README.md
查询 Cargo.toml、Workspaces、Features、Profiles、依赖项指定和 crates.io 发布cargoreferences/cargo/README.md
查询 rustc 编译器选项、--print、路径 remap、lint、target、sanitizer、PGO 和 LTOrustcreferences/rustc/README.md
查询文档生成、doctest、文档注释语法和 intra-doc linksrustdocreferences/rustdoc/README.md
查询 Unsafe Rust、FFI、不健全模式、Vec/Arc 实现和原子操作nomiconreferences/nomicon/README.md
查询 Rust 2015/2018/2021/2024 版本差异和迁移方法(包括大型工作区、宏和非 Cargo 项目的迁移)edition-guidereferences/edition-guide/README.md
查询 CLI 应用开发、clap、退出代码和信号处理clireferences/cli/README.md
查询嵌入式开发、no_std、HAL、外设和 memory-mapped registersembeddedreferences/embedded/README.md
查询标准库的模块结构、Collections、I/O 和 Concurrency 概览stdlibreferences/stdlib/README.md
查询编译器错误代码(E0XXX)的查阅方法和典型示例errorsreferences/errors/README.md
查询 Nightly 专属功能、feature 标志和 -Z 标志unstablereferences/unstable/README.md
查询 Rustlings 练习环境和学习工作流rustlingsreferences/rustlings/README.md
了解典型用法(所有权、async、错误处理、集合等)samplessamples/README.md
了解安装、构建、测试、lint、依赖管理和发布命令scriptsscripts/README.md

评论

支持 Markdown