Synchronously creates a new library that contains the functions stored in the specified source string.
- iOS 8.0+
- macOS 10.11+
- tvOS 9.0+
A string containing source code for one or more Metal functions. See Metal Shading Language Guide.
A set of options to influence the compilation of this source. See
A pointer to an error object that describes source code compilation problems, if any. This object contains compiler errors if the returned library object is
nil, and compiler warnings if the library was generated with warnings. If the library was generated successfully, without errors or warnings, this error object is
A new library object that contains the compiled source code or
nil if an error occurred.
The source may only import the Metal standard library. There is no search path to find other functions.