xref: /aosp_15_r20/external/executorch/shim/README.md (revision 523fa7a60841cd1ecfb9cc4201f1ca8b03ed023a)
1# buck2 shims
2
3The `shim/` subtree helps the Meta-internal buck2 build system also work in the
4open-source repo.
5
6Shims are how open-source buck2 supports a [line
7like](https://github.com/pytorch/executorch/blob/50aa517549d10324147534d91d04a923b76421d6/kernels/optimized/targets.bzl#L1):
8
9```
10load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
11```
12
13In the open-source repo, `fbsource//xplat` (a Meta-internal root) doesn't exist.
14The `shim = shim` line in `../.buckconfig` tells buck2 to look in
15[`shim/xplat/executorch/build/runtime_wrapper.bzl`](https://github.com/pytorch/executorch/blob/main/shim/xplat/executorch/build/runtime_wrapper.bzl)
16instead.
17