MIT License

技术解读

以下内容由 GitRead 中文社区 编辑团队基于项目 README 与官方资料整理, 结合中文开发者的常见使用场景补充技术选型建议。具体以项目官方文档为准。

深度技术分析:基于 Tauri 2 + Rust 的 LOL 英雄战绩分析助手

项目背景与痛点

LOL 玩家中普遍存在一种刚需:在短时间内对多个队友的战绩进行快速分析,并将其归属为混子、牛马等类别。简洁高效的战绩查询工具可以显著提高该类用户的决策效率和游戏体验。然而传统网页查询工具功能单一,缺乏智能推荐和分类功能,因此迫切需要一款可靠的战绩查询助手来填补这一空白。

核心技术揭秘

“wnzzer/rank-analysis” 项目基于 Tauri 2 + Rust 构建的桌面客户端,集成了一键分析英雄联盟玩家战绩的功能。Tauri 是一个基于 Webview 的桌面应用框架,而 Rust 则以其强大的类型安全和内存管理机制著称。该项目的架构设计体现了高效性和安全性的双重追求。

技术架构分析

整体架构可分为前端展示层、后端数据处理层和中间状态同步层。前端使用 Web 技术栈呈现,如 JavaScript 或 HTML/CSS。后端处理层使用 Rust 高效处理数据请求,从服务器获取玩家战绩数据。中间状态同步层则利用 Tauri 的消息传递机制实现前后端的高效协同。

graph TD A[用户请求] --> B{"参数校验"} B -->|"通过"| C[执行业务逻辑] B -->|"失败"| D[返回错误信息] C --> E{"获取数据"} E -->|"成功"| F[数据处理] E -->|"失败"| G[重试请求] F --> H[数据格式化] H --> I[状态同步] I --> J[前端渲染]

核心算法解析

该项目的一大亮点在于创新式的标签标记机制。首先,根据每个玩家的战绩数据,算法会计算一系列指标,如胜率、KDA、击杀/助攻比等。接着,通过预设的分类规则对玩家进行快速归类,最终实现一键分析出混子、牛马等不同类型的队友。

功能亮点与差异

相比于市面上同类战绩查询工具,该项目凭借其独特的一键标签分类和批量处理功能,在快速分析多玩家战绩上具有明显优势。标签标记机制的设计,使得用户能在极短的时间内对大量玩家进行分类,极大地提升了用户的游戏体验。同时,Tauri 框架的引入为客户端提供了跨平台能力,并保证了良好性能。

应用场景与落地建议

在生产环境中,我们需注意数据接口的稳定性以及玩家隐私保护。由于项目需要通过外部的接口获取玩家战绩信息,因此对接口的稳定性提出较高要求。同时,在数据传输和处理过程中必须严格遵守相关法律法规,保障玩家信息安全。

该工具适用于小型团队、电竞爱好者以及任何希望快速分析、分类英雄联盟玩家战绩的用户场景。建议在使用时,关注更新信息,确保项目依赖的后台服务和数据接口稳定运行。

综合评价

优势

  • 具备强大数据处理能力,能高效分析玩家战绩信息;
  • 跨平台开发,方便不同类型用户使用;
  • 提供了便捷的一键标签分类功能,极大提高了玩家对战绩分析的效率;
  • 代码基于 Rust,安全性高,且具有良好的内存管理机制。

不足

  • 依赖外部接口进行数据抓取,稳定性可能会受到第三方因素影响;
  • 目前尚为一个小型项目,需要更多社区开发者的支持;
  • 标签分类规则较为固定,对于不同玩家行为的适应性需进一步优化调整。

基于上述,“wnzzer/rank-analysis” 在当前已经展现出非凡的技术创新力,具有巨大的潜力和进一步发展的空间。对于热衷技术和追求高效的开发者来说,它无疑是一个值得持续关注并亲身体验的项目。

简要分析

热度分
558
价值分
292
活跃状态
活跃

语言占比

