Skip to content
Closed
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
10 changes: 10 additions & 0 deletions build_defs/thrift_library.bzl
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under both the MIT license found in the
# LICENSE-MIT file in the root directory of this source tree and the Apache
# License, Version 2.0 found in the LICENSE-APACHE file in the root directory
# of this source tree.

load("@shim//:shims.bzl", _thrift_library = "thrift_library")

thrift_library = _thrift_library
15 changes: 15 additions & 0 deletions shims.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,21 @@ def _default_rust_edition():

return read_config("rust", "default_edition")

def thrift_library(
name,
thrift_srcs,
languages,
deps = [],
py_base_module = None,
rust_deps = [],
thrift_rust_options = [],
**kwargs):
for l in languages:
if False:
pass
else:
print("FIXME(buck2-shims-meta): unsupported thrift language: {}".format(l))

# Do a nasty conversion of e.g. ("supercaml", None, "ocaml-dev") to
# 'fbcode//third-party-buck/platform010/build/supercaml:ocaml-dev'
# (which will then get mapped to `shim//third-party/ocaml:ocaml-dev`).
Expand Down