{"id":19347476,"url":"https://github.com/mrlsd/llvm-lib-rs","last_synced_at":"2026-01-25T17:31:30.542Z","repository":{"id":246597582,"uuid":"821598793","full_name":"mrLSD/llvm-lib-rs","owner":"mrLSD","description":"LLVM library wrapper for LLVM-C API written in Rust with safety in mind.","archived":false,"fork":false,"pushed_at":"2024-10-13T12:45:54.000Z","size":135,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-15T01:23:31.758Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mrLSD.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-06-28T23:25:18.000Z","updated_at":"2024-10-13T12:43:03.000Z","dependencies_parsed_at":"2024-06-28T23:50:51.660Z","dependency_job_id":"a17ad661-1f88-40ad-ba55-9972994c55ab","html_url":"https://github.com/mrLSD/llvm-lib-rs","commit_stats":null,"previous_names":["mrlsd/llvm-lib-rs"],"tags_count":24,"template":false,"template_full_name":null,"purl":"pkg:github/mrLSD/llvm-lib-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrLSD%2Fllvm-lib-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrLSD%2Fllvm-lib-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrLSD%2Fllvm-lib-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrLSD%2Fllvm-lib-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrLSD","download_url":"https://codeload.github.com/mrLSD/llvm-lib-rs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrLSD%2Fllvm-lib-rs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28755918,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T16:32:25.380Z","status":"ssl_error","status_checked_at":"2026-01-25T16:32:09.189Z","response_time":113,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-11-10T04:16:37.245Z","updated_at":"2026-01-25T17:31:30.525Z","avatar_url":"https://github.com/mrLSD.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Lints](https://github.com/mrLSD/llvm-lib-rs/actions/workflows/lints.yml/badge.svg)](https://github.com/mrLSD/llvm-lib-rs/actions/workflows/lints.yml)\n[![Crates.io version](https://img.shields.io/crates/v/llvm-lib.svg?style=flat-square)](https://crates.io/crates/llvm-lib)\n[![Crates.io Total Downloads](https://img.shields.io/crates/d/llvm-lib?style=flat-square\u0026label=crates.io%20downloads)](https://crates.io/crates/llvm-lib)\n\u003c!-- [![Tests](https://github.com/mrLSD/z-rose/actions/workflows/tests.yml/badge.svg)](https://github.com/mrLSD/llvm-lib-rs/actions/workflows/tests.yml) --\u003e\n\n\u003cdiv style=\"text-align: center;\"\u003e\n    \u003ch1\u003emrLSD\u003ccode\u003e/llvm-lib-rs\u003c/code\u003e\u003c/h1\u003e\n\u003c/div\u003e\n\nLLVM library with safety and flexibility in mind, without over complexity based on `LLVM-C` API\n(based on `llvm-sys` crate).\n\n## Overview\n\nThe `llvm-lib-rs` provides a robust and comprehensive interface to the LLVM Compiler Infrastructure,\nleveraging the `LLVM-C API` to offer a blend of safety, flexibility, and extendability. This library\nis designed to serve as a powerful tool for developers looking to create backends for compilers, enabling\nthem to harness the full potential of **LLVM** in a secure and user-friendly manner.\n\n## Safety\n\nSafety is a paramount concern in the design of this library. By building on the `LLVM-C API`, we ensure that\ninteractions\nwith the **LLVM** infrastructure are conducted in a type-safe and memory-safe manner. The library employs Rust’s\nstringent\nsafety guarantees to prevent common issues such as null pointer dereferencing, buffer overflows, and memory leaks. This\ncommitment to safety allows developers to focus on the functionality of their compiler backends without worrying about\nunderlying security vulnerabilities.\n\n## Flexibility\n\nFlexibility is another core attribute of the `llvm-lib-rs`. The library provides a rich set of APIs that cover a wide\nrange of LLVM’s capabilities, from module management and inline assembly to debugging metadata and function iteration.\nDevelopers can easily access and manipulate **LLVM** constructs, enabling the creation of highly customized and\noptimized\ncompiler backends. The library’s design ensures that it can adapt to various use cases and requirements, making it an\nideal choice for a diverse set of compiler development projects.\n\n## Extendability\n\nThe `llvm-lib-rs` is built with extendability in mind. It is designed to be easily extendable, allowing developers to\nadd\nnew functionalities and support for additional **LLVM** features as needed. The modular structure of the library\nfacilitates\nthe incorporation of new components, ensuring that it can grow and evolve alongside the **LLVM** ecosystem. This\nextendability ensures that the library remains relevant and useful as **LLVM** continues to advance and expand its\ncapabilities.\n\n## Why LLVM?\n\n**LLVM** (Low-Level Virtual Machine) is a powerful and versatile compiler infrastructure that provides a collection of\nmodular and reusable compiler and toolchain technologies. It is widely used in the development of modern compilers,\nproviding a framework for optimizing intermediate representations and generating machine code for various target\narchitectures. LLVM’s ability to support multiple languages and platforms, coupled with its extensive optimization\ncapabilities, makes it an essential tool for compiler developers. By leveraging **LLVM**, developers can create highly\nefficient and portable compilers that meet the demands of today’s diverse computing environments.\n\n## Design\n\nThe `llvm-lib-rs` library adheres to the structure of the LLVM C API, ensuring easy navigation through the extensive\nLLVM\nfunctions. Logical elements are grouped into modules, providing a clear organizational structure. Within these modules,\nRust structures are introduced to wrap LLVM types, implementing corresponding functions for the wrapped LLVM types. This\napproach enhances flexibility and usability while maintaining the original LLVM code structure. The design avoids\nunnecessary complexity in the code and documentation, remaining fully aligned with the LLVM API. This alignment allows\ndevelopers to easily navigate the `llvm-lib-rs` library using existing LLVM-C documentation.\n\n### Safety Considerations\n\nWhen implementing functions using the `LLVM-C API` through `FFI` (Foreign Function Interface), all unsafe operations\nand data types are managed separately and wrapped in new types and structures. This separation ensures that unsafe code\nis isolated and not exposed in the final **API**, guaranteeing safety without introducing excessive complexity.\nBy encapsulating unsafe operations within safe Rust abstractions, the library maintains a clean and understandable\ncodebase while preventing unsafe memory interactions. This design choice provides a robust layer of protection, ensuring\nthat users of the `llvm-lib-rs` library can work with **LLVM** functionalities securely and confidently.\n\n## Status\n\nBased on [llvm-sys](https://crates.io/crates/llvm-sys) rust crate.\n\nSupport LLVM:\n\n- [x] llvm-18\n\nDevelopment in progress and API suppose to be unstable before completion.\n\n### LICENSE: [MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrlsd%2Fllvm-lib-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrlsd%2Fllvm-lib-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrlsd%2Fllvm-lib-rs/lists"}