Skip to main content
.NETStandard2.0

用于在 Windows 上辅助 PublishAot 交叉编译到多个 linux RID 的 Nuget 包.

Published
Jun 8, 2026
4mo ago
Total Downloads
1.6K
1,644

Install

dotnet add package PublishAotClang --version 1.0.3
ProductVersions
.NET Standard
netstandard2.0

README

PublishAotClang

这是一个由 Zig 包装成 Clang 工具链环境的 NuGet 包,用于在 Windows 上辅助 PublishAot 交叉编译到多个 linux RID。

本项目源于 MichalStrehovsky/PublishAotCross,做了以下额外工作:

  • Nuget 包含了 llvm-objcopy
  • Nuget 引用了 Vezel.Zig.Toolsets
  • Nuget 包含了 .NET8.0 项目可能需要用到的 libz

如何使用

  1. 在 Native AOT 的项目中,添加对此 NuGet 包的引用。

  2. 在 Windows 机器上,可以额外 AOT 发布到以下 RID:

  • dotnet publish -r linux-x64
  • dotnet publish -r linux-arm64
  • dotnet publish -r linux-arm (.NET 9+)
  • dotnet publish -r linux-musl-x64
  • dotnet publish -r linux-musl-arm64
  • dotnet publish -r linux-musl-arm (.NET 9+)

Changes from Previous Version

No structural changes between v1.0.2 and v1.0.3.

Adoption Assessment

Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.

Compatibility metadata lists 1 target framework; confirm the exact target used by your application.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.