CSS
HTML
JavaScript
NSIS
Python
Rust
Shell
TypeScript
Vue

Release

README

Logo

Rank Analysis

🎮 AI-powered match review for League of Legends — built on the official LCU API

Tauri Rust Vue TypeScript Windows macOS License AtomGitStars LINUX DO

Latest Release Downloads GitCodeDownloads Stars

中文 | English


TL;DR for developers — A native LoL client tool built with Tauri 2 + Rust + Vue 3 + TypeScript. ~5 MB installer, a single native binary on Windows and Apple Silicon macOS, zero Electron overhead. Its core is a data-driven AI match-review pipeline: every game is quantified (KDA, damage/tank share, kill participation, gold, team comp) and streamed to an LLM that tells you who carried, who fed, and who got dragged down. Talks to the LCU WebSocket for live in-game state, async Rust HTTP for match history. No DLL injection, no game memory access — uses only Riot’s official local client API.

📖 Introduction

Rank Analysis is a League of Legends companion built on Riot’s official LCU API. Its standout feature is data-driven AI match review: instead of just throwing numbers at you, it quantifies each game and has an AI explain why you won or lost — who carried, who fed, who got stomped, and who was dragged down by teammates. Around that core it also covers the essentials: match-history lookup with win-rate highlighting, premade & teammate-risk detection, and rule-based auto pick/ban.

Built with Tauri 2.0, it pairs Rust’s performance with a web frontend in a ~5 MB, single-binary app — no DLL injection, no memory reads, only the official local client API.

✨ Features

🤖 AI Match Review — the core

  • Full Match Review: One click in the match details turns the game into a verdict — who performed best, who fed, who got stomped, and who was dragged down by teammates
  • Single Player Review: Analyze any participant individually (carried / fed / stomped / dragged down / normal)
  • Lobby-level Risk Assessment: During lobby/queue, assess teammate and opponent risk from recent history, favorite champions, role distribution, and tags
  • Evidence-Driven, not vibes: Every verdict is grounded in real data — KDA, damage share, tank share, gold, kill participation, towers, CS — not subjective commentary
  • Streaming + Cached: Results stream in token-by-token and are cached per match within the session to avoid repeated waits

📊 Match History Query

  • Win Rate Highlighting: Intuitively displays teammates’ recent performance
  • MVP Display: Quickly identify carry players
  • Player Tags: Auto-tags win streaks, loss streaks, and non-ranked players
  • Relationship Display: Identifies nemeses and friends

🔍 Match Analysis

  • Premade Detection: Marks pre-grouped players (duo/squad detection)
  • Match History: Marks previously encountered players
  • Match Details Panel: Independent window showing 10 players’ KDA, economy, CS, damage taken, towers destroyed, items, skills, and runes/augments
  • Augment Recognition: Special queues like Arena automatically switch to augment display with rarity differentiation

🤖 Automation Assistant

  • Auto Matchmaking: Automatically starts searching for matches
  • Auto Accept: Automatically accepts matches when found
  • Rule-based Pick/Ban: A configurable rule engine picks/bans by role × ally/enemy champion conditions (falls back to a fixed preset list)

🗂️ Notes, Tags & Data Sync

  • Player Notes: Leave a note + color label (friendly / normal / careful / blacklist) on players you meet — surfaced automatically next time you run into them
  • Tag Management: A dozen toggleable behavior tags (win streak, loss streak, smurf suspect, hot streak, slump…), with AI-suggested personalized tags based on your recent history
  • Cloud Sync & Backup: Player notes and full config sync across devices (last-write-wins merge), plus one-click JSON export/import

📸 Screenshots

AI Full-Match Review — a one-line verdict plus who carried / who fed / who got stomped, every call backed by real numbers

AI Full-Match Review

Match History — look up any summoner, dark / light theme

Match History (dark) Match History (light)

Live Match Analysis — recent records, rank, tags and premade detection for all 10 players, automatically on game start

Live Match Analysis

