{"id":22369863,"url":"https://github.com/zeozeozeo/ebitengine-imgui-go","last_synced_at":"2025-07-30T19:31:18.968Z","repository":{"id":64301639,"uuid":"571171662","full_name":"zeozeozeo/ebitengine-imgui-go","owner":"zeozeozeo","description":"Ebitengine rendering backend for the pure Go ImGui port","archived":false,"fork":false,"pushed_at":"2024-11-22T19:12:57.000Z","size":5270,"stargazers_count":21,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-22T20:20:22.891Z","etag":null,"topics":["ebitengine","gamedev","golang","imgui","pure-go","wasm","webassembly"],"latest_commit_sha":null,"homepage":"https://zeozeozeo.github.io/ebitengine-imgui-go/internal/example","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zeozeozeo.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-11-27T12:04:29.000Z","updated_at":"2024-11-22T19:12:54.000Z","dependencies_parsed_at":"2023-02-10T22:01:21.293Z","dependency_job_id":"da8eb706-c63c-4019-86af-2aeb2b94fbb7","html_url":"https://github.com/zeozeozeo/ebitengine-imgui-go","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeozeozeo%2Febitengine-imgui-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeozeozeo%2Febitengine-imgui-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeozeozeo%2Febitengine-imgui-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeozeozeo%2Febitengine-imgui-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zeozeozeo","download_url":"https://codeload.github.com/zeozeozeo/ebitengine-imgui-go/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228178422,"owners_count":17881030,"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":["ebitengine","gamedev","golang","imgui","pure-go","wasm","webassembly"],"created_at":"2024-12-04T19:29:30.526Z","updated_at":"2024-12-04T19:29:31.338Z","avatar_url":"https://github.com/zeozeozeo.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ebitengine rendering backend for the [pure Go imgui port](https://github.com/Splizard/imgui)\n\nThis uses a [fork](https://github.com/zeozeozeo/imgui) of the version by [Splizard](https://github.com/Splizard), which adds some minor changes to it.\n\n[![Example](https://github.com/zeozeozeo/ebitengine-imgui-go/blob/main/internal/example/example.gif?raw=true)](https://zeozeozeo.github.io/ebitengine-imgui-go/internal/example)\n\n# [Live demo](https://zeozeozeo.github.io/ebitengine-imgui-go/internal/example)\n\n# [Example](https://github.com/zeozeozeo/ebitengine-imgui-go/blob/main/internal/example/main.go)\n\n# Benefits of not using CGo\n\n-   Cross-compilation\n-   WebAssembly\n-   Pure Go :D\n\n# Building the example for WebAssembly\n\n1. Clone the repository\n2. Navigate into the example directory: `cd internal/example` (on Linux)\n3. Build the example:\n\n    On Linux:\n\n    ```\n    env GOOS=js GOARCH=wasm go build -o example.wasm main.go\n    ```\n\n    On Windows Powershell:\n\n    ```\n    $Env:GOOS = 'js'\n    $Env:GOARCH = 'wasm'\n    go build -o yourgame.wasm github.com/yourname/yourgame\n    Remove-Item Env:GOOS\n    Remove-Item Env:GOARCH\n    ```\n\n4. Copy `wasm_exec.js` into the current directory:\n\n    On Linux:\n\n    ```\n    cp $(go env GOROOT)/misc/wasm/wasm_exec.js .\n    ```\n\n    On Windows Powershell:\n\n    ```\n    $goroot = go env GOROOT\n    cp $goroot\\misc\\wasm\\wasm_exec.js .\n    ```\n\n5. Create this HTML file\n\n    ```html\n    \u003c!DOCTYPE html\u003e\n    \u003cscript src=\"wasm_exec.js\"\u003e\u003c/script\u003e\n    \u003cscript\u003e\n        // Polyfill\n        if (!WebAssembly.instantiateStreaming) {\n            WebAssembly.instantiateStreaming = async (resp, importObject) =\u003e {\n                const source = await (await resp).arrayBuffer();\n                return await WebAssembly.instantiate(source, importObject);\n            };\n        }\n\n        const go = new Go();\n        WebAssembly.instantiateStreaming(\n            fetch(\"example.wasm\"),\n            go.importObject\n        ).then((result) =\u003e {\n            go.run(result.instance);\n        });\n    \u003c/script\u003e\n    ```\n\n6. Start a local HTTP server and open the page in your browser\n\nIf you want to embed the game into another page, use iframes (assuming that `main.html` is the name of the above HTML file):\n\n```\n\u003c!DOCTYPE html\u003e\n\u003ciframe src=\"main.html\" width=\"640\" height=\"480\" allow=\"autoplay\"\u003e\u003c/iframe\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeozeozeo%2Febitengine-imgui-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzeozeozeo%2Febitengine-imgui-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeozeozeo%2Febitengine-imgui-go/lists"}