---
title: source
framework: metal
role: symbol
role_heading: Instance Property
path: metal/mtl4librarydescriptor/source
---

# source

Assigns an optional string containing the source code of the shader language program to compile into a Metal library.

## Declaration

```swift
var source: String? { get set }
```
