---
title: "makeDynamicLibrary(url:)"
framework: metal
role: symbol
role_heading: Instance Method
path: "metal/mtl4compiler/makedynamiclibrary(url:)"
---

# makeDynamicLibrary(url:)

Creates a new dynamic library from the contents of a file at an URL location synchronously.

## Declaration

```swift
func makeDynamicLibrary(url: URL) throws -> any MTLDynamicLibrary
```

## Parameters

- `url`: An URL referencing a file whose contents this compiler uses to build a dynamic library.

## Return Value

Return Value A new dynamic Metal library upon success, nil otherwise.
