LLVM bindings for .NET Standard written in C# using ClangSharp
Перейти к файлу
Tanner Gooding ed54b17e0b
Merge pull request #224 from tannergooding/main
Updating to LLVM v18.1
2024-04-30 06:50:24 -07:00
.github/workflows Use v4 of the various GitHub actions 2024-04-30 06:21:12 -07:00
packages/libLLVM Fix the libLLVM packages for Windows 2024-04-30 06:41:28 -07:00
samples
scripts
sources Regenerating bindings for LLVM v18.1 2024-04-29 10:32:25 -07:00
tests Updating version information to v18.1 2024-04-29 07:49:39 -07:00
.editorconfig
.gitattributes
.gitignore
CODE_OF_CONDUCT.md
Directory.Build.props Updating version information to v18.1 2024-04-29 07:49:39 -07:00
Directory.Build.targets
Directory.Packages.props Fix the libLLVM packages for Windows 2024-04-30 06:41:28 -07:00
LICENSE.md
LLVMSharp.sln Updating version information to v18.1 2024-04-29 07:49:39 -07:00
NOTICE.md
NuGet.config
Open.snk
README.md
build.cmd
build.sh
exclusion.dic
global.json
pack.cmd
pack.sh
restore.cmd
restore.sh
test.cmd
test.sh

README.md

LLVMSharp

LLVMSharp is a multi-platform .NET Standard library for accessing the LLVM infrastructure. The bindings are auto-generated using ClangSharp parsing LLVM-C header files.

ci

A nuget package for the project is provided here: https://www.nuget.org/packages/llvmsharp.

A convenience package which provides the native libLLVM library for several platforms is provided here: https://www.nuget.org/packages/libLLVM

Nightly packages are available via the NuGet Feed URL: https://pkgs.clangsharp.dev/index.json

Source browsing is available via: https://source.clangsharp.dev/

Table of Contents

Code of Conduct

LLVMSharp and everyone contributing (this includes issues, pull requests, the wiki, etc) must abide by the .NET Foundation Code of Conduct: https://dotnetfoundation.org/about/code-of-conduct.

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at conduct@dotnetfoundation.org.

License

Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See LICENSE.md in the repository root for more information.

Features

  • Auto-generated using LLVM C headers files, and supports all functionality exposed by them (more than enough to build a full compiler)
  • Type safe (LLVMValueRef and LLVMTypeRef are different types, despite being pointers internally)
  • Nearly identical to LLVM C APIs, e.g. LLVMModuleCreateWithName in C, vs. LLVM.ModuleCreateWithName (notice the . in the C# API)

Building LLVMSharp

On Linux using .NET Core:

 $ git clone http://github.com/dotnet/llvmsharp
 $ cd LLVMSharp
 $ 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/dotnet/LLVMSharp
 :> cd LLVMSharp
 :> dotnet build