moai-lang-rust

Provide Rust patterns for Axum, Tokio, SQLx, and WebAssembly.

Updated Jan 16, 2026
One-click install
npx skills add https://github.com/yarang/fastapi-error-code --skill moai-lang-rust-yarang
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: moai-lang-rust
Source: https://github.com/yarang/fastapi-error-code/tree/main/.claude/skills/moai-lang-rust
Command: npx skills add https://github.com/yarang/fastapi-error-code --skill moai-lang-rust-yarang

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Rust is the language of choice for high-performance, memory-safe systems, but mastering Axum, Tokio, SQLx, and WebAssembly requires a cohesive set of patterns and best practices. This Skill consolidates guidance to accelerate expert-level Rust development across web services, async runtimes, and low-level components.

Core Features & Use Cases

  • Axum-based REST APIs: pattern-driven routing, state, and error handling for robust services.
  • Async runtime with Tokio: efficient task scheduling, concurrency primitives, and scalable I/O.
  • Compile-time safety with SQLx: type-checked queries and reliable database interactions.
  • WebAssembly targets: approach for porting Rust apps to the browser or edge environments.
  • Real-world applicability: suitable for microservices, CLI tools, and system utilities requiring safety and performance.

Quick Start

Install the Rust toolchain (1.92+) and begin applying the Axum/Tokio/SQLx patterns described in this skill to bootstrap a high-performance Rust project.

Frequently Asked Questions about moai-lang-rust

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

FAQPage Schema
How do I structure an Axum REST API with robust state and error handling?

Axum REST APIs use pattern-driven routing, shared state, and structured error handling to build robust web services. This approach leverages strong type safety and compile-time checks to prevent runtime failures in Rust microservices.

What is the best way to manage async tasks and concurrency in Rust?

Tokio provides efficient async task scheduling, concurrency primitives, and scalable I/O for Rust applications. It enables safe concurrency by leveraging Rust's ownership model to prevent data races across asynchronous threads.

How do I ensure compile-time safety for SQL database queries in Rust?

SQLx enables compile-time safety for database queries by checking SQL syntax and types against your database schema at build time. This guarantees reliable database interactions and eliminates runtime SQL errors in Rust.

Can I port Rust applications to WebAssembly for browser or edge environments?

Yes, Rust applications can be ported to WebAssembly targets for execution in browser or edge environments. This approach maintains memory safety and high performance while allowing low-level system utilities to run directly in WebAssembly.

What Rust toolchain version is needed for modern Axum and Tokio patterns?

A Rust toolchain of version 1.92 or higher is required to implement modern Axum 0.8, Tokio 1.48, and SQLx 0.8 patterns. This ensures compatibility with modern edition features, robust error handling, and compile-time checks.