<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -",
    "macOS: 26.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTL4PipelineDataSetSerializer",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "c:objc(pl)MTL4PipelineDataSetSerializer"
  },
  "title" : "MTL4PipelineDataSetSerializer"
}
-->

# MTL4PipelineDataSetSerializer

A fast-addition container for collecting data during pipeline state creation.

```
protocol MTL4PipelineDataSetSerializer : NSObjectProtocol
```

## Overview

Pipeline data serializer instances allow you to create binary archives and serialize pipeline scripts to use with
the offline Metal binary generator (`metal-tt`) <doc:compiling-binary-archives-from-a-custom-configuration-script.md>.

You capture and retain all relevant data for all pipelines a compiler instance creates by providing an instance of
this object to its [`MTL4CompilerDescriptor`](/documentation/Metal/MTL4CompilerDescriptor).

After capturing data, you can serialize it to a binary archive to persist its contents offline by calling
[`serializeAsArchiveAndFlush(url:)`](/documentation/Metal/MTL4PipelineDataSetSerializer/serializeAsArchiveAndFlush(url:)). You can also serialize a pipeline script suitable for the offline binary
generator (`metal-tt`) by calling [`serializeAsPipelinesScript()`](/documentation/Metal/MTL4PipelineDataSetSerializer/serializeAsPipelinesScript())

> Note: The objects ``doc://com.apple.metal/documentation/Metal/MTL4PipelineDataSetSerializer`` contains are opaque and can’t accelerate compilation for
> compilers they are not attached to. Additionally, your program can’t read data out of data set serializer instances.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)