百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
I

inkwell

> AI 编程
开源

这是一种用于展示 LLVM(安全)的新型包装器

3.0K stars0 点赞0 次浏览
访问官网GitHub

工具介绍

这是一种用于展示 LLVM(安全)的新型包装器

Inkwell(s)

It's a New Kind of Wrapper for Exposing LLVM (Safely)

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-23

Usage

You'll need to point your Cargo.toml to use a single LLVM version feature flag corresponding to your LLVM version as such:

[dependencies]
inkwell = { version = "0.10.0", features = ["llvm23-1"] }

Supported versions: LLVM 12-23 mapping to a cargo feature flag llvmM-N where M and N correspond to the LLVM major and minor version, e.g. llvm18-1 for LLVM 18.1.x.

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 code1 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 function signature. It is also unsafe to call the function we get because there's no guarantee the code itself doesn't do unsafe things internally (the same reason you need unsafe when calling into C).

LLVM's Kaleidoscope Tutorial

Can be found in the examples directory.

Alternative Crate(s)

  • llvm-ir

Contributing

Check out our Contributing Guide

GitHub Issues· 0 开放

在 GitHub 查看全部

暂无开放 Issues,或尚未同步最近议题。

核心特点

  • •Rust
  • •api
  • •codegen
  • •jit
  • •llvm

> 标签

Rustapicodegenjitllvm

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类AI 编程
定价开源

> 相关工具

G
GitHub Copilot
GitHub 官方 AI 编程助手,覆盖补全、Chat 与 Agent 模式。
C
Cursor
AI 原生代码编辑器,对话改代码、多文件 Agent 与规则体系是其核心。
S
skills
Skills for Real Engineers. Straight from my .agents directory.