rust-polyglot-conventions

Enforce Rust naming, error handling, async, and memory conventions.

836|66|Updated Feb 3, 2025
One-click install
npx skills add https://github.com/kreuzberg-dev/html-to-markdown --skill rust-polyglot-conventions
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: rust-polyglot-conventions
Source: https://github.com/kreuzberg-dev/html-to-markdown/tree/main/.codex/skills/rust-polyglot-conventions
Command: npx skills add https://github.com/kreuzberg-dev/html-to-markdown --skill rust-polyglot-conventions

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill enforces a consistent and high-quality set of Rust coding conventions, ensuring maintainability, readability, and robustness across projects.

Core Features & Use Cases

  • Standardized Naming: Enforces PascalCase for types, snake_case for functions/variables, and SCREAMING_SNAKE_CASE for constants.
  • Robust Error Handling: Mandates the use of Result<T, Error> and the ? operator, avoiding .unwrap() in production.
  • Asynchronous Best Practices: Promotes Tokio for async operations and provides _sync wrappers.
  • Memory Management: Encourages Arc for shared ownership and Mutex/RwLock for interior mutability.
  • Performance Optimization: Suggests ahash for HashMaps and lazy_static/once_cell.
  • Zero Warnings: Ensures cargo clippy -- -D warnings passes.
  • Use Case: Ensure all new Rust code adheres to the established project guidelines for consistency and quality.

Quick Start

Apply the rust-polyglot-conventions skill to review the current Rust codebase for adherence to standards.

Frequently Asked Questions about rust-polyglot-conventions

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce Rust coding standards for naming and error handling?▼

Enforce Rust coding standards by applying conventions that mandate PascalCase for types, snake_case for functions, and robust error handling using `Result<T, Error>` with the `?` operator to avoid `.unwrap()` in production.

What are the best practices for async operations in Rust?▼

Best practices for async operations in Rust promote using Tokio as the async runtime and providing `_sync` wrappers to ensure robust asynchronous patterns and maintain code flexibility across different execution contexts.

How do I ensure my Rust code passes clippy with zero warnings?▼

Ensure Rust code passes clippy with zero warnings by enforcing `cargo clippy -- -D warnings` to guarantee that all new code adheres to established project guidelines for maintainability and high code quality.

How should I manage memory and optimize performance in Rust projects?▼

Manage memory in Rust by using `Arc` for shared ownership and `Mutex` or `RwLock` for interior mutability, and optimize performance by utilizing `ahash` for HashMaps along with `lazy_static` or `once_cell`.

Does this Rust conventions standard work for existing software engineering projects?▼

These Rust conventions are applicable to software engineering projects requiring high code quality and maintainability, ensuring that both new and existing codebases adhere to idiomatic Rust standards.