---
title: device
framework: metal
role: symbol
role_heading: Instance Property
path: metal/mtllibrary/device
---

# device

The Metal device object that created the library.

## Declaration

```swift
var device: any MTLDevice { get }
```

## Discussion

Discussion You can only use the library with this MTLDevice.

## See Also

### Identifying the library

- [label](metal/mtllibrary/label.md)
