{"id":15202738,"url":"https://github.com/zegl/tre","last_synced_at":"2025-10-28T23:31:14.472Z","repository":{"id":40761790,"uuid":"115428777","full_name":"zegl/tre","owner":"zegl","description":"LLVM backed progamming language (Go subset)","archived":false,"fork":false,"pushed_at":"2023-09-29T10:14:18.000Z","size":507,"stargazers_count":133,"open_issues_count":17,"forks_count":15,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-02-01T19:05:16.397Z","etag":null,"topics":["clang","golang","language","llvm","llvm-ir","programming-language"],"latest_commit_sha":null,"homepage":"","language":"Go","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/zegl.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},"funding":{"polar":"zegl"}},"created_at":"2017-12-26T14:24:31.000Z","updated_at":"2024-12-19T11:27:07.000Z","dependencies_parsed_at":"2024-06-18T22:36:21.215Z","dependency_job_id":"6afeb082-2c3a-43fa-bd89-ed3b27ccae08","html_url":"https://github.com/zegl/tre","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/zegl%2Ftre","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zegl%2Ftre/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zegl%2Ftre/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zegl%2Ftre/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zegl","download_url":"https://codeload.github.com/zegl/tre/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238737982,"owners_count":19522287,"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":["clang","golang","language","llvm","llvm-ir","programming-language"],"created_at":"2024-09-28T04:02:33.274Z","updated_at":"2025-10-28T23:31:14.147Z","avatar_url":"https://github.com/zegl.png","language":"Go","funding_links":["https://polar.sh/zegl"],"categories":[],"sub_categories":[],"readme":"# tre\n\n\u003e A LLVM backed Go compiler.\n\n`tre` is built in Go and can compile a subset of Go code to LLVM IR. Clang is\nused to compile the IR to an executable.\n\n## Building \n\n```bash\n# Build tre and run a test program\ngo build ./cmd/tre \u0026\u0026 ./tre -d ./compiler/testdata/fib.go \u0026\u0026 ./fib\n```\n\n## Example\n\nExample program that calculates the fibonacci sequence.\n\n```go\nfunc fib(num int) int {\n    if num \u003c 2 {\n        return num\n    }\n\n    return fib(num-2) + fib(num-1)\n}\n\nfunc main() {\n    printf(\"%d\\n\", fib(34))\n}\n```\n\nMore examples of what's possible can be found in the [compiler testdata](https://github.com/zegl/tre/tree/master/compiler/testdata).\n\n## Features\n\n### Types\n\n- [x] int\n- [x] string\n- [x] struct\n- [x] array\n- [x] slice\n- [ ] [map](https://github.com/zegl/tre/issues/34)\n- [x] bool\n- [x] func\n- [ ] [chan](https://github.com/zegl/tre/issues/78)\n\n### Language features\n\n- [ ] [first class func](https://github.com/zegl/tre/issues/36) \n- [ ] packages\n- [x] methods\n- [x] pointers\n- [x] interfaces\n- [ ] [chan](https://github.com/zegl/tre/issues/78)\n- [ ] [goroutines](https://github.com/zegl/tre/issues/77)\n- [x] if/else if/else\n- [ ] switch\n\n## Dependencies\n\n* [clang](https://clang.llvm.org/) - Supports 8.0, 9.0, and 14\n* [llir/llvm](https://github.com/llir/llvm)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzegl%2Ftre","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzegl%2Ftre","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzegl%2Ftre/lists"}