{"id":22145182,"url":"https://github.com/hissssst/tria","last_synced_at":"2025-07-26T02:31:13.353Z","repository":{"id":65390463,"uuid":"301663834","full_name":"hissssst/tria","owner":"hissssst","description":"Elixir optimizing compiler","archived":false,"fork":false,"pushed_at":"2024-04-08T13:07:46.000Z","size":446,"stargazers_count":54,"open_issues_count":3,"forks_count":3,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-04-08T14:28:11.684Z","etag":null,"topics":["compiler","elixir","optimization","transpiler"],"latest_commit_sha":null,"homepage":"","language":"Elixir","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/hissssst.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2020-10-06T08:37:30.000Z","updated_at":"2024-04-08T14:28:12.817Z","dependencies_parsed_at":"2024-04-08T14:38:25.661Z","dependency_job_id":null,"html_url":"https://github.com/hissssst/tria","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/hissssst%2Ftria","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hissssst%2Ftria/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hissssst%2Ftria/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hissssst%2Ftria/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hissssst","download_url":"https://codeload.github.com/hissssst/tria/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227641894,"owners_count":17797842,"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","elixir","optimization","transpiler"],"created_at":"2024-12-01T22:41:29.101Z","updated_at":"2024-12-01T22:41:29.540Z","avatar_url":"https://github.com/hissssst.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tria\n\n\u003e WARNING This is a development version\n\u003e Compiler is unstable and may break some code\n\nAn optimizing compiler for elixir.\n\n## How to use\n\n1. Add a dependency\n```elixir\ndef deps do\n  [\n    {:tria, github: \"hissssst/tria\"}\n  ]\nend\n```\n\n2. Add a compiler and remove protocol consolidation\n```elixir\ndef project do\n  [\n    ...\n    consolidate_protocols: false,\n    compilers: [:erlang, :tria, :app]\n  ]\nend\n```\n\n3. `mix compile \u0026\u0026 mix tria.warmup --available`\nThis compiles the deps, and warms up the cache of used functions\n\n4. Project is ready to use now\n\n## Features\n\n1. Constant evaluation. Plain Elixir and Erlang are unable to evaluate so-called remote call. Tria evalutes what can be evaluated in runtime\n\n2. Enum fusion. Tria joins multiple consequent Enum or Stream calls to most optimal form.\n\n3. `map.field` optimization. This construction is now 3 times faster\n\n## Reporting bugs\n\nJust use `mix tria.report \"INSERT BUG TITLE HERE\"` and it will automatically open tracker with information about system and env prefilled\n\n## How to debug\n\n```sh\nexport TRIA_DEBUG=1\nexport TRIA_TRACE=\"Module.function/1,Foo.bar/2\"\n```\n\nThis will print all steps of compilation of the `Module.function/arity` function . Each step will be named and will be possible to grep in the exact same format.\nPlus, `TRIA_DEBUG` increases verbosity of compiler and generates `tria_global_context.ex` file which contains the final version of the code after all optimizations.\n\n## Tria language\n\nTria is a language, it differs from Elixir, but it is mostly Elixir\nand it is represented similary to `Macro.t()`. Tria is designed specifically\nfor optimizing transformations, like any IR language and has a specific\nSingle Static Assignment form translator.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhissssst%2Ftria","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhissssst%2Ftria","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhissssst%2Ftria/lists"}