Chattel-AssetTools 3.0.0

dotnet add package Chattel-AssetTools --version 3.0.0
                    
NuGet\Install-Package Chattel-AssetTools -Version 3.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Chattel-AssetTools" Version="3.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Chattel-AssetTools" Version="3.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Chattel-AssetTools" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Chattel-AssetTools --version 3.0.0
                    
#r "nuget: Chattel-AssetTools, 3.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Chattel-AssetTools@3.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Chattel-AssetTools&version=3.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Chattel-AssetTools&version=3.0.0
                    
Install as a Cake Tool

Chattel

Chattel reads and writes immutable Halcyon assets through local disk and WHIP asset servers. Chattel 3 targets .NET 10 and .NET 11. Cloud Files support has been removed; see CHANGELOG.md for migration details.

Install the Chattel NuGet package for storage. Chattel-AssetTools adds JPEG and JPEG 2000 decoding through CoreJ2K/SkiaSharp; asset.ToImage() returns an owned SKBitmap that the caller disposes. Version 3.0.0 is in development and has not been published by this modernization.

The reader checks local storage, then upstream server groups in order, querying each group's servers in parallel and returning the first successful response. Replica failures do not hide a healthy response. A group falls back when all its servers finish without an asset or its deadline expires. Set ChattelConfiguration.ReadGroupTimeout before creating the reader; the default is 30 seconds per group. If no group succeeds, failures/timeouts throw; reads that receive only missing responses return null. Successful remote reads can populate local storage. The writer stores locally and attempts upstream delivery. When configured with both local storage and an upstream, the write cache tracks unfinished uploads for replay when the writer is reconstructed. Asset content is protobuf; the local tree and write-cache formats remain compatible with legacy assets. Applications supply configuration and choose logging through LibLog.

Run the following local-storage example with mise exec -- dotnet run --project samples/Chattel.QuickStart (from the Halcyon repository root). Its source is compiled as part of the solution:

using System;
using System.IO;
using Chattel;
using Chattel.Stratus;

var directory = Directory.CreateTempSubdirectory("chattel-example-");
try
{
    var config = new ChattelConfiguration(directory.FullName);
    var writer = new ChattelWriter(config);
    var reader = new ChattelReader(config);
    var asset = new StratusAsset
    {
        Id = Guid.NewGuid(), Name = "example", Description = "local asset",
        CreateTime = DateTime.UtcNow, Data = new byte[] { 1, 2, 3 }
    };

    await writer.PutAssetAsync(asset);
    var loaded = await reader.GetAssetAsync(asset.Id);
    if (loaded == null || !asset.Equals(loaded)) throw new InvalidOperationException("Round trip failed.");
    Console.WriteLine($"Read {loaded!.Data.Length} bytes");

    // Compatibility callback completes on the calling thread before returning,
    // including when joining an active read. Use the task overload to avoid blocking.
    reader.GetAssetAsync(asset.Id, result => Console.WriteLine(result?.Name));
}
finally
{
    directory.Delete(true);
}

For WHIP, create AssetServerWHIP with a title, host, port and password, and pass it to ChattelConfiguration. For recovery, use its constructor accepting an existing local directory, write-cache file path, record capacity (at least two), and upstream. Dispose the server after all operations have completed. The legacy WHIP client still has blocking startup/send/write operations; task-based reads wait through its callback. Read-group deadlines permit fallback and retry but do not abort outstanding transport requests. A missing read returns null. Cancellation stops a caller's wait; it does not roll back an accepted write. Keep the writer, backend and asset alive and stable until the accepted operation finishes.

Chattel is developed inside the Halcyon repository (ADR 0026), next to the WHIP client it uses (src/Halcyon.Whip.Client) and Halcyon, its main consumer. Build and test from the repository root:

mise install
mise run build
mise run test
mise run test:integration
mise run pack
mise exec -- dotnet run --project samples/Chattel.QuickStart

Unit tests need no external services. Integration tests use isolated temporary directories and Testcontainers to build and start the real C++ WHIP server from pinned upstream source. Docker with Linux containers and internet access are required; the first build can take several minutes. A server build or startup failure fails the suite. Packages and symbols go to artifacts/packages.

Releases are published from the Halcyon repository by a tag (chattel/v3.0.0); see docs/chattel/releasing.md there. Architecture records are in docs/chattel/adr.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed.  net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.0.0 56 12/3/2026
2.1.1.104 1,998 4/7/2018
2.1.0.101 1,495 2/12/2018
2.0.0.98 1,593 2/9/2018
1.5.0.66 1,587 1/10/2018
1.4.0.52 1,875 12/11/2017