{"id":50706566,"url":"https://github.com/manasight/manasight-parser","last_synced_at":"2026-06-09T12:30:59.967Z","repository":{"id":341719479,"uuid":"1166333101","full_name":"manasight/manasight-parser","owner":"manasight","description":"MTG Arena log file parser — Rust library crate","archived":false,"fork":false,"pushed_at":"2026-06-07T00:13:30.000Z","size":1005,"stargazers_count":9,"open_issues_count":2,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-06-07T03:23:41.376Z","etag":null,"topics":["deck-tracker","log-parser","magic-the-gathering","mtg-arena","mtga","rust"],"latest_commit_sha":null,"homepage":"https://manasight.gg","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/manasight.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE-APACHE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-25T05:36:01.000Z","updated_at":"2026-06-07T00:13:32.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/manasight/manasight-parser","commit_stats":null,"previous_names":["manasight/manasight-parser"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/manasight/manasight-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manasight%2Fmanasight-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manasight%2Fmanasight-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manasight%2Fmanasight-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manasight%2Fmanasight-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/manasight","download_url":"https://codeload.github.com/manasight/manasight-parser/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manasight%2Fmanasight-parser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34107865,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deck-tracker","log-parser","magic-the-gathering","mtg-arena","mtga","rust"],"created_at":"2026-06-09T12:30:59.898Z","updated_at":"2026-06-09T12:30:59.958Z","avatar_url":"https://github.com/manasight.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e **This project is in active development.** APIs may change without notice.\n\n# manasight-parser\n\n**manasight-parser** is the log parsing engine behind [Manasight](https://manasight.gg), an MTG Arena companion app.\n\nMTG Arena log file parser — a Rust library crate that reads Arena's `Player.log` and emits typed game events via an async event bus.\n\n## Installation\n\n```sh\ncargo add manasight-parser\n```\n\nOr in `Cargo.toml`:\n\n```toml\n[dependencies]\nmanasight-parser = \"0.3\"\n```\n\nRequires Rust 1.93.0 or later.\n\n## Architecture\n\n```text\nPlayer.log → File Tailer → Entry Buffer → Router → Parsers → Event Bus\n```\n\n- **`log`** — file discovery, polling tailer, entry accumulation, timestamps\n- **`router`** — dispatches raw entries to the correct category parser\n- **`parsers`** — one sub-module per event category\n- **`events`** — public event type enums/structs (the parser's output contract)\n- **`event_bus`** — `tokio::broadcast` channel for fan-out to subscribers\n- **`stream`** — public entry point (`MtgaEventStream`)\n- **`sanitize`** — privacy scrubber for redacting PII from raw log text\n- **`util`** — pipeline utilities (gzip compression, content hashing)\n\n## Usage\n\n```rust\nuse std::path::Path;\nuse manasight_parser::MtgaEventStream;\n\n#[tokio::main]\nasync fn main() -\u003e Result\u003c(), Box\u003cdyn std::error::Error\u003e\u003e {\n    let (stream, mut subscriber) = MtgaEventStream::start(Path::new(\"Player.log\")).await?;\n\n    while let Some(event) = subscriber.recv().await {\n        println!(\"got event: {event:?}\");\n    }\n\n    Ok(())\n}\n```\n\n## Log Sanitization\n\nThe `sanitize` module strips PII and credentials from raw `Player.log` text before it leaves the user's machine. It redacts auth tokens, bearer tokens, account IDs, display names, session identifiers, OS user paths, and hardware fingerprints.\n\n```rust\nuse manasight_parser::sanitize::scrub_raw_log;\n\nlet raw = std::fs::read_to_string(\"Player.log\").unwrap();\nlet clean = scrub_raw_log(\u0026raw);\n// clean contains no tokens, account IDs, or user paths\n```\n\nPipeline utilities for compression and content-addressable storage:\n\n```rust\nuse manasight_parser::util::{compress_log, content_hash};\n\nlet compressed = compress_log(\u0026clean).unwrap();\nlet hash = content_hash(\u0026compressed); // 64-char hex SHA-256\n```\n\n### CLI\n\nThe `scrub` binary reads stdin and writes sanitized output to stdout:\n\n```sh\ncargo run --bin scrub \u003c Player.log \u003e Player-sanitized.log\n```\n\n## Event Types\n\n| Event | Description | Class |\n|-------|-------------|-------|\n| `GameState` | GRE-to-client messages (zones, game objects, turns) | Interactive |\n| `ClientAction` | Client-to-GRE messages (mulligan, select, deck submit) | Interactive |\n| `MatchState` | Match room state changes (start, end, player seats) | Interactive |\n| `DraftBot` | Bot draft picks (Quick Draft) | Durable |\n| `DraftHuman` | Human draft picks (Premier/Traditional Draft) | Durable |\n| `DraftComplete` | Draft completion signal | Durable |\n| `EventLifecycle` | Event join, claim prize, enter pairing | Durable |\n| `Session` | Login, account identity, logout | Durable |\n| `Rank` | Constructed and limited rank snapshots | Durable |\n| `DeckCollection` | Deck collection snapshots with correlated decklists | Durable |\n| `Inventory` | Currency, wildcards, boosters, vault progress | Durable |\n| `GameResult` | Game result / batch trigger | Post-game |\n\n### Performance Classes\n\n- **Interactive** (Class 1): local-only processing, ≤100ms latency target\n- **Durable** (Class 2): persisted to disk queue, ≤1s latency target\n- **Post-game** (Class 3): triggers assembly and upload of game batch\n\n## Minimum Supported Rust Version\n\nMSRV is 1.93.0.\n\n## Contributing\n\nContributions are welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines on reporting bugs, submitting pull requests, and setting up a development environment.\n\n## License\n\nLicensed under either of\n\n- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or \u003chttp://www.apache.org/licenses/LICENSE-2.0\u003e)\n- MIT license ([LICENSE-MIT](LICENSE-MIT) or \u003chttp://opensource.org/licenses/MIT\u003e)\n\nat your option.\n\n\u003e This project is not affiliated with, endorsed by, or associated with Wizards of the Coast, Hasbro, or Magic: The Gathering Arena. All trademarks are the property of their respective owners.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanasight%2Fmanasight-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmanasight%2Fmanasight-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanasight%2Fmanasight-parser/lists"}