Files
codeql/python/extractor/tsg-python/tsp/BUILD.bazel
Taus 7bec41096c Python: Rename tsg-build target to tsp-build
The latter makes more sense, as it's actually building
`tree-sitter-python`.
2024-04-05 12:30:40 +02:00

39 lines
863 B
Python

load("@rules_rust//cargo:defs.bzl", "cargo_build_script")
load("@rules_rust//rust:defs.bzl", "rust_library")
load("@py_deps//:defs.bzl", "aliases", "all_crate_deps")
package(default_visibility = ["//visibility:public"])
# This will run the build script from the root of the workspace, and
# collect the outputs.
cargo_build_script(
name = "tsp-build",
srcs = ["bindings/rust/build.rs"],
data = glob([
"src/**",
]),
deps = all_crate_deps(
build = True,
),
)
rust_library(
name = "tsp",
srcs = [
"bindings/rust/lib.rs",
],
aliases = aliases(),
compile_data = glob([
"src/**",
"queries/**",
]) + [
"grammar.js",
],
proc_macro_deps = all_crate_deps(
proc_macro = True,
),
deps = [":tsp-build"] + all_crate_deps(
normal = True,
),
)