{"id":30692292,"url":"https://github.com/pcercuei/lightrec","last_synced_at":"2025-09-02T04:51:05.630Z","repository":{"id":19153210,"uuid":"22384003","full_name":"pcercuei/lightrec","owner":"pcercuei","description":"MIPS-to-everything dynamic recompiler for PSX emulators","archived":false,"fork":false,"pushed_at":"2025-08-15T07:49:28.000Z","size":1536,"stargazers_count":160,"open_issues_count":0,"forks_count":11,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-08-15T09:24:45.824Z","etag":null,"topics":["c","dynarec","emulators","jit","mips","playstation"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pcercuei.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","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,"zenodo":null}},"created_at":"2014-07-29T15:04:39.000Z","updated_at":"2025-08-15T07:49:32.000Z","dependencies_parsed_at":"2023-02-19T02:35:18.477Z","dependency_job_id":"b6c0b6c9-2b2e-4a65-b742-91d934e2a3c5","html_url":"https://github.com/pcercuei/lightrec","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/pcercuei/lightrec","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pcercuei%2Flightrec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pcercuei%2Flightrec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pcercuei%2Flightrec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pcercuei%2Flightrec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pcercuei","download_url":"https://codeload.github.com/pcercuei/lightrec/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pcercuei%2Flightrec/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273233264,"owners_count":25068731,"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","status":"online","status_checked_at":"2025-09-02T02:00:09.530Z","response_time":77,"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":["c","dynarec","emulators","jit","mips","playstation"],"created_at":"2025-09-02T04:50:51.618Z","updated_at":"2025-09-02T04:51:05.619Z","avatar_url":"https://github.com/pcercuei.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Lightrec\n\nLightrec is a MIPS-to-everything dynamic recompiler for\nPlayStation emulators, using\n[GNU Lightning](https://www.gnu.org/software/lightning/)\nas the code emitter.\n\nAs such, in theory it should be able to run on every CPU that Lightning\ncan generate code for; including, but not limited to, __x86__, __x86_64__,\n__ARM__, __Aarch64__, __MIPS__, __PowerPC__, __SH4__ and __Risc-V__.\n\n## Features\n\n* __High-level optimizations__.  The MIPS code is first pre-compiled into\na form of Intermediate Representation (IR).\nBasically, just a single-linked list of structures representing the\ninstructions. On that list, several optimization steps are performed:\ninstructions are modified, reordered, tagged; new meta-instructions\ncan also be added.\n\n* __Lazy compilation__.\nIf Lightrec detects a block of code that would be very hard to\ncompile properly (e.g. a branch with a branch in its delay slot),\nthe block is marked as not compilable, and will always be emulated\nwith the built-in interpreter. This allows to keep the code emitter\nsimple and easy to understand.\n\n* __Run-time profiling__.\nThe generated code will gather run-time information about the I/O access\n(whether they hit RAM, or hardware registers).\nThe code generator will then use this information to generate direct\nread/writes to the emulated memories, instead of jumping to C for\nevery call.\n\n* __Threaded compilation__.\nWhen entering a loading zone, where a lot of code has to be compiled,\nwe don't want the compilation process to slow down the pace of emulation.\nTo avoid that, the code compiler optionally runs on a thread, and the\nmain loop will emulate the blocks that have not been compiled yet with\nthe interpreter. This helps to drastically reduce the stutter that\ntypically happens when a lot of new code is run.\n\n## Emulators\n\nLightrec has been ported to the following emulators:\n\n* [__PCSX-ReArmed__ (libretro)](https://github.com/libretro/pcsx_rearmed)\n\n* [__Beetle__ (libretro)](https://github.com/libretro/beetle-psx-libretro/)\n\n* [__CubeSX/WiiSX__](https://github.com/emukidid/pcsxgc/)\n\n* [__Bloom__](https://github.com/pcercuei/bloom)\n\n[![Star History Chart](https://api.star-history.com/svg?repos=pcercuei/lightrec\u0026type=Date)](https://star-history.com/#pcercuei/lightrec\u0026Date)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpcercuei%2Flightrec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpcercuei%2Flightrec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpcercuei%2Flightrec/lists"}