<!--
{
  "availability" : [
    "Reality Composer Pro: -",
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ComputeGraph",
  "identifier" : "/documentation/ComputeGraph/ComputeNodeGraph/LibraryReference",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Compute Graph",
      "ComputeGraph"
    ],
    "preciseIdentifier" : "s:12ComputeGraph0a4NodeB0V16LibraryReferenceV"
  },
  "title" : "ComputeNodeGraph.LibraryReference"
}
-->

# ComputeNodeGraph.LibraryReference

A Metal library and an optional bundle identifier that locates shader functions.

```
struct LibraryReference
```

## Overview

Use `addLibrary(_:bundle:)` rather than constructing this type directly.

## Topics

### Initializers

[`init(library: any MTLLibrary, bundle: String?)`](/documentation/ComputeGraph/ComputeNodeGraph/LibraryReference/init(library:bundle:))

### Instance Properties

[`var bundle: String?`](/documentation/ComputeGraph/ComputeNodeGraph/LibraryReference/bundle)

The bundle identifier used to scope shader function lookup, or `nil` if
the library does not require one.

[`var library: any MTLLibrary`](/documentation/ComputeGraph/ComputeNodeGraph/LibraryReference/library)

The Metal library containing compiled shader functions.

## Relationships

### Conforms To

[`Sendable`](/documentation/Swift/Sendable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

---

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)