Match Details — a dedicated window with per-player KDA / gold / damage, plus one-click AI review

Match Details with AI review entry

Player Notes & Tag Management

Player Notes Tag Management

Automation & General Settings

Automation Settings General Settings

Backup & Cloud Sync

Data & Sync

🚀 Usage

  1. Download:

    • GitHub Releases (primary): grab the latest build from the Release Page
    • GitCode mirror (faster in mainland China): download from GitCode Releases

    System Requirements

    • Windows: Windows 10 1803 or higher (WebView2 support required)
    • macOS: macOS 10.15 or higher, Apple Silicon only (*-macos-aarch64.dmg; no Intel build)

    Feature parity: everything that runs off the LCU API — match history, AI review, premade detection, auto accept/pick/ban, cloud sync — works the same on both platforms. Two helpers are Windows-only because they have no macOS equivalent: launch LoL without WeGame (relies on the Tencent launcher’s Windows install layout) and relaunch as administrator (macOS has no UAC). The app hides both on macOS rather than showing buttons that would always fail.

  2. Run: Extract and run the executable directly - no admin privileges required

    macOS first launch: the app is ad-hoc signed but not notarized (Apple notarization requires a paid Developer account). macOS will refuse the first launch. Open System Settings → Privacy & Security, scroll to the bottom and click Open Anyway next to the blocked app, then launch it again. This is only needed once.

  3. Connect: The software automatically detects the game client when running

    Notes:

    • Currently only supports Tencent servers (China)
    • Can be opened mid-game and will auto-connect
    • AI analysis requires internet access to call model services; network unavailability only affects AI features, not basic match history queries

🛠️ Development & Build

If you want to compile this project yourself, follow these steps:

Prerequisites

  • Node.js (LTS version recommended)
  • Rust
  • A native toolchain:
    • Windows: Visual Studio C++ Build Tools
    • macOS: Xcode Command Line Tools (xcode-select --install)

Both platforms build from the same source tree. npm run tauri build produces an NSIS installer on Windows; on macOS pass the bundle target explicitly, since tauri.conf.json defaults to nsis:

npm run tauri build -- --bundles dmg

Build Steps

  1. Clone and enter the Tauri directory:

    cd rank-analysis-app
    
  2. Install dependencies:

    npm install
    
  3. Run in development mode:

    npm run tauri dev
    
  4. Build production version:

    npm run tauri build
    

    The executable will be located in src-tauri/target/release/bundle

📊 Code Quality

This project uses modern development toolchain to ensure code quality and consistency:

Quality Tools

  • ESLint: Static code analysis
  • Prettier: Code formatting
  • TypeScript: Strict type checking
  • Clippy: Rust code linting
  • Rustfmt: Rust code formatting
  • GitHub Actions: Automated CI/CD

Quality Check Commands

cd rank-analysis-app

# One-shot gate — runs before every commit (mirrors CI exactly)
npm run check         # format + lint + typecheck + cargo fmt --check + clippy --all-targets --all-features -Dwarnings
npm run test          # vitest

# Individual steps (if you want to run them piecemeal)
npm run lint          # ESLint
npm run format        # Prettier
npm run typecheck     # vue-tsc
cd src-tauri && cargo fmt --all -- --check && cargo clippy --all-targets --all-features -- -Dwarnings

npm run check is the canonical pre-commit gate. It matches the flags used by .github/workflows/quality-checks.yml — if it passes locally, CI will pass.

For detailed code quality standards and contribution guidelines, please refer to:

🤝 Contributing

Issues and Pull Requests are welcome!

  • Bug Reports: Submit via GitHub Issues
  • Code Contributions: Improvements and new features are welcome

📄 License

This project is open-sourced under the MIT License.

Maintained with AI assistance experiments (Claude / LLM tooling)

Sponsors

Paid sponsorship; listing does not constitute an endorsement or guarantee of the sponsor’s services.

Star History

Star History Chart

评论

暂无评论