# Any targets that should be shared between fbcode and xplat must be defined in
# targets.bzl. This file can contain fbcode-only targets.

load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
load(":targets.bzl", "define_common_targets")

oncall("executorch")

define_common_targets()

runtime.cxx_python_extension(
    name = "pybindings",
    srcs = [
        "pybindings.cpp",
    ],
    base_module = "executorch.extension.pytree",
    deps = [
        "fbsource//third-party/pybind11:pybind11",
        ":pytree",
    ],
)

runtime.cxx_python_extension(
    name = "pybindings_debug",
    srcs = [
        "pybindings.cpp",
    ],
    base_module = "executorch.extension.pytree",
    deps = [
        "fbsource//third-party/pybind11:pybind11",
        ":pytree",
    ],
)

runtime.python_library(
    name = "pylib",
    srcs = [
        "__init__.py",
    ],
    base_module = "executorch.extension.pytree",
    deps = [
        ":pybindings",
        "//caffe2:torch",
    ],
)
