{"id":15101420,"url":"https://github.com/romch007/floc","last_synced_at":"2025-08-02T11:32:41.591Z","repository":{"id":241897081,"uuid":"808111826","full_name":"romch007/floc","owner":"romch007","description":"Compiler for the Flo programming language","archived":false,"fork":false,"pushed_at":"2025-06-06T14:24:36.000Z","size":278,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-06T15:29:23.242Z","etag":null,"topics":["compiler","llvm","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/romch007.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,"zenodo":null}},"created_at":"2024-05-30T12:07:28.000Z","updated_at":"2025-06-06T14:24:39.000Z","dependencies_parsed_at":"2024-05-30T16:04:01.427Z","dependency_job_id":"f02793ca-7720-425c-8a51-8b3c12107fa4","html_url":"https://github.com/romch007/floc","commit_stats":{"total_commits":84,"total_committers":1,"mean_commits":84.0,"dds":0.0,"last_synced_commit":"1ad41ea424930f9827395e5235b936909a5ce91f"},"previous_names":["romch007/floc"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/romch007/floc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romch007%2Ffloc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romch007%2Ffloc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romch007%2Ffloc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romch007%2Ffloc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/romch007","download_url":"https://codeload.github.com/romch007/floc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romch007%2Ffloc/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268378965,"owners_count":24240907,"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","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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","llvm","rust"],"created_at":"2024-09-25T18:22:25.312Z","updated_at":"2025-08-02T11:32:41.582Z","avatar_url":"https://github.com/romch007.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# floc\n\nCompiler for the Flo programming language.\n\n## The Flo programming language\n\nThe Flo programming language is an imperative and statically-typed language designed by [Florian Bridoux](https://webusers.i3s.unice.fr/~bridoux/) as part of the \"Langages, Compilation et Automates\" course at Polytech Nice Sophia. The final project of this course involves creating a compiler (in Python or C) that compiles Flo code to ARMv7. The code generation part of this project is rather simple and the compiled programs are unoptimized. I took the initiative to recreate the compiler in Rust, using LLVM to enable excellent run-time performance of programs and availability on a wide range of systems and architectures.\n\n## How to build\n\nWhat you need:\n- Rust (at least 1.85.0)\n- A C++ compiler\n- LLVM 18.1\n- libclang (usually included with clang)\n\n### Building and running:\n```bash\n$ cargo build --release\n```\n\n(if you are building on Alpine Linux you need to run `RUSTFLAGS=\"-C target-feature=-crt-static\" cargo b -r`)\n\n```bash\n$ target/release/floc[.exe] flo_examples/factorial.flo\n```\n\nNote: On Windows, make sure `link.exe` is available by installing Visual Studio with the \"Desktop development with C++\" workload.\n\n### AUR\n\nThere is an AUR package called [floc-git](https://aur.archlinux.org/packages/floc-git) btw.\n\n## Usage\nSome cool stuff to do:\n\n- Render the AST as a dot graph:\n```bash\n$ floc --emit-ast-as-dot flo_examples/prime.flo | dot -Tsvg \u003e ast.svg\n```\n\n- Dump the generated LLVM IR:\n```bash\n$ floc --emit-ir flo_examples/prime.flo\n```\n\n- Dump the generated LLVM IR after optimization passes:\n```bash\n$ floc --emit-optimized-ir flo_examples/prime.flo\n```\n\n(use `--help` to get all available options)\n\n## How to code in Flo\n[Link to the reference](FLO_REFERENCE.md)\n\nSee some example programs [here](https://github.com/romch007/floc/tree/main/flo_examples)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromch007%2Ffloc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fromch007%2Ffloc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromch007%2Ffloc/lists"}