Skip to content

AsmFoundation.Sdk 0.1.0

Choose a tag to compare

@github-actions github-actions released this 17 Nov 19:29
· 35 commits to main since this release

The first release.

Added

  • .asmproj projects (<Project Sdk="AsmFoundation.Sdk">). NASM sources
    become a Linux x86-64 shared library, static library or executable, or just
    objects, chosen with the csproj-style OutputType.

  • Two runtimes:

    • Freestanding (the default): raw system calls, nothing linked;
    • Libc: glibc linked dynamically through a generated libc.so.6 stub, so
      no sysroot is needed. A Libc executable starts in main through the
      SDK's crt1.
  • References:

    • ProjectReference between .asmproj projects adds the include folders and
      links the library;
    • ProjectReference from a .csproj copies the shared library next to the
      program;
    • PackageReference to an asm package adds the package's include folders and
      library.
  • dotnet pack writes native packages:

    • include/;
    • native/linux-x64/*.a;
    • runtimes/linux-x64/native/*.so;
    • optional src/;
    • generated build/ and buildTransitive/ props.
  • Exact incremental builds: a rebuild without changes starts no tool; an
    include file change reassembles the sources that can include it.

  • AsmFoundation.Toolchain 0.1.0 for win-x64, linux-x64 and
    osx-arm64:

    • NASM 3.02: the official binary on Windows, built from source on Linux
      (statically) and on macOS (arm64);
    • LLVM 23.1.5's lld, llvm-ar and llvm-readobj.

    Every download is pinned by SHA-256 and verified before use.

  • Samples and an end-to-end test (tests/run.py) that CI runs on Windows,
    Linux and macOS.

    • It checks every output's ELF properties: type, SONAME, DT_NEEDED,
      interpreter, exports and archive members.
    • It runs the executables and a C# program that P/Invokes two asm shared
      libraries.
    • It verifies the incremental builds.