# AsmSdk > AsmSdk: project, dependency and build management for x86-64 assembly, on MSBuild and NuGet. Build NASM with dotnet build, share it as NuGet packages, call it from C#. AsmSdk is the MSBuild SDK `AsmFoundation.Sdk` on nuget.org (latest release: 0.3.0). A project file, `.asmproj`, builds NASM x86-64 assembly into Linux shared libraries, static libraries or executables with `dotnet build`, shares them as NuGet packages, and sits in the same solution as the C# projects that call it. Restore downloads the assembler and linker, so nothing else is installed. The outputs are Linux x86-64 ELF files; the build runs on Windows, Linux and macOS. Start a project with a `global.json` that names the SDK, `{ "msbuild-sdks": { "AsmFoundation.Sdk": "0.3.0" } }`, and a project file that begins ``. Every page below is linked as Markdown. [llms-full.txt](https://asmfoundation.github.io/AsmSdk/llms-full.txt) holds all of them in one file, in this order. ## Docs - [What is AsmSdk](https://asmfoundation.github.io/AsmSdk/guide/index.html.md): AsmSdk is the AsmFoundation's project, dependency and build management for assembly, on MSBuild and NuGet. Its NuGet package is AsmFoundation.Sdk. - [Getting started](https://asmfoundation.github.io/AsmSdk/guide/getting-started.html.md): This page builds three things: a shared library written in assembly, for seven platforms; a program that prints through the C library, for the same seven; a C# program that calls the library, and runs on any of them. - [Projects](https://asmfoundation.github.io/AsmSdk/guide/projects.html.md): An .asmproj behaves like an SDK-style .csproj: properties go in a , items in an ; the properties a .csproj uses mean the same here: TargetFramework(s), OutputType, AssemblyName, DefineConstants, DebugSymbols, DebugType and StartupObject; Version, PackageId, Configuration,… - [Platforms and runtime identifiers](https://asmfoundation.github.io/AsmSdk/guide/platforms.html.md): From 0.3.0, one .asmproj builds for seven platforms, named the way .NET names them: by runtime identifier (RID). Any build machine builds any of them. This page covers the RIDs, how a project chooses them, how its sources and calls differ per platform, and what each platform's output looks like. - [Writing NASM for AsmSdk](https://asmfoundation.github.io/AsmSdk/guide/writing-nasm.html.md): NASM 3.02 builds the four x64 RIDs: win-x64, linux-x64, linux-musl-x64 and osx-x64. ARM64 code is GNU syntax for llvm-mc (see Platforms). - [Runtimes and linking](https://asmfoundation.github.io/AsmSdk/guide/runtimes-and-linking.html.md): This page covers how each kind of output is linked on each OS, how a program reaches its C library without the target's sysroot or SDK, and the link options that matter in production. Every link line here is the one the 0.3.0 targets produce, with the bundled lld 23.1.5. - [References and packages](https://asmfoundation.github.io/AsmSdk/guide/references-and-packages.html.md): Assembly code is shared the way .NET code is shared: inside a solution, with ProjectReference; across repositories and teams, as NuGet packages pinned by version, with PackageReference. - [Programs: run, publish, deliver and pack](https://asmfoundation.github.io/AsmSdk/guide/programs.html.md): An asm program is an .asmproj with Exe. - [Calling assembly from .NET, Python and C](https://asmfoundation.github.io/AsmSdk/guide/interop.html.md): An AsmSdk shared library is an ordinary Windows DLL, Linux .so or macOS .dylib that follows its platform's C calling convention, so any language with a C foreign-function interface can call it. This page covers the three callers the AsmFoundation uses, plus testing. - [IDEs](https://asmfoundation.github.io/AsmSdk/guide/ides.html.md): An .asmproj opens in Rider, Visual Studio and VS Code next to .csproj projects in the same solution, and the IDE shows it the way it shows a .csproj: its files, by folder, with a build action each. Building from the IDE runs the same dotnet build targets as the command line. - [CI and releases](https://asmfoundation.github.io/AsmSdk/guide/ci-and-release.html.md): The goal is to build on every OS your developers use, run each platform's outputs on a machine of that platform, and release packages from a tag without a stored secret. The workflow below follows the AsmSdk repository's own CI and release workflows. - [Extending the build](https://asmfoundation.github.io/AsmSdk/guide/extending.html.md): How the SDK plugs into MSBuild, what makes a build incremental, and how to add your own steps without fighting it. - [Troubleshooting](https://asmfoundation.github.io/AsmSdk/guide/troubleshooting.html.md): Find the message, then apply the fix. Unless a row says otherwise, every message below was reproduced with AsmFoundation.Sdk 0.1.0, NASM 3.02 and ld.lld 23.1.5, and is written with the current property names. - [Changelog](https://asmfoundation.github.io/AsmSdk/guide/changelog.html.md): All notable changes to AsmFoundation.Sdk and the AsmFoundation.Toolchain packages. The format follows Keep a Changelog, and versions follow Semantic Versioning. ## Examples - [Examples](https://asmfoundation.github.io/AsmSdk/examples/index.html.md): Four complete programs in the repository's samples/ folder, each the kind of project you would actually write with AsmSdk. Each page walks through one: the project file, the assembly that matters, and how the result is tested. - [Crc32C: an assembly library for .NET, on seven platforms](https://asmfoundation.github.io/AsmSdk/examples/crc32c.html.md): samples/Crc32C computes CRC-32C, the Castagnoli checksum that iSCSI, ext4, Btrfs, SCTP and gRPC use. It is about 380 lines of NASM for x64 and 300 lines of GNU-syntax assembly for ARM64, half of them comments. samples/Crc32C.Net lets C# call it. - [Shipping to .NET through NuGet](https://asmfoundation.github.io/AsmSdk/examples/nuget-for-dotnet.html.md): Crc32C is an assembly library with a C# wrapper. This page ships it the way .NET libraries with native code ship (SkiaSharp and Microsoft.Data.SqlClient do the same): as two packages, a native one and a managed one that depends on it. - [Testing and measuring from C#](https://asmfoundation.github.io/AsmSdk/examples/testing-and-benchmarks.html.md): An assembly library is tested and measured like any .NET code: with an xunit project and a BenchmarkDotNet project that call it through its C# API. This page shows both for Crc32C: samples/Crc32C.Tests and samples/Crc32C.Bench. - [WordCount: a tool on libc](https://asmfoundation.github.io/AsmSdk/examples/wordcount.html.md): samples/WordCount is wc in assembly: it counts the lines, words and bytes of files. - [HexDump: a tool without libc](https://asmfoundation.github.io/AsmSdk/examples/hexdump.html.md): samples/HexDump prints a hex dump in xxd's default format, and links nothing: no libc, no loader, no other library. The kernel starts it at _start, and it talks to the kernel with the syscall instruction only. The executable is about 4 KB, static, and runs on any x86-64 Linux. ## Reference - [`.asmproj` reference](https://asmfoundation.github.io/AsmSdk/asmproj.html.md): Everything AsmFoundation.Sdk reads from a project, sets, runs and writes, with the exact defaults of the 0.3.0 targets. The guides explain when to use each setting. Start at What is AsmSdk. ## Toolchain - [The toolchain](https://asmfoundation.github.io/AsmSdk/toolchain/index.html.md): AsmSdk builds with four tools: two assemblers, NASM for x64 code and LLVM's llvm-mc for GNU-syntax code (ARM64), a linker (lld, which links ELF, PE/COFF and Mach-O) and an archiver (llvm-ar). A fifth, llvm-readobj, ships alongside them for inspecting what was built. - [The tools](https://asmfoundation.github.io/AsmSdk/toolchain/tools.html.md): The five tools in AsmFoundation.Toolchain, the exact commands the build runs with them, and how to run them yourself. - [Pinning, offline and system tools](https://asmfoundation.github.io/AsmSdk/toolchain/system-and-offline.html.md): Without this, each project uses the version its SDK release was tested with. Pinning keeps the tools fixed across SDK upgrades, until you change the pin. - [How the packages are built](https://asmfoundation.github.io/AsmSdk/toolchain/provenance.html.md): Every toolchain package is built from official upstream releases, pinned by SHA-256. The build is in the AsmSdk repository: toolchain/fetch.cs, a .NET 10 file-based app, reads its pins from toolchain/versions.json. ## Ecosystem - [The ecosystem](https://asmfoundation.github.io/AsmSdk/ecosystem/index.html.md): AsmSdk is part of the AsmFoundation, which builds backend infrastructure in hand-written x86-64 assembly as free, open-source software (Apache-2.0). It is a product of its own: project, dependency and build management for any assembly codebase. The projects below are some of its users. - [Samples](https://asmfoundation.github.io/AsmSdk/ecosystem/samples.html.md): The samples/ folder of the AsmSdk repository covers every kind of project. CI builds and checks all of them on five build machines: Windows x64 and Windows on Arm, Linux x64 and ARM64, and Apple silicon. Crc32C is built for all seven RIDs. - [Scenario tests](https://asmfoundation.github.io/AsmSdk/ecosystem/scenarios.html.md): A scenario is a small repository in tests/scenarios. It is a .slnx with its .csproj and .asmproj projects, plus a scenario.json that lists the commands to run on it, in order, and what each command must produce. The test suite runs every scenario as one test. - [Claude Code plugin](https://asmfoundation.github.io/AsmSdk/ecosystem/claude-code.html.md): The asmsdk plugin teaches Claude Code this SDK: projects, references, packages, the NASM rules that decide whether code links, the toolchain, CI and releases. It comes with three scripts that also work on their own. It is published in the AsmFoundation's plugin marketplace, AsmClaudeMarketplace. ## Articles - [C# and assembly, the easy way](https://asmfoundation.github.io/AsmSdk/articles/csharp-and-assembly.html.md): Write the hot loop in NASM, keep everything else in C#, and let dotnet build, NuGet and your IDE treat both the same.