{"id":43779448,"url":"https://github.com/thagore-foundation/thagore","last_synced_at":"2026-04-24T06:02:36.883Z","repository":{"id":338275002,"uuid":"1155858133","full_name":"thagore-foundation/thagore","owner":"thagore-foundation","description":"A robust, self-hosted systems programming language with manual memory management and LLVM backend.","archived":false,"fork":false,"pushed_at":"2026-02-23T23:44:18.000Z","size":93846,"stargazers_count":19,"open_issues_count":1,"forks_count":2,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-24T06:09:46.015Z","etag":null,"topics":["compiler","language-design","llvm","rust-alternative","self-hosted","systems-programming"],"latest_commit_sha":null,"homepage":"https://thagore.org","language":"LLVM","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/thagore-foundation.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null},"funding":{"github":["thagore-foundation"],"patreon":null,"open_collective":null,"ko_fi":"lehungquangminh","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":null,"thanks_dev":null,"custom":null}},"created_at":"2026-02-12T01:30:56.000Z","updated_at":"2026-02-23T09:36:25.000Z","dependencies_parsed_at":"2026-02-17T20:01:19.555Z","dependency_job_id":null,"html_url":"https://github.com/thagore-foundation/thagore","commit_stats":null,"previous_names":["thagore-foundation/thagore"],"tags_count":162,"template":false,"template_full_name":null,"purl":"pkg:github/thagore-foundation/thagore","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thagore-foundation%2Fthagore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thagore-foundation%2Fthagore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thagore-foundation%2Fthagore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thagore-foundation%2Fthagore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thagore-foundation","download_url":"https://codeload.github.com/thagore-foundation/thagore/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thagore-foundation%2Fthagore/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29963125,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T06:55:38.174Z","status":"ssl_error","status_checked_at":"2026-03-01T06:53:04.810Z","response_time":124,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["compiler","language-design","llvm","rust-alternative","self-hosted","systems-programming"],"created_at":"2026-02-05T18:03:31.443Z","updated_at":"2026-04-24T06:02:36.877Z","avatar_url":"https://github.com/thagore-foundation.png","language":"LLVM","funding_links":["https://github.com/sponsors/thagore-foundation","https://ko-fi.com/lehungquangminh"],"categories":[],"sub_categories":[],"readme":"# Thagore\n\nThagore is a statically typed, compiled programming language designed for expressive safety\nguarantees and high-performance code generation. Source files use the `.tg` extension.\n\n\u003e **This branch is the clean-slate Rust rewrite of the compiler toolchain.**\n\u003e The legacy implementation is preserved on `codex/legacy-codebase`.\n\n---\n\n## Language Design Goals\n\n### `intent` — Static Intent Engine\n\nDescribe *what* a function should achieve; the compiler selects and verifies the most\nefficient deterministic implementation at build time. No runtime inference, no network\ndependency.\n\n```tg\nintent func dedup_sorted(xs: [i32]) -\u003e [i32]:\n    goal: deduplicate_sorted\n    constraints:\n        time \u003c= O(n)\n        deterministic == true\n```\n\n### `typestate` — Compile-time Lifecycle Safety\n\nAnnotate API boundaries with `Type[State]` to let the compiler reject invalid call sequences.\nUnannotated types are unaffected — the feature is fully opt-in.\n\n```tg\nstate Session:\n    Init\n    Ready\n    Closed\n\nfunc open(cfg: Config) -\u003e Session[Ready]:  ...\nfunc send(s: Session[Ready], msg: String) -\u003e Session[Ready]:  ...\nfunc close(s: Session[Ready]) -\u003e Session[Closed]:  ...\n```\n\n### `flow` — Saga as Language Primitive\n\nExpress multi-step side effects with built-in compensation, retry, timeout, and crash\nrecovery directly in source code.\n\n```tg\nflow deploy(input: DeployInput) -\u003e Result\u003cDeployOut, DeployErr\u003e:\n    step vm = cloud.create_vm(input.spec)\n        undo cloud.delete_vm(vm.id)\n        retry 2 backoff exp(200ms, 2.0)\n        timeout 20s\n        idempotent\n\n    step pkg = artifact.upload(input.bundle)\n        undo artifact.delete(pkg.id)\n        timeout 30s\n\n    return Ok(DeployOut(vm.id, pkg.id))\n```\n\n---\n\n## Rewrite Status\n\n| Crate | Status |\n|---|---|\n| `crates/lexer` | Implemented — DFA tokeniser, string interning, error recovery |\n| `crates/ast` | Implemented — arena-allocated nodes for all declarations, expressions, statements, types |\n| `crates/parser` | Implemented — recursive-descent parser with structured error recovery |\n| `crates/typeck` | Implemented — scope analysis, type inference, structured diagnostics |\n| `crates/ir` | Implemented — typed lowering and module-aware IR generation |\n| `crates/codegen` | Implemented — LLVM 14 backend, object emission, linker integration |\n| `crates/interpreter` | Implemented — browser-safe interpreter used by the playground |\n| `crates/module_graph` | Implemented — module resolution, dependency graph, import table |\n| `tools/thagore-cli` | Implemented — `thagc` / `thagore` compiler driver |\n| `tools/thagore-fmt` | Implemented — AST-based formatter |\n| `tools/thagore-lsp` | Implemented — stdio LSP server |\n| `playground/wasm` | Implemented — browser WASM bridge for the static playground |\n\n---\n\n## Repository Layout\n\n```\ncrates/\n  lexer/          Tokeniser (DFA, string interning, error recovery)\n  ast/            Arena-allocated AST node types\n  parser/         Recursive-descent parser\n  typeck/         Type checker and structured diagnostics\n  ir/             Intermediate representation and lowering\n  codegen/        LLVM backend and artifact emission\n  interpreter/    Tree-walking interpreter for playground/WASM\n  module_graph/   Module resolution, graph build, import table\n\ntools/\n  thagore-cli/    Command-line compiler driver (`thagc`, `thagore`)\n  thagore-fmt/    Official formatter\n  thagore-lsp/    Language server (LSP)\n  thagore-bench/  Comparative benchmark runner\n\nstdlib/           Standard library source\ntooling/\n  packaging/      Release target metadata shared by the CLI and workflows\n  release/        Archive packager, manifest generator, installers\n  community/      Release/support policy documents\n\ndocs/\n  starlight/      Documentation website (Astro Starlight)\n  architecture/   Architecture map and status docs\n  contributor-guide/\n  adr/\n\ntests/fixtures/   End-to-end test programs (.tg files)\n```\n\n---\n\n## Building from Source\n\n**Prerequisite:** current Rust toolchain, edition 2024.\n\n```bash\ncargo build --workspace\ncargo test --workspace\n```\n\nBuild the core toolchain:\n\n```bash\ncargo build -p thagore-cli -p thagore-fmt -p thagore-lsp --release\n```\n\nThe release system also supports packaged toolchain archives plus installer scripts:\n\n- POSIX installer: `tooling/release/thagup.sh`\n- PowerShell installer: `tooling/release/thagup.ps1`\n- Release policy: `tooling/community/release-support-policy.md`\n\nRecommended end-user install commands are pinned to a release tag, not `main`:\n\n```bash\ncurl -fsSL https://github.com/thagore-foundation/thagore/releases/latest/download/thagup.sh | sh\n```\n\n```powershell\nirm https://github.com/thagore-foundation/thagore/releases/latest/download/thagup.ps1 | iex\n```\n\nCurrent in-develop release targets:\n\n- `x86_64-unknown-linux-gnu`\n- `aarch64-unknown-linux-gnu`\n- `x86_64-unknown-linux-musl`\n- `aarch64-unknown-linux-musl`\n- `x86_64-apple-darwin`\n- `aarch64-apple-darwin`\n- `x86_64-pc-windows-msvc`\n- `aarch64-pc-windows-msvc`\n\n---\n\n## Documentation\n\nFull language and toolchain docs are published from `docs/starlight/` and deployed\nautomatically on push to `main`. To preview locally:\n\n```bash\ncd docs/starlight\nnpm install\nnpm run dev\n```\n\n---\n\n## Contributing\n\nSee [.github/CONTRIBUTING.md](.github/CONTRIBUTING.md).\nProject policy is enforced by [AGENTS.md](AGENTS.md) — read it before making any change.\n\n---\n\n## License\n\nApache-2.0 — see [LICENSE](LICENSE).\n\n## Security\n\nDo not open public issues for security vulnerabilities.\nReport privately to **support@thagore.io.vn**.\nSee [.github/SECURITY.md](.github/SECURITY.md) for the full disclosure policy.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthagore-foundation%2Fthagore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthagore-foundation%2Fthagore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthagore-foundation%2Fthagore/lists"}