Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

rust-guide

БесплатноБез исполняемых скриптовНе проверен

Use to explain Rust language characteristics and established practical patterns, and to apply that knowledge in Rust development. Covers ownership, borrowing…

buYoungот buYoung★ 21 звезда на GitHub

Об этом скилле

Rust Guide

Explain Rust's characteristics and established practical patterns by topic. Connect how the language and libraries work to recommended usage, applicable conditions, costs, pitfalls, and exceptions. Use examples that make these relationships concrete.

Explain the Topic

Start with the concept needed to answer the question, then connect it to practice. For a substantial topic, cover mechanism → practical pattern → applicable conditions → pitfalls and exceptions → example. This is a way to develop the explanation, not a required response template. A narrow question may need only a paragraph or a small example.

  • Explain why a pattern works: ownership and resource lifetime, type guarantees, execution and synchronization, memory representation, or compilation behavior.
  • Develop the suitable std/core approach where it is useful. Explain what a dependency adds and what maintaining an equivalent implementation would cost; fewer dependencies alone do not justify writing a scheduler or unsafe allocator.
  • Treat clone, dyn Trait, Arc<Mutex<T>>, allocation, and abstractions according to their semantics and costs. A useful default has conditions and exceptions.
  • Use comparisons when the question involves alternatives. Classify their roles before comparing names, and use the library selection policy for new dependency recommendations.
  • Relate examples to observable behavior: who owns a buffer, which failure a caller can handle, when a task ends, or which configuration reaches a target.

Match depth to the reader's question. Explain the underlying constraint when discussing a diagnostic; connect an established pattern to the supplied code when application is requested. Keep small examples focused, and explain any omitted runtime, device setup, dependency features, or failure handling that matters to their use.

Account for the Environment

Bring in environmental facts when they change the explanation: core/alloc/std, host and target, OS threads or interrupts, runtime, MSRV and edition, dependency features, public API, and deployment CPU baseline. A general language question needs no repository inspection. Use supplied code and manifests for project-specific questions, and state assumptions where relevant facts are unavailable.

Distinguish workload costs such as I/O waiting, computation, contention, retained memory, startup, and build time. Explain the likely mechanism before suggesting a measurement; a performance hypothesis becomes a speedup claim only with comparable results.

Route by the Question

Read the relevant section of the closest reference first. Long references have contents tables; expand to neighboring sections only when their concepts are needed. Follow cross-topic links for relationships such as ownership and allocation, async and cancellation, or workspace features and no_std.

Task signal Read
Ownership, borrowing, lifetimes, shared ownership, interior mutability Ownership and borrowing, then parameter and return types or shared ownership
Drop, drop order, RAII guards, cleanup on scope exit RAII and Drop
Newtype, invariants, typestate, builders, non_exhaustive Type patterns
Enum/generic/dyn, dyn compatibility, sealed traits, async fn in traits Dispatch
Lookup, ordering, queues, hashing, collection capacity Collection semantics and representation, then the relevant operation
Graphs, trees, parent pointers, cyclic structures Graphs and trees
Allocation, buffer reuse, arena/pool, allocator, retained memory Memory and allocation
Error types, std-only implementations, thiserror, stable recovery information The error model, then manual implementation
? and From conversions, anyhow, error context and chains, exit codes Propagation or reporting
Panic or Result, unwinding, abort, catch_unwind Panics
Function/module/crate separation, visibility, core and adapters [Modules and crate boundaries
Полный SKILL.md на GitHub

Установить rust-guide в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

evals/README.mdevals/evals.jsonreferences/practices/api-design.mdreferences/practices/async-and-parallel-execution.mdreferences/practices/build-configuration.mdreferences/practices/collections.mdreferences/practices/compile-times.mdreferences/practices/compiler-diagnostics.mdreferences/practices/concurrency.mdreferences/practices/crate-compatibility.mdreferences/practices/embedded-and-no-std.mdreferences/practices/error-propagation-and-reporting.mdreferences/practices/error-types.mdreferences/practices/ffi.mdreferences/practices/graphs-and-trees.mdreferences/practices/library-selection.mdreferences/practices/lints.mdreferences/practices/memory-and-allocation.mdreferences/practices/modules-and-crate-boundaries.mdreferences/practices/ownership-and-borrowing.mdreferences/practices/panics.mdreferences/practices/performance-measurement.mdreferences/practices/performance-optimization.mdreferences/practices/raii-and-drop.mdreferences/practices/simd.mdreferences/practices/synchronization.mdreferences/practices/traits-and-dispatch.mdreferences/practices/type-design.mdreferences/practices/unsafe-rust.mdreferences/practices/webassembly.mdreferences/practices/workspaces-and-monorepos.mdreferences/versions/1.100.mdreferences/versions/1.80.mdreferences/versions/1.81.mdreferences/versions/1.82.mdreferences/versions/1.84.mdreferences/versions/1.85.mdreferences/versions/1.86.mdreferences/versions/1.87.mdreferences/versions/1.88.md

FAQ

Что делает скилл rust-guide?

Use to explain Rust language characteristics and established practical patterns, and to apply that knowledge in Rust development. Covers ownership, borrowing, lifetimes, traits and API design, collections, memory allocation, error handling, async execution and CPU parallelism, synchronization, module and crate boundaries, Cargo workspaces and monorepos, library selection, performance and SIMD, WebAssembly, embedded/no_std, unsafe/FFI, compiler diagnostics, build configuration, and MSRV/edition compatibility. Use for questions about how Rust works, idiomatic ways to structure code, why a compiler constraint exists, when a pattern or library fits, and its costs and exceptions. Connects mechanisms to practical examples, including std/core approaches and curated ecosystem libraries. Uses stable Rust with explicit API, edition, and target requirements; explains relevant nightly alternatives separately.

Как установить скилл rust-guide?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл rust-guide запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить rust-guide с