跳转到主要内容
此内容尚未提供您的语言版本,正在以英文显示。

Rust Best Practices

技能 已验证 活跃

Guide for writing idiomatic Rust code based on Apollo GraphQL's best practices handbook. Use this skill when: (1) writing new Rust code or functions, (2) reviewing or refactoring existing Rust code, (3) deciding between borrowing vs cloning or ownership patterns, (4) implementing error handling with Result types, (5) optimizing Rust code for performance, (6) writing tests or documentation for Rust projects.

目的

To guide developers in writing idiomatic, performant, and robust Rust code by adhering to established best practices.

功能

  • Idiomatic Rust coding styles
  • Performance optimization techniques
  • Robust error handling with Result types
  • Effective testing strategies
  • Guidelines for generics and dispatch
  • Best practices for documentation and comments

使用场景

  • Writing new Rust code or functions
  • Reviewing or refactoring existing Rust code
  • Deciding between borrowing vs cloning or ownership patterns
  • Implementing error handling with Result types
  • Optimizing Rust code for performance
  • Writing tests or documentation for Rust projects

非目标

  • Providing a full Rust language tutorial
  • Automating Rust code writing directly
  • Replacing static analysis tools like clippy (though it references them)

安装

请先添加 Marketplace

/plugin marketplace add apollographql/skills
/plugin install skills@apollo-marketplace

质量评分

已验证
95 /100
1 day ago 分析

信任信号

最近提交2 days ago
星标62
许可证MIT
状态
查看源代码

类似扩展

Dart Matcher Best Practices

100

Best practices for using `expect` and `package:matcher`. Focuses on readable assertions, proper matcher selection, and avoiding common pitfalls.

技能
flutter

Supabase Postgres Best Practices

99

来自 Supabase 的 Postgres 性能优化和最佳实践。在编写、审查或优化 Postgres 查询、模式设计或数据库配置时,请使用此技能。

技能
supabase

Cleanup Defensive

99

Remove pointless try/catch blocks and defensive guards that hide errors or add no value. Preserves catches at true system boundaries (HTTP handlers, CLI entry, message consumers). Use when the user asks to remove try/catch, fix error hiding, clean up defensive code, or stop swallowing errors. Example queries — "remove pointless try/catch", "we're swallowing errors", "stop hiding bugs in catch blocks", "clean up the defensive code".

技能
raintree-technology

Neon Postgres

100

Neon Serverless Postgres 的使用指南和最佳实践。涵盖入门、使用 Neon 进行本地开发、选择连接方法、Neon 功能、身份验证(@neondatabase/auth)、PostgREST 风格的数据 API(@neondatabase/neon-js)、Neon CLI 以及 Neon 的平台 API/SDK。可用于任何与 Neon 相关的问题。

技能
neondatabase

Sdk Dx

100

Design SDKs that developers love to use—APIs that feel native, error messages that guide, and experiences that reduce friction. This skill covers creating SDKs that drive adoption through exceptional developer experience rather than aggressive marketing. Trigger phrases: "SDK design", "developer experience", "API design", "SDK DX", "error messages", "type safety", "IDE integration", "SDK versioning", "migration guides", "client library design", "making SDKs feel native", "SDK best practices"

技能
jonathimer

Csharp Async

100

Get best practices for C# async programming

技能
github