{"id":13811675,"url":"https://github.com/google/mlir-hs","last_synced_at":"2025-05-14T19:33:53.498Z","repository":{"id":40384581,"uuid":"375727680","full_name":"google/mlir-hs","owner":"google","description":"Haskell bindings for MLIR","archived":false,"fork":false,"pushed_at":"2024-09-15T23:58:46.000Z","size":18465,"stargazers_count":91,"open_issues_count":7,"forks_count":16,"subscribers_count":8,"default_branch":"main","last_synced_at":"2024-09-17T01:06:56.373Z","etag":null,"topics":["haskell","llvm","mlir"],"latest_commit_sha":null,"homepage":"","language":"Haskell","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/google.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/contributing.md","funding":null,"license":"LICENSE","code_of_conduct":"docs/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,"publiccode":null,"codemeta":null}},"created_at":"2021-06-10T14:33:11.000Z","updated_at":"2024-09-15T23:58:50.000Z","dependencies_parsed_at":"2023-02-16T01:45:31.980Z","dependency_job_id":"148a2e61-b3b9-4558-b750-3ff14bae99c0","html_url":"https://github.com/google/mlir-hs","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/google%2Fmlir-hs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fmlir-hs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fmlir-hs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fmlir-hs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/google","download_url":"https://codeload.github.com/google/mlir-hs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225307818,"owners_count":17453881,"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":["haskell","llvm","mlir"],"created_at":"2024-08-04T04:00:28.208Z","updated_at":"2024-11-19T06:32:36.564Z","avatar_url":"https://github.com/google.png","language":"Haskell","funding_links":[],"categories":["Implements based on the underlying LLVM/MLIR compiler technology"],"sub_categories":[],"readme":"# mlir-hs - Haskell bindings for MLIR\n\n**🚨 This is an early-stage project. All details are subject to arbitrary changes. 🚨**\n\nNote that the `main` branch tracks the current HEAD of [LLVM](https://github.com/llvm/llvm-project)\nand so it is likely to be incompatible with any past releases. We are planning to\nprovide release-specifi branches in the future, but only once the API stabilizes.\nFor now your best bet is to develop against MLIR built from source. See the\n[Building MLIR from source](#building-mlir-from-source) section for guidance.\n\n## Building\n\nThe only prerequisite for building mlir-hs is that you have MLIR installed\nsomewhere, and the `llvm-config` binary from that installation is available\nin your `PATH` (a good way to verify this is to run `which llvm-config`).\n\nIf that's looking reasonable, we recommend using [Stack](https://haskellstack.org)\nfor development. To build the project simply run `stack build`, while the test\nsuite can be executed using `stack test`.\n\n### Building MLIR from source\n\nThe instructions below assume that you have `cmake` and `ninja` installed.\nYou should be able to get them from your favorite package manager.\n\n  1. Clone the latest LLVM code (or use `git pull` if you cloned it before) into the root of this repository\n     ```bash\n     git clone https://github.com/llvm/llvm-project\n     ```\n\n  2. Create a temporary build directory\n     ```bash\n     mkdir llvm-project/build\n     ```\n\n  3. Configure the build using CMake. Remember to replace `$PREFIX` with the directory\n     where you want MLIR to be installed. See [LLVM documentation](https://llvm.org/docs/CMake.html)\n     for extended explanation and other potentially interesting build flags.\n     ```bash\n     cmake -B llvm-project/build           \\\n       -G Ninja                            \\ # Use the Ninja build system\n       -DLLVM_ENABLE_PROJECTS=mlir         \\ # Enable build MLIR\n       -DCMAKE_INSTALL_PREFIX=$PREFIX      \\ # Install prefix\n       -DMLIR_BUILD_MLIR_C_DYLIB=ON        \\ # Build shared libraries\n       -DLLVM_BUILD_LLVM_DYLIB=ON          \\\n       llvm-project/llvm\n     ```\n     For development purposes we additionally recommend using\n     `-DCMAKE_BUILD_TYPE=RelWithDebInfo -DLLVM_ENABLE_ASSERTIONS=ON`\n     to retain debug information and enable internal LLVM assertions. If one changes\n     the install directory (CMAKE_INSTALL_PREFIX) then one needs to add this directory\n     to PATH and LD_LIBRARY_PATH for the subsequent builds (e.g., `stack`) to find it.\n\n  4. [Build and install MLIR]. Note that it uses the installation prefix specified\n     in the previous step.\n     ```bash\n     cmake --build llvm-project/build -t install\n     ```\n\n## Contributing\n\nContributions of all kinds are welcome! If you're planning to implement a larger feature,\nconsider posting an issue so that we can discuss it before you put in the work.\n\n## License\n\nSee the LICENSE file.\n\nmlir-hs is an early-stage project, not an official Google product.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogle%2Fmlir-hs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoogle%2Fmlir-hs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogle%2Fmlir-hs/lists"}