{"id":17736231,"url":"https://github.com/vilsol/go-mlog","last_synced_at":"2025-11-03T18:32:16.472Z","repository":{"id":43154596,"uuid":"323457903","full_name":"Vilsol/go-mlog","owner":"Vilsol","description":"Go to Mindustry (MLOG) compiler, runtime and decompiler (WIP)","archived":false,"fork":false,"pushed_at":"2023-03-07T02:38:11.000Z","size":15629,"stargazers_count":28,"open_issues_count":6,"forks_count":7,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-21T17:03:45.147Z","etag":null,"topics":["compiler","go","golang","mindustry","mindustry-logic","mlog","transpiler"],"latest_commit_sha":null,"homepage":"https://vilsol.github.io/go-mlog-web/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Vilsol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":"FUNDING.yml","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},"funding":{"github":["Vilsol"]}},"created_at":"2020-12-21T22:03:07.000Z","updated_at":"2025-04-22T06:14:55.000Z","dependencies_parsed_at":"2024-06-19T00:32:08.205Z","dependency_job_id":null,"html_url":"https://github.com/Vilsol/go-mlog","commit_stats":null,"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"purl":"pkg:github/Vilsol/go-mlog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vilsol%2Fgo-mlog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vilsol%2Fgo-mlog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vilsol%2Fgo-mlog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vilsol%2Fgo-mlog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Vilsol","download_url":"https://codeload.github.com/Vilsol/go-mlog/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vilsol%2Fgo-mlog/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261162060,"owners_count":23118219,"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","go","golang","mindustry","mindustry-logic","mlog","transpiler"],"created_at":"2024-10-26T00:06:07.670Z","updated_at":"2025-10-15T10:40:45.313Z","avatar_url":"https://github.com/Vilsol.png","language":"Go","funding_links":["https://github.com/sponsors/Vilsol"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n![](./.github/logo.png)\n\n# go-mlog\n\n![GitHub Workflow Status](https://img.shields.io/github/workflow/status/vilsol/go-mlog/build)\n![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/vilsol/go-mlog)\n[![codecov](https://codecov.io/gh/Vilsol/go-mlog/branch/master/graph/badge.svg?token=LFNKYWS0N2)](https://codecov.io/gh/Vilsol/go-mlog)\n[![CodeFactor](https://www.codefactor.io/repository/github/vilsol/go-mlog/badge)](https://www.codefactor.io/repository/github/vilsol/go-mlog)\n![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/vilsol/go-mlog)\n[![Go Reference](https://pkg.go.dev/badge/github.com/Vilsol/go-mlog.svg)](https://pkg.go.dev/github.com/Vilsol/go-mlog)\n\n\u003c/div\u003e\n\n## Web IDE\n\nA Web IDE is available [here](https://vilsol.github.io/go-mlog-web/?1)\n\n## Examples\n\nThere are several example programs available on [the wiki](https://github.com/Vilsol/go-mlog/wiki/Examples).\n\n## Supports\n\n* Functions\n* Multiple function parameters/arguments\n* Multiple function return values\n* `return` from functions\n* `for` loops\n* `if`/`else if`/`else` statements\n* `switch` statement\n* `break`/`continue`/`fallthrough` statements\n* Statement labeling\n* `goto` statements\n* Binary and Unary math\n* Function level variable scopes\n* Contextual errors\n* Tree-shaking unused functions\n* Multi-pass pre/post-processing\n* Stackless functions\n* Comment generation including source mapping\n* Sub-selector support\n* Type checking\n* Full variable block scoping\n\n## In Progress\n\n* MLOG Runtime\n* MLOG to Go decompiler\n\n## Roadmap\n\n* Nested sub-selector support\n* Merged compiler and decompiler registries\n* Constant string and number slices\n\n## Planned Optimizations\n\n* Simple jump instructions\n* Recursive constant propagation\n* Write directly to function return variable\n* Write directly to function parameters before jump\n* Single-reference function inlining\n\n## Design Limitations\n\n* Only hardcoded (translated) imports allowed\n* Single file support only\n* No recursion ([more info here](RECURSION.md))\n\n## Endgame Roadmap\n\n* Transpilation optimizations\n* Support tail-recursion\n\n## CLI Usage\n\n```\nUsage:\n  go-mlog [command]\n\nAvailable Commands:\n  completion  generate the autocompletion script for the specified shell\n  decompile   Decompile MLOG to Go\n  execute     Execute MLOG\n  help        Help about any command\n  transpile   Transpile Go to MLOG\n  trex        Transpile Go to MLOG and execute it\n  typings     Output typings as JSON\n  version     Print current go-mlog version\n\nFlags:\n      --colors               Force log output with colors\n      --comment-offset int   Comment offset from line start (default 60)\n      --comments             Output comments\n  -h, --help                 help for go-mlog\n      --log string           The log level to output (default \"info\")\n      --metrics              Output source metrics after execution\n      --numbers              Output line numbers\n      --output string        Output file. Outputs to stdout if unspecified\n      --source               Output source code after comment\n      --stacked string       Use a provided memory cell/bank as a stack\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvilsol%2Fgo-mlog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvilsol%2Fgo-mlog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvilsol%2Fgo-mlog/lists"}