Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion ios/BUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
load("@bazel_skylib//rules:build_test.bzl", "build_test")
load("@rules_apple//apple:ios.bzl", "ios_application", "ios_ui_test", "ios_unit_test")
load("@rules_apple//apple:macos.bzl", "macos_unit_test")
load("@rules_apple//apple:macos.bzl", "macos_build_test", "macos_unit_test")
load("@rules_apple//apple:resources.bzl", "apple_metal_library")
load("@rules_swift//swift:swift.bzl", "swift_library")

swift_library(
Expand Down Expand Up @@ -63,3 +64,18 @@ macos_unit_test(
],
deps = [":HelloTestLib"],
)

apple_metal_library(
name = "SampleMetal",
srcs = ["sample.metal"],
out = "Sample.metallib",
hdrs = ["shader_defines.h"],
)

macos_build_test(
name = "SampleMetalBuildTest",
minimum_os_version = "14.0",
targets = [
":SampleMetal",
],
)
5 changes: 5 additions & 0 deletions ios/sample.metal
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#include <metal_stdlib>

using namespace metal;

// Just exists to make the compiler do some work.
6 changes: 6 additions & 0 deletions ios/shader_defines.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#ifndef SHADER_DEFINES_H
#define SHADER_DEFINES_H

// Just exists to make the compiler do some work.

#endif
Loading