{"repo":"TheDan64/inkwell","free":true,"listed":false,"github":"https://github.com/TheDan64/inkwell","clone":"git clone https://github.com/TheDan64/inkwell.git","description":"It's a New Kind of Wrapper for Exposing LLVM (Safely)","language":"Rust","stars":3003,"topics":["rust","llvm","safe","wrapper","wrapper-api","api","codegen","jit"],"license":"Apache-2.0","category":"api-integrations-sdks","readme_excerpt":"Inkwell(s) I t's a N ew K ind of W rapper for E xposing LL VM ( S afely) Inkwell aims to help you pen your own programming languages by safely wrapping llvm-sys. It provides a more strongly typed interface than the underlying LLVM C API so that certain types of errors can be caught at compile time instead of at LLVM's runtime. This means we are trying to replicate LLVM IR's strong typing as closely as possible. The ultimate goal is to make LLVM safer from the rust end and a bit easier to learn (via documentation) and use. Requirements Rust 1.85+ One of LLVM 12-22 Usage You'll need to point your Cargo.toml to use a single LLVM version feature flag corresponding to your LLVM version as such: Supported versions: LLVM 12-22 mapping to a cargo feature flag llvmM-0 where M corresponds to the LLVM major version. Please be aware that we may make breaking changes on master from time to time since we are pre-v1.0.0, in compliance with semver. Please prefer a crates.io release whenever possible! Documentation Documentation is automatically deployed here based on master. These docs are not yet 100% complete and only show the latest supported LLVM version due to a rustdoc issue. See #2 for more info. Examples Tari's llvm-sys example written in safe code 1 with Inkwell: 1 There are two uses of unsafe in this example because the actual act of compiling and executing code on the fly is innately unsafe . For one, there is no way of verifying we are calling get function() with the right functi","default_branch":null,"files":null,"tree":[],"storefront":"/r/TheDan64","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/TheDan64/inkwell/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}