This repository is deprecated. Native Objective-C rules have already been migrated to Starlark in Bazel core.
This repository contains an experimental Starlark implementation of Objective-C rules for Bazel.
Add the following to your WORKSPACE
file, replacing <commit>
and <sha256>
accordingly.
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_objc",
sha256 = "<sha256>",
strip_prefix = "rules_objc-<commit>",
urls = ["https://github.com/thii/rules_objc/archive/<commit>.zip"],
)
Then, in your BUILD
files, import and use the rules:
load("@rules_objc//objc:objc.bzl", "objc_library")
objc_library(
...
)
The rules are expected to be compatible with their native implementation. See the documentation from the native rules.
- Implemented:
apple_static_library
,objc_import
, andobjc_library
. - Passes all
rules_apple
's analysis tests. - Be able to build a non-trivial iOS app.
Special thanks to the following external rules that have heavily inspired the implementation of these rules (sorted alphabetically).