{"id":21917332,"url":"https://github.com/blukai/haste","last_synced_at":"2025-04-19T07:35:48.087Z","repository":{"id":201073523,"uuid":"587888630","full_name":"blukai/haste","owner":"blukai","description":"world's fastest dota 2 and deadlock (the game) replay parser. more then two times faster than comically fast.","archived":false,"fork":false,"pushed_at":"2024-10-12T02:03:33.000Z","size":70223,"stargazers_count":21,"open_issues_count":1,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-12T15:12:11.099Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blukai.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-11T20:30:50.000Z","updated_at":"2025-01-30T07:23:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"a77a6f81-1cf2-49fa-ab80-6b5cbda7125c","html_url":"https://github.com/blukai/haste","commit_stats":null,"previous_names":["blukai/haste"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blukai%2Fhaste","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blukai%2Fhaste/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blukai%2Fhaste/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blukai%2Fhaste/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blukai","download_url":"https://codeload.github.com/blukai/haste/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249638252,"owners_count":21304305,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-28T19:30:11.511Z","updated_at":"2025-04-19T07:35:48.038Z","avatar_url":"https://github.com/blukai.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# haste\n\nworld's fastest dota 2 and deadlock (the game) replay parser. more then two\ntimes faster than comically fast.\n\nhaste attempts to squeeze maximum single-core performance from the cpu, which\nenables efficient utilization of all cores for parsing multiple replays\nsimultaneously.\n\nhaste does not want to be very user-friendly, it provides you with a relatively\nlow-level access to correct usable data. it up to you how you structure your\nprograms. you may choose to build your own nice api layer. anything is possible,\ntheoretically even something as silly (i love silly) as ecs is doable (think of\nbevy game engine).\n\n\u003e [!WARNING]\n\u003e there are many `unsafe`s in the codebase, some are rational and explained,\n\u003e some need to be let go; public api isn't great and can be considered very\n\u003e unstable (e.g. it is not final and parts of it may change dramatically).\n\n## how to\n\n### examples\n\nnotable examples to check out for detailed usage:\n\n- [deadlock-position](examples/deadlock-position.rs) demonstrates how to work with\nentities and how to get player (or any other entity, if desired) positions in\ndeadlock (the game);\n- [deadlock-gametime](examples/deadlock-gametime.rs) also demonstrates how to work\nwith entities and how to compute game time (not a very straightforward thing to\ndo, thanks valve).\n- [dota2-allchat](examples/dota2-allchat.rs) shows how to work with packet\nmessages.\n\nto run these examples navigate to haste directory and run\n\n```console\n$ cargo run --example \u003cexample-name\u003e -- \u003cpath-to-dem-file\u003e\n```\n\n### usage\n\nto use haste in your project, you'll need either:\n - `protoc` (protocol buffer compiler) in your `$PATH`, or `$PROTOC` environment\n variable needs point to it\n - or `cmake` (if you don't have `protoc`, it will be compiled for you) and\n `protobuf-src` feature flag enabled\n\nhaste is not published to [crates.io](https://crates.io/) (yet?). you can add it\nto your `Cargo.toml` as a [git\ndependency](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#specifying-dependencies-from-git-repositories),\n\n```toml\n[dependencies]\nhaste = { git = \"https://github.com/blukai/haste.git\" }\n```\n\nhaste's entity representatin is not debugger / print friendly, you would want to\nuse [haste-inspector](https://github.com/blukai/haste-inspector) (replay dev\ntools) to explore all the entities that are present in replays.\n\n## feature flags\n\n- `broadcast`: enables http broadcasts.\n- `deadlock`: enables deadlock protos and some utilities.\n- `dota2`: enabled dota2 protos and some utilities.\n- `protobuf-src`: enables\n[protobuf_src](https://docs.rs/protobuf-src/latest/protobuf_src/) crate which\nbuilds `protoc`.\n\n## benchmarks\n\nTODO: benchmarks and comparisons with other projects such as clarity and manta.\n\nto tease a bit.. as of 25-09-2024 in standard release build with no extra\noptimizations nor non-stadard memory allocators:\n\n- 31 minutes deadlock match can be parsed in ~660 ms with ~17.5 mb peak memory\nconsumtion;\n- 38 minutes dota 2 captains mode match - in ~650 ms with ~18 mb peak memory\nconsumtion.\n\nrun time is an average from 10 runs with no warmups. peak memory consumtion is\n`time`'s `maximum resident set size` stat.\n\n## motivation, huh?\n\nwhy create another replay parser?\nto prove myself that i'm right (long story; the proof was found quicly, but then\ni fell down the rabbit hole of further performance optimizations).\n\n## credits / references\n\nvalve's official repos and wiki provide quite a handful of useful information,\nbut special credits go to [invokr](https://github.com/invokr) who worked on\n[dotabuff/manta](https://github.com/dotabuff/manta) and to\n[spheenik](https://github.com/spheenik) the creator of\n[skadistats/clarity](https://github.com/skadistats/clarity) (i have not personally\ninteracted with either of them).\n\nother notable resources:\n\n- [ButterflyStats/butterfly](https://github.com/ButterflyStats/butterfly)\n- [ValveSoftware/csgo-demoinfo](https://github.com/ValveSoftware/csgo-demoinfo)\n- [ValveSoftware/source-sdk-2013](https://github.com/ValveSoftware/source-sdk-2013)\n- [SwagSoftware/Kisak-Strike](https://github.com/SwagSoftware/Kisak-Strike)\n- [markus-wa/demoinfocs-golang](https://github.com/markus-wa/demoinfocs-golang)\n(some info about how pointer serializer fields work)\n- [demofile-net](https://github.com/saul/demofile-net) (tv broadcasts)\n\n## performance / profiling\n\n- [hotspot](https://github.com/KDAB/hotspot)\n- [heaptrack](https://github.com/KDE/heaptrack)\n- [perf](https://perf.wiki.kernel.org/index.php/Main_Page)\n- [hyperfine](https://github.com/sharkdp/hyperfine)\n- [asheplyakov/branchmiss](https://github.com/asheplyakov/branchmiss)\n\nand some more can probably be found across comments in the codebase.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblukai%2Fhaste","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblukai%2Fhaste","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblukai%2Fhaste/lists"}