Skip to content

Evaluate NoDependencies native package variant for minimal Linux environments #80

@Blind-Striker

Description

@Blind-Striker

Context

Native NuGet packages that ship shared libraries (.so, .dylib) create implicit runtime dependencies on system libraries. Consumers on minimal Linux environments (containers, embedded, CI) may not have all transitive system deps installed.

SkiaSharp addresses this with a SkiaSharp.NativeAssets.Linux.NoDependencies package variant that links only against core system libraries (libc, libpthread, libdl, libm, ld-linux), avoiding dependencies on fontconfig, freetype, and other optional system libraries.

Goal

Evaluate and potentially implement a NoDependencies variant for Linux native packages that minimizes system library dependencies by:

  1. Static-linking optional dependencies where possible
  2. Disabling features that require uncommon system libraries
  3. Providing a separate .NoDependencies NuGet package for minimal environments

Industry Reference

  • SkiaSharp: SkiaSharp.NativeAssets.Linux.NoDependencies — links only libc, libpthread, libdl, libm
  • This is particularly valuable for Docker/container deployments and CI environments

Research Needed

  1. Inventory current runtime system dependencies per library per RID (using ldd / otool output from harvest)
  2. Identify which dependencies can be statically linked via vcpkg triplet features
  3. Determine which SDL2 features must be dropped for a minimal build (e.g., Wayland, PulseAudio)
  4. Evaluate whether a separate triplet (e.g., x64-linux-static-dynamic) or feature flags in vcpkg.json is the better approach
  5. Assess demand — is this something downstream consumers actually need?

Deliverables

  1. System dependency audit report per library per RID
  2. Decision note: build approach (separate triplet vs. feature flags) and package naming
  3. If approved: new vcpkg triplet, Cake harvest path, NuGet package skeleton

Exit Criteria

  • System dependency inventory complete
  • Decision note approved
  • If proceeding: NoDependencies packages build and publish for at least linux-x64

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:nativeNative harvesting, runtime layout, and binary assetsarea:packagingNuGet packaging, staging, verification, and publishingplatform:linuxtype:researchInvestigation or design work before implementation

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions