{"id":28528937,"url":"https://github.com/gui-yom/hlbc","last_synced_at":"2025-07-06T23:30:46.755Z","repository":{"id":44356510,"uuid":"490077961","full_name":"Gui-Yom/hlbc","owner":"Gui-Yom","description":"Hashlink bytecode disassembler, analyzer, decompiler and assembler.","archived":false,"fork":false,"pushed_at":"2024-08-14T18:56:52.000Z","size":1367,"stargazers_count":70,"open_issues_count":7,"forks_count":11,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-01T23:07:50.306Z","etag":null,"topics":["analysis","bytecode","cli","decompiler","disassembler","gui","hashlink","haxe"],"latest_commit_sha":null,"homepage":"https://gui-yom.github.io/hlbc/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Gui-Yom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2022-05-08T23:25:48.000Z","updated_at":"2025-06-30T12:49:56.000Z","dependencies_parsed_at":"2022-08-12T11:03:16.720Z","dependency_job_id":"0ad3456f-28b9-4fd2-9d9b-fd7b6573ade4","html_url":"https://github.com/Gui-Yom/hlbc","commit_stats":{"total_commits":133,"total_committers":2,"mean_commits":66.5,"dds":0.007518796992481258,"last_synced_commit":"3c54d2026f258feb9eda1351d604b57495d002fe"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/Gui-Yom/hlbc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gui-Yom%2Fhlbc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gui-Yom%2Fhlbc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gui-Yom%2Fhlbc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gui-Yom%2Fhlbc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Gui-Yom","download_url":"https://codeload.github.com/Gui-Yom/hlbc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gui-Yom%2Fhlbc/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263988216,"owners_count":23540141,"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":["analysis","bytecode","cli","decompiler","disassembler","gui","hashlink","haxe"],"created_at":"2025-06-09T13:13:19.881Z","updated_at":"2025-07-06T23:30:46.747Z","avatar_url":"https://github.com/Gui-Yom.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"assets/hlbc.svg\" alt=\"hlbc\" align=\"right\" /\u003e\n\n\u003cdiv align=\"center\"\u003e\n    \u003ch1\u003e\u003cb\u003eH\u003c/b\u003eash\u003cb\u003el\u003c/b\u003eink \u003cb\u003eb\u003c/b\u003eyte\u003cb\u003ec\u003c/b\u003eode tools\u003c/h1\u003e\n    \u003ca href=\"https://crates.io/crates/hlbc\"\u003e\n        \u003cimg src=\"https://img.shields.io/crates/v/hlbc?label=hlbc\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://crates.io/crates/hlbc-decompiler\"\u003e\n        \u003cimg src=\"https://img.shields.io/crates/v/hlbc-decompiler?label=hlbc-decompiler\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://crates.io/crates/hlbc-cli\"\u003e\n        \u003cimg src=\"https://img.shields.io/crates/v/hlbc-cli?label=hlbc-cli\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://crates.io/crates/hlbc-gui\"\u003e\n        \u003cimg src=\"https://img.shields.io/crates/v/hlbc-gui?label=hlbc-gui\"\u003e\n    \u003c/a\u003e\n    \u003cbr/\u003e\n    This repository contains a collection of Rust crates and cli tools to load, disassemble, decompile and\n    analyze \u003ca href=\"https://hashlink.haxe.org/\"\u003eHashlink\u003c/a\u003e bytecode.\n    \u003cbr/\u003e\n    \u003cbr/\u003e\n    \u003cbr/\u003e\n    \u003cbr/\u003e\n    \u003cbr/\u003e\n    \u003cimg src=\"crates/cli/screenshot.png\" width=\"318\" height=\"215\"\u003e\n    \u003cimg src=\"assets/gui_screenshot.png\" width=\"354\" height=\"249\"\u003e\n\u003c/div\u003e\n\n## About\n\n[Hashlink](https://hashlink.haxe.org/) is a VM used as a compilation target for the Haxe language. Hashlink is\nsuccessfully used to run popular games from developer [**Shiro Games**](https://shirogames.com/) like **Northgard**, **Dune: Spice Wars**\nand **Wartales**.\n\n*hlbc* intends to help the motivated to develop mods and tools for those games.\n\nThose games are packaged with the following model :\n\n- `\u003cgame\u003e.exe`: A very light executable that contains the Hashlink VM\n- `hlboot.dat`: The actual bytecode file Hashlink is configured to load on startup. This is the file you want to load in\n  *hlbc*. It doesn't contain any game assets, this is just code.\n- `\u003clib\u003e.hdll`: This is your average native code dll, except it can work with the VM.\n\n## Repository structure\n\n- `data/` : Haxe source files to test the tools\n- `crates/hlbc/` : Core library to load and disassemble bytecode\n- `crates/cli/` : CLI frontend for `hlbc`\n- `crates/decompiler/` : Decompiler library\n- `crates/derive/` : helper proc macros for hlbc\n- `crates/gui/` : GUI to explore bytecode visually\n- `crates/indexing/` : bits and pieces to search through the bytecode\n\n## Wiki\n\nA wiki detailing the specifics of Hashlink bytecode is available [here](https://github.com/Gui-Yom/hlbc/wiki) or by\nusing the command `wiki` in the CLI.\n\n## Planned\n\n- Finishing the decompiler (for loops mainly)\n- C API\n- Adding more features to the GUI and improving UX\n- Looking for a better GUI framework\n\n## Contact\n\nQuestions ? Inquiries ? Help ? Use GitHub discussions, send an email or Discord : limelion.\n\n## Credits \u0026 references\n\nDevelopment of this project would not have been possible without\nthe [hashlink](https://github.com/HaxeFoundation/hashlink) source code. Most of the deserialization code is directly\nadapted from the original C code reading bytecode files. There is no real documentation for the bytecode or the inner workings of Hashlink, so reading through the source code was the main source of information.\n\nThere are also 2 blog articles on the Haxe website that proved to be interesting albeit a bit outdated :\n- https://haxe.org/blog/hashlink-indepth/\n- https://haxe.org/blog/hashlink-in-depth-p2/\n\n## Why Rust\n\nI should probably have used Haxe in the first place, that would have been the logical choice as tooling for a language\nis best done (I suppose) in that same language. But Rust makes it a joy to develop with its enums, match statements and\nmacros (I think those features are present in Haxe too, although I'm not at all familiar with this language).\nAlso, the Rust ecosystem feels much more alive.\n\nOne of the downside of using Rust here is that I can't pass references everywhere. The bytecode is a large graph where\nevery element can reference another, this by definition does not play well with Rust borrow-checking rules. To cope with\nthis, bytecode handling is working with the arena pattern. The `Bytecode` struct owns every element and we use indexes (\nwrapped in custom types) throughout the codebase. This might be a bit cumbersome to pass `code: \u0026Bytecode` and\ncalling `code.get()` everywhere but it works without ever dealing with lifetimes anywhere.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgui-yom%2Fhlbc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgui-yom%2Fhlbc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgui-yom%2Fhlbc/lists"}