{"id":18409855,"url":"https://github.com/e3m3/mlir-rust","last_synced_at":"2025-04-12T21:58:27.636Z","repository":{"id":258937782,"uuid":"875937741","full_name":"e3m3/mlir-rust","owner":"e3m3","description":"Rust bindings over the MLIR C API from mlir-sys","archived":false,"fork":false,"pushed_at":"2025-02-01T20:59:25.000Z","size":774,"stargazers_count":1,"open_issues_count":11,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T21:58:23.607Z","etag":null,"topics":["compiler","library","mlir","mlir-dialect","rust","rust-lang"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/e3m3.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}},"created_at":"2024-10-21T06:08:14.000Z","updated_at":"2025-02-01T20:59:29.000Z","dependencies_parsed_at":"2024-10-27T06:27:49.852Z","dependency_job_id":"50f08191-5526-4074-89f9-c4df48444846","html_url":"https://github.com/e3m3/mlir-rust","commit_stats":null,"previous_names":["e3m3/mlir-rust"],"tags_count":55,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/e3m3%2Fmlir-rust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/e3m3%2Fmlir-rust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/e3m3%2Fmlir-rust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/e3m3%2Fmlir-rust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/e3m3","download_url":"https://codeload.github.com/e3m3/mlir-rust/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248637784,"owners_count":21137538,"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","library","mlir","mlir-dialect","rust","rust-lang"],"created_at":"2024-11-06T03:27:40.460Z","updated_at":"2025-04-12T21:58:27.615Z","avatar_url":"https://github.com/e3m3.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"#  Copyright\n\nCopyright 2024-2025, Giordano Salvador\nSPDX-License-Identifier: BSD-3-Clause\n\nAuthor/Maintainer:  Giordano Salvador \u003c73959795+e3m3@users.noreply.github.com\u003e\n\n\n#  Description\n\n[![Fedora 41](https://github.com/e3m3/mlir-rust/actions/workflows/fedora-41.yaml/badge.svg?event=workflow_dispatch)](https://github.com/e3m3/mlir-rust/actions/workflows/fedora-41.yaml)\n\n[![MacOS 14](https://github.com/e3m3/mlir-rust/actions/workflows/macos-14.yaml/badge.svg?event=workflow_dispatch)](https://github.com/e3m3/mlir-rust/actions/workflows/macos-14.yaml)\n\nRust library and bindings implementing the [MLIR][1] [[1]] ([license][2] [[2]]) compiler framework.\nUses the C API bindings from the `mlir_sys` crate ([site][3] [[3]] and [license][4] [[4]]).\n\n\n##   Documentation\n\nRead the API at [https://e3m3.github.io/mlir-rust/mlir/](https://e3m3.github.io/mlir-rust/mlir/index.html).\n\n\n##  Prerequisites\n\n*   rust-2024\n\n*   llvm-19, clang-19, and mlir-sys (or llvm version matching mlir-sys)\n\n*   libxml2 and libz headers (for testing)\n\n*   num_cpus (for testing)\n\n*   python3-lit, FileCheck (for testing)\n\n    *   By default, `tests/lit-tests.rs` will search for the lit executable in\n        `$PYTHON_VENV_PATH/bin` (if it exists) or the system's `/usr/bin`.\n\n*   [docker|podman] (for testing/containerization)\n\n    *   A [Fedora][5] [[5]] image can be built using `containers/Containerfile.fedora*`.\n\n##  Setup\n\n*   Native build:\n    \n    ```shell\n    cargo build\n    ```\n\n*   Build Rust lit tests:\n\n    ```shell\n    cargo build --manifest-path tests/lit-tests-rust/Cargo.toml\n    ```\n\n*   Run Rust lit test (e.g., `tests/lit-tests-rust/src/\u003ctest-name\u003e.lit-rs`:\n\n    ```shell\n    cargo run --manifest-path tests/lit-tests-rust/Cargo.toml -- \u003ctest-name\u003e\n    ```\n\n*   Build and run lit test suite (MLIR + Rust):\n\n    ```shell\n    cargo test -- --nocapture\n    ```\n\n*   Container build and test [podman][6] [[6]]:\n\n    ```shell\n    podman build -t mlir-rust -f container/Containerfile .\n    ```\n\n*   Container build and test [docker][7] [[7]]:\n\n    ```shell\n    docker build -t mlir-rust -f container/Dockerfile .\n    ```\n\n*   If `make` is installed, you can build the image by running:\n\n    ```shell\n    make\n    ```\n\n\n#  References\n\n[1]:    https://mlir.llvm.org/\n\n[2]:    https://github.com/llvm/llvm-project/blob/main/mlir/LICENSE.TXT\n\n[3]:    https://crates.io/crates/mlir-sys\n\n[4]:    https://github.com/mlir-rs/mlir-sys/blob/main/LICENSE\n\n[5]:    https://fedoraproject.org/\n\n[6]:    https://podman.io/\n\n[7]:    https://www.docker.com/\n\n1.  `https://mlir.llvm.org/`\n\n1.  `https://github.com/llvm/llvm-project/blob/main/mlir/LICENSE.TXT`\n\n1.  `https://crates.io/crates/mlir-sys`\n\n1.  `https://github.com/mlir-rs/mlir-sys/blob/main/LICENSE`\n\n1.  `https://fedoraproject.org/`\n\n1.  `https://podman.io/`\n\n1.  `https://www.docker.com/`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fe3m3%2Fmlir-rust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fe3m3%2Fmlir-rust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fe3m3%2Fmlir-rust/lists"}