{"id":13471950,"url":"https://github.com/hxdefold/hxdefold","last_synced_at":"2025-08-24T00:04:36.468Z","repository":{"id":45876985,"uuid":"60483806","full_name":"hxdefold/hxdefold","owner":"hxdefold","description":"Haxe/Lua externs for Defold game engine","archived":false,"fork":false,"pushed_at":"2024-05-14T08:38:24.000Z","size":818,"stargazers_count":216,"open_issues_count":9,"forks_count":18,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-05-20T06:04:33.673Z","etag":null,"topics":["defold-game-engine","haxe","lua","lua-externs"],"latest_commit_sha":null,"homepage":null,"language":"Haxe","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/hxdefold.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2016-06-05T22:17:23.000Z","updated_at":"2025-05-18T15:57:52.000Z","dependencies_parsed_at":"2024-01-07T12:20:52.641Z","dependency_job_id":"88322796-d1bf-43a4-a13e-c6dc3ee71ae5","html_url":"https://github.com/hxdefold/hxdefold","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/hxdefold/hxdefold","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hxdefold%2Fhxdefold","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hxdefold%2Fhxdefold/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hxdefold%2Fhxdefold/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hxdefold%2Fhxdefold/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hxdefold","download_url":"https://codeload.github.com/hxdefold/hxdefold/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hxdefold%2Fhxdefold/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271774047,"owners_count":24818405,"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-08-23T02:00:09.327Z","response_time":69,"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":["defold-game-engine","haxe","lua","lua-externs"],"created_at":"2024-07-31T16:00:50.642Z","updated_at":"2025-08-24T00:04:36.318Z","avatar_url":"https://github.com/hxdefold.png","language":"Haxe","funding_links":[],"categories":["Haxe","Tools","Game engines"],"sub_categories":["Programming Language"],"readme":"![image](https://cloud.githubusercontent.com/assets/576184/15849567/80f4ada8-2c93-11e6-8430-5b5dbe5e58a3.png)\n\n# Haxe support library for the [Defold](https://www.defold.com/) game engine\n\n![Defold API version: 1.6.4](https://img.shields.io/badge/api%20version-1.6.4-orange.svg)\n\nThis library allows writing beautiful [Haxe](https://haxe.org/) code for the [Defold](https://www.defold.com/) game engine \\o/\n\n## Features\n - Fully typed Defold API with proper compile-time errors and IDE services.\n - Type-safe game object messages and properties with zero overhead.\n - Strengths of Haxe without compromises: powerful type system, meta-programming, static optimizations, dead code elimination and cross-target code sharing.\n - Defold hot reloading is now supported!\n\n## Quick start\n\n(assuming you already [installed Haxe](https://haxe.org/download/)😊)\n\n - Install this library:\n    - From this repo: `haxelib git hxdefold https://github.com/hxdefold/hxdefold`\n    - Or from [lib.haxe.org](https://lib.haxe.org/): `haxelib install hxdefold`\n - Run `haxelib run hxdefold init` inside your Defold project. It will create a sample `Hello.hx` script component class and a `build.hxml` for building it.\n - Read the comments in these files to quickly get some idea.\n - Build with `haxe build.hxml` to get the lua output.\n - Add `Hello.script` to your game object in the editor and observe the greeting in the debug console.\n - Proceed with writing well-structured, expressive and type safe code for your Defold game.\n\n## How does it look like\n\n```haxe\nimport defold.support.Script;\n\n// component class that defines the callback methods\n// after compiling Haxe, the `Hello.script` will appear in the Defold project that can be attached to game objects\nclass Hello extends Script\u003cHelloData\u003e {\n\n    // fields with @property annotation will show up in the editor\n    @property var power:Int = 9000;\n\n    // the `init` callback method\n    override function init() {\n        trace('Haxe is over ${power}!'); // will be printed to the debug console\n    }\n\n    // the `update` callback method\n    override function update(dt:Float) {}\n}\n```\n\n## Documentation\n\nHere is the [API reference](http://hxdefold.github.io/hxdefold/).\n\nMigration to v2 is documented in the [v2 pull request](https://github.com/hxdefold/hxdefold/pull/37).\n\nDetails about usage can be found on [the wiki](https://github.com/hxdefold/hxdefold/wiki).\n\nAnd here are some example Defold projects, ported from Lua:\n* https://github.com/hxdefold/hxdefold-bunnymark\n\n\n## How does it work?\n\nSince version 3.4, Haxe supports compiling to Lua, making it possible to use Haxe with Lua-based engines, such as Defold.\n\nHowever, this requires a bit of autogenerated glue code, because Defold expects scripts to be in separate files, while Haxe compiles everything in a single lua module. So what we do, is generate a simple glue `.script` file for each class extending the magic `defold.support.Script` base class (there are also `GuiScript` and `RenderScript`).\n\nFor example, for the `Hello` script from this README, this glue code is generated in the `Hello.script` file:\n\n```lua\n-- Generated by Haxe, DO NOT EDIT (original source: src/Hello.hx:11: lines 11-16)\n\ngo.property(\"power\", 9000)\n\nrequire \"main\"\n\nfunction init(self)\n    _hxdefold_.Hello_init(self)\nend\n```\n\nYou can then add this script to the game objects in the Defold Editor.\n\n\n## Versions\n\n- **Major** number will be incremented for significant reworks that are certainly forward-breaking.\n- **Minor** number will be incremented when updating to a new Defold API version. These updates may come with forward-breaking changes.\n- **Patch** version will be incremented for bug fixes and potentially backwards-breaking changes.\n\nNote that this is not standard [semver](https://semver.org/), since we might potentially ship backwards-breaking changes that increment only the patch number.\n\n| hxdefold | Haxe | Defold API |\n|:--------:|:----:|:----------:|\n| 2.0.*    | 4.3  | 1.6.4      |\n\n\n\n## Logo\n\nMade by the awesome [**@markknol**](https://github.com/markknol). Check out [his website](https://blog.stroep.nl/) for more art\u0026code!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhxdefold%2Fhxdefold","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhxdefold%2Fhxdefold","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhxdefold%2Fhxdefold/lists"}