# Copyright (c) Meta Platforms, Inc. and affiliates.

# @noautodeps

load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library")
load("//data_compression/experimental/zstrong:defs.bzl", "zs_library")

oncall("data_compression")

zs_library(
    name = "encode_thrift_kernel",
    srcs = ["encode_thrift_kernel.c"],
    headers = ["encode_thrift_kernel.h"],
    exported_deps = [
        "//data_compression/experimental/zstrong:common",
    ],
)

zs_library(
    name = "decode_thrift_kernel",
    srcs = ["decode_thrift_kernel.c"],
    headers = ["decode_thrift_kernel.h"],
    exported_deps = [
        "//data_compression/experimental/zstrong:common",
    ],
)

cpp_library(
    name = "thrift_kernel_utils",
    headers = ["thrift_kernel_utils.h"],
    exported_deps = [
        ":encode_thrift_kernel",
    ],
)

cpp_library(
    name = "encode_thrift_binding",
    srcs = ["encode_thrift_binding.cpp"],
    headers = ["encode_thrift_binding.h"],
    exported_deps = [
        ":encode_thrift_kernel",
        ":thrift_kernel_utils",
        "//data_compression/experimental/zstrong:compress",
        "//folly/memory:uninitialized_memory_hacks",
    ],
)

cpp_library(
    name = "decode_thrift_binding",
    srcs = ["decode_thrift_binding.cpp"],
    headers = ["decode_thrift_binding.h"],
    exported_deps = [
        ":decode_thrift_kernel",
        ":thrift_kernel_utils",
        "//data_compression/experimental/zstrong:decompress",
        "//folly/memory:uninitialized_memory_hacks",
    ],
)
