-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Expand file tree
/
Copy pathBUILD.bazel
More file actions
40 lines (36 loc) · 913 Bytes
/
BUILD.bazel
File metadata and controls
40 lines (36 loc) · 913 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
load("@rules_rust//cargo:defs.bzl", "cargo_build_script")
load("@rules_rust//rust:defs.bzl", "rust_library")
load("//misc/bazel/3rdparty/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,
),
)
exports_files(["Cargo.toml"])