---
title: "makeLibrary(descriptor:)"
framework: metal
role: symbol
role_heading: Instance Method
path: "metal/mtl4compiler/makelibrary(descriptor:)"
---

# makeLibrary(descriptor:)

Creates a new Metal library synchronously.

## Declaration

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

## Parameters

- `descriptor`: A description of the library to create.

## Return Value

Return Value A Metal library instance upon success, nil otherwise.
