mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
39 lines
863 B
Python
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,
|
|
),
|
|
)
|