{"id":25319406,"url":"https://github.com/xia-mc/clang-mc","last_synced_at":"2025-04-07T18:31:03.930Z","repository":{"id":277215766,"uuid":"931709732","full_name":"xia-mc/clang-mc","owner":"xia-mc","description":"A Development Toolchain for Minecraft Datapacks.","archived":false,"fork":false,"pushed_at":"2025-03-28T09:57:02.000Z","size":213,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-28T10:45:15.866Z","etag":null,"topics":["compiler","llvm","minecraft","minecraft-datapack","programming","stdlib","toolchain"],"latest_commit_sha":null,"homepage":"","language":"C++","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/xia-mc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2025-02-12T18:18:20.000Z","updated_at":"2025-03-28T09:57:06.000Z","dependencies_parsed_at":"2025-02-12T19:33:44.217Z","dependency_job_id":"e727a9dc-b831-4e02-85a5-073c066b0441","html_url":"https://github.com/xia-mc/clang-mc","commit_stats":null,"previous_names":["xia-mc/clang-mc"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xia-mc%2Fclang-mc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xia-mc%2Fclang-mc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xia-mc%2Fclang-mc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xia-mc%2Fclang-mc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xia-mc","download_url":"https://codeload.github.com/xia-mc/clang-mc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247707005,"owners_count":20982713,"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","llvm","minecraft","minecraft-datapack","programming","stdlib","toolchain"],"created_at":"2025-02-13T20:20:47.826Z","updated_at":"2025-04-07T18:31:03.917Z","avatar_url":"https://github.com/xia-mc.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\nEnglish | [简体中文](./README_CN.md)\n\n# clang-mc\n\n## A Development Toolchain for Minecraft Datapacks\n\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)\n[![Issues](https://img.shields.io/github/issues/xia-mc/clang-mc)](https://github.com/xia-mc/clang-mc/issues)\n![Total lines](https://tokei.rs/b1/github/xia-mc/clang-mc?style=flat)\n![Version](https://img.shields.io/badge/Minecraft-1.21_and_later-blue)\n\n\u003c/div\u003e\n\n\u003e [!NOTE]\n\u003e `clang-mc` is in the early stages of development, and many features are not yet complete. Contributions and feedback are welcome!\n\n## Introduction\n\n`clang-mc` is a **compiler toolchain** designed specifically for **Minecraft datapack development**. It aims to provide a more efficient and maintainable development environment while offering a standard library to reduce redundant implementations of common functionalities.\n\nMinecraft datapack development has long suffered from **poor readability, maintenance challenges, and functional limitations**. For example:\n- **Lack of modern programming language features**: String manipulation, floating-point arithmetic, and large integer operations are extremely difficult to implement.\n- **Disorganized code structure**: Datapacks often rely on a large number of manually written commands, and many requirements must be indirectly implemented using multiple `.mcfunction` files, making reuse and expansion difficult.\n\nThis project seeks to address these issues to some extent.\n\nCheck out [Wiki](https://github.com/xia-mc/clang-mc/wiki) to learn more.\n\n---\n\n## Roadmap\n\n- [x] **Basic implementation of the `stdlib` standard library**, establishing a low-overhead virtual machine model on `mcfunction`.\n- [x] **Write a wiki** to define calling conventions, register conventions, stack conventions, etc.\n- [x] **Implement an assembler (IR)** to translate IR into `mcfunction` code based on `stdlib`.\n- [x] **Develop a parser** to convert assembly code into IR objects.\n- [ ] **Create a showcase** to demonstrate the advantages of this project and how it improves datapack readability while reducing redundant implementations.\n- [ ] **Enhance `stdlib`** with more advanced abstractions.\n- [ ] **(Long-term goal) Implement an LLVM backend** to generate assembly code (IR).\n- [ ] **(Long-term goal) Achieve compatibility with C/C++/Rust ecosystems**, leveraging LLVM to extend the capabilities of `mcfunction`.\n\n---\n\n## Contributions\n\nContributions are welcome! Feel free to submit issues or pull requests.  \nPlease note that this project is still in its early stages, and we greatly appreciate any feedback or suggestions.\n\n---\n\n## Acknowledgments\n\nWithout these projects, `clang-mc` would not exist:\n\n- [Minecraft](https://www.minecraft.net) - Minecraft, developed by Mojang Studios, `clang-mc` complies with the [Minecraft EULA](https://www.minecraft.net/en-us/eula) and related terms of use.\n- [LLVM](https://llvm.org) - A powerful compiler infrastructure, open-sourced under the Apache License 2.0.\n- [ankerl::unordered_dense](https://github.com/martinus/unordered_dense): A modern, high-performance, low-memory hash table implementation in C++, licensed under the [MIT License](https://github.com/martinus/unordered_dense/blob/main/LICENSE).\n- [fmt](https://fmt.dev/) - A fast and safe formatting library for C++, licensed under the [MIT License](https://github.com/fmtlib/fmt/blob/master/LICENSE.rst).\n- [spdlog](https://github.com/gabime/spdlog) - A fast C++ logging library, licensed under the [MIT License](https://github.com/gabime/spdlog/blob/v1.x/LICENSE).\n- [yaml-cpp](https://github.com/jbeder/yaml-cpp) - A YAML parser and emitter for C++, licensed under the [MIT License](https://github.com/jbeder/yaml-cpp/blob/master/LICENSE).\n\nSpecial thanks to all contributors in the open-source community!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxia-mc%2Fclang-mc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxia-mc%2Fclang-mc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxia-mc%2Fclang-mc/lists"}