LLVMSharp - LLVM 的 .NET 标准库


MIT
Windows
C#

软件简介

LLVMSharp 是一个多平台的 .NET 标准库,用于访问 LLVM 架构。该库使用
ClangSharp 解析 LLVM-C 头文件来自动生成代码。

LLVMSharp 5.0 NuGet
Package
for .NET Core 2.0+
(Linux, macOS, Windows) and .NET Framework 4+ - built from the LLVM 5.0.0
Release.

构建 LLVMSharp

On Linux using .NET Core:

 $ git clone http://github.com/Microsoft/LLVMSharp
 $ cd LLVMSharp/src
 $ dotnet build

On Windows using .NET Core

Note: - you need to run these commands from the Visual Studio Developer
Command Prompt.

 :> git clone http://github.com/mjsabby/LLVMSharp
 :> cd LLVMSharp\src
 :> dotnet build

特性

  • 使用LLVM C头文件自动生成,并支持它们公开的所有功能(足以构建完整的编译器)
  • 类型安全 (LLVMValueRef and LLVMTypeRef are different types, despite being pointers internally)
  • 与LLVM C API几乎相同,例如 C中的LLVMModuleCreateWithName,与LLVM.ModuleCreateWithName相关(请注意C#API中的。)