rust-quality

Generate Rust code following yttrium project standards for cross-platform compatibility.

14|6|Updated Sep 3, 2024
One-click install
npx skills add https://github.com/reown-com/yttrium --skill rust-quality-reown-com
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rust-quality
Source: https://github.com/reown-com/yttrium/tree/main/.claude/skills/rust-quality
Command: npx skills add https://github.com/reown-com/yttrium --skill rust-quality-reown-com

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill ensures that Rust code written for the yttrium project adheres to high standards of quality, maintainability, and cross-platform compatibility, reducing bugs and improving developer productivity.

Core Features & Use Cases

  • Idiomatic Rust: Enforces project-specific coding styles, including import grouping, error handling with thiserror, and newtype patterns.
  • Cross-Platform Support: Guides the creation of code that works seamlessly across iOS, Android, and WebAssembly.
  • Robust Error Handling: Promotes the use of eyre::Result and thiserror for clear and consistent error management.
  • Use Case: When adding a new feature to the core Rust library that needs to be accessible from Swift and JavaScript, this Skill will ensure the code is well-structured, properly tested, and correctly handles platform-specific compilation.

Quick Start

Use the rust-quality skill to add a new thread-safe caching module with a provider pool.

Frequently Asked Questions about rust-quality

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

FAQPage Schema
How do I write idiomatic Rust code for cross-platform FFI?

To write idiomatic Rust code for cross-platform FFI, you should enforce specific patterns for imports, error handling with thiserror, newtypes, and feature gating to ensure compatibility across Swift, Kotlin, and JavaScript.

What is the best way to handle errors in Rust modules accessible from Swift and JavaScript?

The best way to handle errors in Rust modules accessible from Swift and JavaScript is using eyre::Result and thiserror to establish clear, consistent error management patterns across the core library.

Does this Rust code generation approach work for WebAssembly and Android?

Yes, this Rust code generation approach works for WebAssembly and Android by guiding the creation of code that operates seamlessly across iOS, Android, and WebAssembly environments.

How do I structure a new thread-safe caching module with a provider pool in Rust?

To structure a new thread-safe caching module with a provider pool in Rust, apply project-specific standards for maintainability, import grouping, and newtype patterns during module creation or refactoring.

When should I use newtype patterns and feature gating in Rust development?

You should use newtype patterns and feature gating in Rust development when implementing FFI-compatible types and adding new features to the core library to maintain high standards of quality and cross-platform compatibility.