{"id":13599895,"url":"https://github.com/amirrezaask/loki","last_synced_at":"2026-01-31T08:09:04.855Z","repository":{"id":40479135,"uuid":"485496354","full_name":"amirrezaask/loki","owner":"amirrezaask","description":"Loki, Simple experimental compiler that generates native binaries","archived":false,"fork":false,"pushed_at":"2024-07-30T02:52:57.000Z","size":768,"stargazers_count":51,"open_issues_count":0,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-07T01:39:40.905Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/amirrezaask.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-04-25T18:53:07.000Z","updated_at":"2024-11-02T13:59:33.000Z","dependencies_parsed_at":"2024-01-14T04:45:06.067Z","dependency_job_id":"546f5a9c-df92-4d32-abab-db4d2c1c9fa3","html_url":"https://github.com/amirrezaask/loki","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amirrezaask%2Floki","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amirrezaask%2Floki/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amirrezaask%2Floki/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amirrezaask%2Floki/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amirrezaask","download_url":"https://codeload.github.com/amirrezaask/loki/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248261995,"owners_count":21074229,"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":[],"created_at":"2024-08-01T17:01:16.466Z","updated_at":"2026-01-31T08:09:04.813Z","avatar_url":"https://github.com/amirrezaask.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# Loki\n\nLoki is an experimental programming language that I am building both to learn more about compilers and test ideas about language design.\n\n## Disclaimer\nSince I don't find rust to be a productive language anymore I am now trying to implement a similar langauge in GO which I will open source soon.\n\n## Installation\n\n```bash\ngit clone https://github.com/amirrezaask/loki.git\ncd loki\ncargo install --path .\n# if you have added cargo bins inside your path you can use loki command.\n```\n\n## How It works\n\nLoki compiler consists of multiple stages of compilation:\n\n- Lexer: produce a stream of tokens for each input file.\n- Parser: produces an IR structure for each file.\n- Type checker and inference: type inference and checking of the IR happens here.\n- Bytecode: lowering language features into simpler constructs happen here.\n- Backend code generation: this will produce code that gets compiled or assembled using a third party toolchain.\n  * C: Done.\n\n## Todos\n\n- Loki main should wrap user main function so we handle return int and stuff.\n- Default values for structs\n- Defer: *each function that have a defer usage, will have a label at the end (with a guard) so when user does return we first jump to defer run the instructions and then we come back and return.\n- Unions\n- Type table in output binary + access through #type() directive that will result in the type of the expression.\n- Definitions of #load that will make exported symbols accessible from a namespace.\n- LLVM\n- If and while and for to not require parens in parser. ( Parser has ambiguity due to expr { means initialize , so we should change initialize syntax if we want this.)\n- Generics\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famirrezaask%2Floki","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famirrezaask%2Floki","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famirrezaask%2Floki/lists"}