Understanding the Metal Shading Language Filename Extension

Use the .metal filename extension to gain access to Metal's build, profile, and debug tools.


The .metal filename extension denotes a Metal Shading Language source-code file. Using this extension allows Xcode to recognize Metal Shading Language files in your project, automatically build a default library at build time, and help you profile and debug source code with specialized Metal tools. Using the .metal filename extension also allows you to manually build a library by using Metal's command-line tools.

See Also


Building a Library with Metal's Command-Line Tools

Use command-line tools to run the Metal compiler toolchain.


A collection of Metal shader functions.


Compilation settings for a Metal shader library.