---
title: "makeLibrary(stitchedDescriptor:)"
framework: metal
role: symbol
role_heading: Instance Method
path: "metal/mtldevice/makelibrary(stitcheddescriptor:)"
---

# makeLibrary(stitchedDescriptor:)

Synchronously creates a Metal library from the function stitching graphs in a descriptor.

## Declaration

```swift
func makeLibrary(stitchedDescriptor descriptor: MTLStitchedLibraryDescriptor) throws -> any MTLLibrary
```

## Parameters

- `descriptor`: An doc://com.apple.metal/documentation/Metal/MTLStitchedLibraryDescriptor instance.

## Return Value

Return Value A new MTLLibrary instance if the method completes successfully; otherwise Swift throws an error and Objective-C returns nil.

## See Also

### Creating shader libraries

- [makeDefaultLibrary()](metal/mtldevice/makedefaultlibrary().md)
- [makeDefaultLibrary(bundle:)](metal/mtldevice/makedefaultlibrary(bundle:).md)
- [makeLibrary(URL:)](metal/mtldevice/makelibrary(url:).md)
- [makeLibrary(source:options:)](metal/mtldevice/makelibrary(source:options:).md)
- [makeLibrary(source:options:completionHandler:)](metal/mtldevice/makelibrary(source:options:completionhandler:).md)
- [makeLibrary(stitchedDescriptor:completionHandler:)](metal/mtldevice/makelibrary(stitcheddescriptor:completionhandler:).md)
- [makeLibrary(data:)](metal/mtldevice/makelibrary(data:)-7khmh.md)
- [makeLibrary(data:)](metal/mtldevice/makelibrary(data:).md)
- [MTLNewLibraryCompletionHandler](metal/mtlnewlibrarycompletionhandler.md)
- [makeLibrary(filepath:)](metal/mtldevice/makelibrary(filepath:).md)
