---
title: "init(url:)"
framework: swiftui
role: symbol
role_heading: Initializer
path: "swiftui/shaderlibrary/init(url:)"
---

# init(url:)

Creates a new Metal shader library from the contents of url, which must be the location  of precompiled Metal library. Functions compiled from the returned library will only be cached as long as the returned library exists.

## Declaration

```swift
init(url: URL)
```

## See Also

### Creating a shader library

- [init(data:)](swiftui/shaderlibrary/init(data:).md)
