Skip to main content
net10.0-ios26.0

.NET bindings for the Nuke Swift image loading library

Published
Mar 27, 2026
6mo ago
Total Downloads
1.9K
1,883

Install

dotnet add package SwiftBindings.Nuke --version 12.8.0-preview.2
ProductVersions
.NET
net10.0-ios26.0

README

SwiftBindings.Nuke

Native Swift interop bindings for Nuke, a powerful image loading and caching framework for Swift. These are not Objective-C proxy wrappers — they use .NET 10's native Swift interop for direct, high-performance calls into Swift APIs from C#.

Installation

dotnet add package SwiftBindings.Nuke

Requirements

  • .NET 10.0+
  • iOS 15.0+
  • macOS host for development

Usage

Load an image

using Nuke;

var pipeline = ImagePipeline.Shared;
var request = new ImageRequest("https://example.com/photo.jpg");
var image = await pipeline.ImageAsync(request);

Concurrent loading

var pipeline = ImagePipeline.Shared;

var tasks = urls.Select(url => Task.Run(async () =>
{
    var request = new ImageRequest(url);
    return await pipeline.ImageAsync(request);
}));

var images = await Task.WhenAll(tasks);

Cache management

// Configure the image cache
var cache = ImageCache.Shared;
cache.CostLimit = 50_000_000;  // 50 MB
cache.CountLimit = 200;
cache.Ttl = 300.0;             // 5 minutes

// Data cache with compression
var dataCache = new DataCache("my-cache");
dataCache.SizeLimit = 100_000_000;  // 100 MB
dataCache.IsCompressionEnabled = true;

// Clear all cached data
pipeline.Cache.RemoveAll();

Prefetching

var prefetcher = new ImagePrefetcher(ImagePipeline.Shared);
prefetcher.Priority = ImageRequest.PriorityType.High;
// ...
prefetcher.StopPrefetching();

How It Works

These bindings are auto-generated by Swift Dotnet Bindings using .NET 10's native Swift interop via the SwiftBindings SDK.

Building from Source

Only needed if you're contributing or building the package locally.

# 1. Build the xcframework from SPM
./build-xcframework.sh

# 2. Build the package (SDK generates bindings automatically)
dotnet build

License

The bindings are MIT licensed. Nuke itself is MIT licensed — see Nuke's license.

Adoption Assessment

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

This version is marked prerelease. Validate its API and upgrade path before production use.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.