<!DOCTYPE html><htmllang="en"><head><metacharset="utf-8"><metaname="viewport"content="width=device-width, initial-scale=1.0"><metaname="generator"content="rustdoc"><metaname="description"content="Inkwell documentation is a work in progress."><title>inkwell - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><linkrel="stylesheet"href="../static.files/normalize-76eba96aa4d2e634.css"><linkrel="stylesheet"href="../static.files/rustdoc-dd39b87e5fcfba68.css"><metaname="rustdoc-vars"data-root-path="../"data-static-root-path="../static.files/"data-current-crate="inkwell"data-themes=""data-resource-suffix=""data-rustdoc-version="1.80.0 (051478957 2024-07-21)"data-channel="1.80.0"data-search-js="search-d52510db62a78183.js"data-settings-js="settings-4313503d2e1961c2.js"><scriptsrc="../static.files/storage-118b08c4c78b968e.js"></script><scriptdefersrc="../crates.js"></script><scriptdefersrc="../static.files/main-20a3ad099b048cf2.js"></script><noscript><linkrel="stylesheet"href="../static.files/noscript-df360f571f6edeae.css"></noscript><linkrel="alternate icon"type="image/png"href="../static.files/favicon-32x32-422f7d1d52889060.png"><linkrel="icon"type="image/svg+xml"href="../static.files/favicon-2c020d218678b618.svg"></head><bodyclass="rustdoc mod crate"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><navclass="mobile-topbar"><buttonclass="sidebar-menu-toggle"title="show sidebar"></button></nav><navclass="sidebar"><divclass="sidebar-crate"><h2><ahref="../inkwell/index.html">inkwell</a><spanclass="version">0.4.0</span></h2></div><divclass="sidebar-elems"><ulclass="block"><li><aid="all-types"href="all.html">All Items</a></li></ul><section><ulclass="block"><li><ahref="#reexports">Re-exports</a></li><li><ahref="#modules">Modules</a></li><li><ahref="#structs">Structs</a></li><li><ahref="#enums">Enums</a></li></ul></section></div></nav><divclass="sidebar-resizer"></div><main><divclass="width-limiter"><rustdoc-search></rustdoc-search><sectionid="main-content"class="content"><divclass="main-heading"><h1>Crate <aclass="mod"href="#">inkwell</a><buttonid="copy-path"title="Copy item path to clipboard">Copy item path</button></h1><spanclass="out-of-band"><aclass="src"href="../src/inkwell/lib.rs.html#1-491">source</a> · <buttonid="toggle-all-docs"title="collapse all docs">[<span>−</span>]</button></span></div><detailsclass="toggle top-doc"open><summaryclass="hideme"><span>Expand description</span></summary><divclass="docblock"><p>Inkwell documentation is a work in progress.</p>
<p>If you have any LLVM knowledge that could be used to improve these docs, we would greatly appreciate you opening an issue and/or a pull request on our <ahref="https://github.com/TheDan64/inkwell">GitHub page</a>.</p>
<p>Due to a rustdoc issue, this documentation represents only the latest supported LLVM version. We hope that this issue will be resolved in the future so that multiple versions can be documented side by side.</p>
<li>Most functions which take a string slice as input may possibly panic in the unlikely event that a c style string cannot be created based on it. (IE if your slice already has a null byte in it)</li>
</div></details><h2id="reexports"class="section-header">Re-exports<ahref="#reexports"class="anchor">§</a></h2><ulclass="item-table"><li><divclass="item-name"><code>pub extern crate <aclass="mod"href="../llvm_sys/index.html"title="mod llvm_sys">llvm_sys_180</a> as llvm_sys;</code></div></li></ul><h2id="modules"class="section-header">Modules<ahref="#modules"class="anchor">§</a></h2><ulclass="item-table"><li><divclass="item-name"><aclass="mod"href="attributes/index.html"title="mod inkwell::attributes">attributes</a></div><divclass="desc docblock-short"><code>Attribute</code>s are optional modifiers to functions, function parameters, and return types.</div></li><li><divclass="item-name"><aclass="mod"href="basic_block/index.html"title="mod inkwell::basic_block">basic_block</a></div><divclass="desc docblock-short">A <code>BasicBlock</code> is a container of instructions.</div></li><li><divclass="item-name"><aclass="mod"href="builder/index.html"title="mod inkwell::builder">builder</a></div><divclass="desc docblock-short">A <code>Builder</code> enables you to build instructions.</div></li><li><divclass="item-name"><aclass="mod"href="comdat/index.html"title="mod inkwell::comdat">comdat</a></div><divclass="desc docblock-short">A <code>Comdat</code> helps resolve linker errors for duplicate sections.</div></li><li><divclass="item-name"><aclass="mod"href="context/index.html"title="mod inkwell::context">context</a></div><divclass="desc docblock-short">A <code>Context</code> is an opaque owner and manager of core global data.</div></li><li><divclass="item-name"><aclass="mod"href="data_layout/index.html"title="mod inkwell::data_layout">data_layout</a></div></li><li><divclass="item-name"><aclass="mod"href="debug_info/index.html"title="mod inkwell::debug_info">debug_info</a></div><divclass="desc docblock-short">Debug symbols - <code>DebugInfoBuilder</code> interface</div></li><li><divclass="item-name"><aclass="mod"href="execution_engine/index.html"title="mod inkwell::execution_engine">execution_engine</a></div></li><li><divclass="item-name"><aclass="mod"href="intrinsics/index.html"title="mod inkwell::intrinsics">intrinsics</a></div></li><li><divclass="item-name"><aclass="mod"href="memory_buffer/index.html"title="mod inkwell::memory_buffer">memory_buffer</a></div></li><li><divclass="item-name"><aclass="mod"href="module/index.html"title="mod inkwell::module">module</a></div><divclass="desc docblock-short">A <code>Module</code> represents a single code compilation unit.</div></li><li><divclass="item-name"><aclass="mod"href="object_file/index.html"title="mod inkwell::object_file">object_file</a></div></li><li><divclass="item-name"><aclass="mod"href="passes/index.html"title="mod inkwell::passes">passes</a></div></li><li><divclass="item-name"><aclass="mod"href="support/index.html"title="mod inkwell::support">support</a></div></li><li><divclass="item-name"><aclass="mod"href="targets/index.html"title="mod inkwell::targets">targets</a></div></li><li><divclass="item-name"><aclass="mod"href="types/index.html"title="mod inkwell::types">types</a></div><divclass="desc docblock-short">A type is a classification which determines how data is used.</div></li><li><divclass="item-name"><aclass="mod"href="values/index.html"title="mod inkwell::values">values</a></div><divclass="desc docblock-short">A value is an instance of a type.</div></li></ul><h2id="structs"class="section-header">Structs<ahref="#structs"class="anchor">§</a></h2><ulclass="item-table"><li><divclass="item-name"><aclass="struct"href="struct.AddressSpace.html"title="struct inkwell::AddressSpace">AddressSpace</a></div><divclass="desc docblock-short">Defines the address space in which a global will be inserted.</div></li></ul><h2id="enums"class="section-header">Enums<ahref="#enums"class="anchor">§</a></h2><ulclass="item-table"><li><divclass="item-name"><aclass="enum"href="enum.AtomicOrdering.html"title="enum inkwell::AtomicOrdering">AtomicOrdering</a></div></li><li><divclass="item-