File
Blob: src/rust/gen-compile-cache/BUILD.bazel
| 1 | load("@workerd//:build/wd_cc_library.bzl", "wd_cc_library") |
| 2 | load("@workerd//:build/wd_rust_binary.bzl", "wd_rust_binary") |
| 3 | |
| 4 | wd_rust_binary( |
| 5 | name = "gen-compile-cache", |
| 6 | cxx_bridge_src = "main.rs", |
| 7 | test_size = "large", |
| 8 | visibility = ["//visibility:public"], |
| 9 | deps = [ |
| 10 | ":cxx-bridge", |
| 11 | "@crates_vendor//:clap", |
| 12 | ], |
| 13 | ) |
| 14 | |
| 15 | wd_cc_library( |
| 16 | name = "cxx-bridge", |
| 17 | srcs = [ |
| 18 | "cxx-bridge.c++", |
| 19 | ], |
| 20 | hdrs = [ |
| 21 | "cxx-bridge.h", |
| 22 | ], |
| 23 | linkstatic = select({ |
| 24 | "@platforms//os:windows": True, |
| 25 | "//conditions:default": False, |
| 26 | }), |
| 27 | deps = [ |
| 28 | "//src/rust/cxx-integration", |
| 29 | "//src/workerd/jsg", |
| 30 | "//src/workerd/jsg:compile-cache", |
| 31 | "@capnp-cpp//src/kj", |
| 32 | ], |
| 33 | ) |