<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: -",
    "macOS: 26.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTL4Compiler/makeDynamicLibrary(library:)-7f4yz",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "s:So12MTL4CompilerP5MetalE18makeDynamicLibrary7librarySo010MTLDynamicF0_pSo10MTLLibrary_p_tYaKF"
  },
  "title" : "makeDynamicLibrary(library:)"
}
-->

# makeDynamicLibrary(library:)

Creates a dynamic library asynchronously.

```
func makeDynamicLibrary(library: any MTLLibrary) async throws -> any MTLDynamicLibrary
```

## Parameters

`library`

A library the compiler uses to create a dynamic library.

## Return Value

A dynamic library upon success, otherwise this method throws.

---

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)