{"id":13730021,"url":"https://github.com/jac3km4/redscript","last_synced_at":"2025-05-08T02:31:01.474Z","repository":{"id":43308180,"uuid":"325444883","full_name":"jac3km4/redscript","owner":"jac3km4","description":"Compiler/decompiler toolkit for redscript","archived":false,"fork":false,"pushed_at":"2025-04-30T21:38:09.000Z","size":2076,"stargazers_count":441,"open_issues_count":11,"forks_count":38,"subscribers_count":20,"default_branch":"1.0.x","last_synced_at":"2025-04-30T22:33:54.951Z","etag":null,"topics":["compiler","cyberpunk2077","decompiler","language","modding"],"latest_commit_sha":null,"homepage":"","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/jac3km4.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2020-12-30T03:28:01.000Z","updated_at":"2025-04-30T21:38:11.000Z","dependencies_parsed_at":"2022-07-18T21:34:22.360Z","dependency_job_id":"673c416c-007e-4ab1-9ba9-9b73e46c14e3","html_url":"https://github.com/jac3km4/redscript","commit_stats":null,"previous_names":[],"tags_count":86,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jac3km4%2Fredscript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jac3km4%2Fredscript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jac3km4%2Fredscript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jac3km4%2Fredscript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jac3km4","download_url":"https://codeload.github.com/jac3km4/redscript/tar.gz/refs/heads/1.0.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252986669,"owners_count":21836203,"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":["compiler","cyberpunk2077","decompiler","language","modding"],"created_at":"2024-08-03T02:01:08.833Z","updated_at":"2025-05-08T02:31:01.461Z","avatar_url":"https://github.com/jac3km4.png","language":"Rust","readme":"\u003cimg align=\"left\" width=\"0px\" height=\"18px\"/\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/11986158/145484796-9bf1f77f-e706-4e15-b46b-c9b949f0086c.png\" align=\"left\" width=\"100px\" height=\"100px\"/\u003e\n\n\u003ch3\u003eREDscript\u003c/h3\u003e\n\nREDscript is a statically-typed, object-oriented programming language designed for developing scripts for the REDengine, CD Projekt's game engine used in Cyberpunk 2077. If you want to learn more about the language, visit the [official wiki](https://wiki.redmodding.org/redscript).\n\n## Installation\n\nTo compile your scripts automatically on game startup, follow these steps:\n\n- Download the `redscript-mod-{version}.zip` archive from the [latest release](https://github.com/jac3km4/redscript/releases/latest).\n- Extract it into the main `Cyberpunk 2077` directory.\n- When you start the game, successful setup can be confirmed with logs appearing in `Cyberpunk 2077/r6/logs/redscript_rCURRENT.log`.\n\n## Editor Support\n\nREDscript provides extensive editor tooling, including a language server and a debugger that integrate with many popular editors such as VSCode, neovim, IntelliJ IDEA, Zed, and Helix. For detailed setup instructions, check out the [REDscript IDE repository](https://github.com/jac3km4/redscript-ide).\n\n## Project Structure\n\nThis project includes various tools for working with REDscript, such as a compiler, a decompiler, and a formatter. These are organized as modular Rust crates located in the `crates` directory:\n\n- **`cli`** - Exposes a command-line interface serving as the entry point for all tools in this project.\n- **`compiler/frontend`** - Performs static analysis on REDscript syntax, lowering it to an intermediate representation.\n- **`compiler/backend`** - Generates bytecode from the intermediate representation and handles monomorphization for generic functions and types.\n- **`compiler/api`** - Provides a high-level API for interacting seamlessly with the compiler.\n- **`decompiler`** - Decompiles bytecode back into REDscript source code.\n- **`io`** - Reads and writes binary files in the native REDengine format.\n- **`scc/cli`** - Exposes a CLI that acts as a drop-in replacement for the original compiler made by CD Projekt.\n- **`scc/capi`** - Exposes a C API with an interface similar to the `scc` CLI, but with some additional capabilities like source mapping.\n- **`scc/shared`** - Contains common code used across the scc C API and CLI.\n- **`syntax/ast`** - Defines the Abstract Syntax Tree (AST) for REDscript.\n- **`syntax/formatter`** - Formats REDscript source code according to configuration.\n- **`syntax/parser`** - Parses REDscript source code into the AST.\n- **`dotfile`** - Parses the configuration `.redscript` file.\n\n### Component Diagram\n\u003cimg width=\"100%\" height=\"750px\" src=\"https://mermaid.ink/svg/pako:eNqtlFGPmkAQx78Kmb5wicciIgpNmiiI-tCk6fl04MMKq1KBJbtLojV-9y5LtXfN0TZeH0iWYf7_38yyO2dIaErAgx3D1V5bBXGpaZMoBl-GNX1FjuIhhrX2-PhJm-rRF8w4YeuHj03aVEX9aPK0WquArwKBruRFleWEaSGjpSBlKk1aVaCSZtHyayuaqffwlWiKk8NLTahy5tH0JEhTb6ucq-hCjwIZbJU_8xdtZS-KWupRSFmBhbglLdWHiVo3T5JnyUE2FcNeiIp7CO0ysa83hjRH33AyOBQ2YiTlCcsqgQQjBPUN0ziihGFBOOKnUuAjqtQexSCNnmjNEhJDY8_FKSfSPqE5Zd4H03Td7fYX1383F3PRAfW7oMH90OuOo-3tB7_JDrrYs39lb3K6-QsbcZagjBmMd1Qx66oi_A87sLme1jfRYRd6fv8GZLTtuOTiD03Pu8iL-5tOb1etA7rogi7ffcC31wvcgV7-joaeHGtZCt4W55z0oCDSoHmHs7r0IPakkBaeXKaYHRqzixRVuHymtABPsFrKGK13-5tJXaWyqCDDcmIWtyiTB4Awn9alAG8wspQJeGc4gmePjb5jjhzHMftDxxr24ASeMzYcyxpZjm2btuU67qUH3xXUNMa2PRi5tpT0zfHQGvSApJmg7HM7qtXEvvwAQCLa_g\"/\u003e\n","funding_links":[],"categories":["Modding resources","Rust"],"sub_categories":["Frameworks"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjac3km4%2Fredscript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjac3km4%2Fredscript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjac3km4%2Fredscript/lists"}