بنقرة واحدة
rust-skill
يحتوي rust-skill على 12 من skills المجمعة من luckyegg168، مع تغطية مهنية على مستوى المستودع وصفحات skill داخل الموقع.
Skills في هذا المستودع
Rust 非同步執行時技能。涵蓋 tokio 1.44 runtime 架構與選擇、async/await 語法模式、 Future trait 原理、常見陷阱(blocking in async、async trait)、 channel 通訊(mpsc/oneshot/broadcast/watch)、task spawn 策略、 select! 多路複用、graceful shutdown、async stream、Mutex 在 async 中的正確用法。 觸發關鍵詞:async, await, tokio, async-std, Future, spawn, channel, mpsc, select, runtime, blocking, async trait, stream, executor
Rust CI/CD 與部署技能。涵蓋 GitHub Actions Rust 工作流模板(build/test/clippy/fmt/coverage)、 GitLab CI Rust 設定、cross-compilation(cross-rs、target triple)、 cargo-dist 自動發布(binary distribution)、cargo-release 版本管理、 Docker multi-stage build、快取策略(Swatinem/rust-cache)、 MSRV(最低支援版本)測試、security audit(cargo-audit/cargo-deny)。 觸發關鍵詞:Rust CI, GitHub Actions Rust, GitLab CI Rust, cargo-dist, cargo-release, cross compile, Docker Rust, rust-cache, cargo-audit, cargo-deny, MSRV, binary release, CI pipeline
Rust crate 選擇指南技能。按功能領域推薦經過實戰驗證的 crate: HTTP(reqwest/hyper/axum)、序列化(serde/serde_json/toml)、 CLI(clap/dialoguer/indicatif)、日誌(tracing/log/env_logger)、 加密(ring/rustls/argon2)、資料庫(sqlx/diesel/sea-orm)、 GUI(egui/iced/tauri)、測試(proptest/mockall/criterion)、 非同步(tokio/async-trait/futures)。 含選擇判斷標準、版本鎖定策略、Cargo.toml features 管理。 觸發關鍵詞:Rust crate, which crate, recommend crate, crate comparison, best Rust library, cargo dependency, version pinning, blessed.rs, lib.rs, crates.io, feature flags
Rust 慣用設計模式技能。涵蓋 Builder Pattern(型別安全構建器)、 Newtype Pattern(型別封裝與 Deref)、Typestate Pattern(編譯期狀態機)、 RAII Guard Pattern(資源管理)、Interior Mutability(Cell/RefCell/Mutex)、 Strategy Pattern(trait objects vs enum dispatch)、 Command Pattern、Observer Pattern(回呼與事件系統)、 Extension Trait Pattern、Sealed Trait Pattern、From/Into 慣用轉換。 觸發關鍵詞:Rust design pattern, builder, newtype, typestate, RAII, interior mutability, strategy pattern, trait object, enum dispatch, sealed trait, extension trait, From Into, guard pattern
Rust 錯誤處理模式技能。涵蓋 Result<T,E> 與 Option<T> 模式、? 運算子錯誤傳播、 thiserror 2.0 自訂錯誤類型、anyhow 應用層錯誤、自訂 Error trait 實作、 From trait 轉換、error chain、panic 與 unwrap 使用時機、錯誤處理最佳實踐。 觸發關鍵詞:Rust error handling, Result, Option, thiserror, anyhow, ? operator, unwrap, expect, Error trait, From conversion, error propagation, custom error type, error chain, panic
Rust FFI 互操作技能。涵蓋 PyO3 0.23 Rust ↔ Python 互操作、 cbindgen 生成 C header、bindgen 綁定 C 函式庫、extern "C" ABI、 #[repr(C)] 記憶體佈局、CString/CStr 安全轉換、 null pointer 處理、panic boundary(catch_unwind)、 記憶體所有權跨語言邊界管理、WASM 目標編譯。 觸發關鍵詞:FFI, PyO3, cbindgen, bindgen, extern C, repr C, CString, C interop, Python binding, WASM, foreign function, shared library, cdylib, staticlib
Rust 所有權、借用與生命週期模式技能。涵蓋 ownership 轉移、borrowing rules、 lifetime annotations、常見編譯器錯誤 E0382/E0502/E0597/E0106 修復策略、 Clone vs Copy semantics、Rc/Arc 共享所有權、Cow 寫時複製、interior mutability (Cell/RefCell/Mutex)、self-referential structs 問題與解法。 觸發關鍵詞:ownership, borrow checker, lifetime, E0382, moved value, cannot borrow, lifetime elision, 'a annotation, Rc, Arc, RefCell, Copy, Clone
Rust 效能優化技能。涵蓋零成本抽象原理、iterator vs loop 效能比較、 SIMD hints(std::simd)、cargo bench + criterion 2.0 微基準測試、 flamegraph 效能分析、perf/DHAT 工具鏈、記憶體配置優化(arena allocator)、 String 與 &str 效能策略、HashMap hasher 選擇、編譯器優化等級(opt-level/LTO/codegen-units)、 async overhead 與零成本取消、#[inline] 策略。 觸發關鍵詞:Rust performance, benchmark, criterion, flamegraph, profiling, zero-cost abstraction, iterator performance, SIMD, LTO, opt-level, codegen-units, arena allocator, perf, DHAT, inline, cache friendly
Rust 專案初始化與 Cargo 設定技能。涵蓋 cargo new、cargo init、workspace 多專案管理、 Cargo.toml manifest 設定模板、目錄結構最佳實踐、edition 2024 設定、features 管理、 profile 最佳化設定、依賴管理策略。觸發關鍵詞:Rust project init, cargo new, cargo init, Cargo.toml, workspace, Rust project structure, cargo workspace, Rust boilerplate, Rust starter template, Rust project setup, new Rust project, Rust directory layout
AI 輔助 Rust 開發的提示詞模板庫。涵蓋七大類別:程式碼生成(Code Generation)、 Debug/錯誤修復(Debugging)、重構(Refactoring)、程式碼審查(Code Review)、 文件生成(Documentation)、效能優化(Performance)、測試撰寫(Testing)。 每個模板含觸發場景、變數插槽、預期輸出格式。 適用於 Claude、ChatGPT、Copilot 等 AI 工具的 Rust 開發場景。 觸發關鍵詞:Rust prompt, AI assisted Rust, prompt template, code generation prompt, debug prompt, refactor prompt, code review prompt, Rust AI development, LLM Rust coding, AI pair programming Rust
Rust 測試技能。涵蓋 #[test] 單元測試、#[cfg(test)] 模組組織、 integration tests 目錄結構、assert! 系列巨集、測試 helper 函式、 proptest/quickcheck 屬性測試、mockall mocking 策略、 cargo-llvm-cov 覆蓋率報告、#[should_panic] 與 Result<()> 測試模式、 async 測試(tokio::test)、test fixtures 模式、cargo-nextest 加速。 觸發關鍵詞:Rust test, #[test], cargo test, integration test, proptest, mockall, coverage, cargo-llvm-cov, should_panic, test module, TDD Rust, cargo-nextest, assertion, test fixture
Rust unsafe 使用指南技能。涵蓋 unsafe 區塊五種超能力(raw pointer 解引用、 呼叫 unsafe 函式、存取 mutable static、實作 unsafe trait、存取 union 欄位)、 安全封裝策略(safe abstraction over unsafe)、FFI unsafe 模式、 Miri 驗證流程、unsafe 程式碼審查準則、常見 UB(未定義行為)清單、 Pin 與自引用結構、raw pointer 算術、transmute 使用場景與風險。 觸發關鍵詞:unsafe, raw pointer, Miri, undefined behavior, UB, safe abstraction, transmute, Pin, self-referential, unsafe trait, union, mutable static, deref raw pointer