File
Blob: src/rust/jsg/BUILD.bazel
| 1 | load("//:build/wd_cc_library.bzl", "wd_cc_library") |
| 2 | load("//:build/wd_rust_crate.bzl", "wd_rust_crate") |
| 3 | |
| 4 | wd_rust_crate( |
| 5 | name = "jsg", |
| 6 | cxx_bridge_deps = ["//src/workerd/jsg:jsg-core"], |
| 7 | cxx_bridge_features = ["-parse_headers"], |
| 8 | cxx_bridge_local_defines = ["JSG_IMPLEMENTATION"], |
| 9 | cxx_bridge_srcs = [ |
| 10 | "lib.rs", |
| 11 | "v8.rs", |
| 12 | ], |
| 13 | cxx_bridge_tags = ["no-clang-tidy"], |
| 14 | visibility = ["//visibility:public"], |
| 15 | deps = [ |
| 16 | ":ffi", |
| 17 | "//src/workerd/io:compatibility-date_capnp_rust", |
| 18 | "@crates_vendor//:capnp", |
| 19 | ], |
| 20 | ) |
| 21 | |
| 22 | wd_cc_library( |
| 23 | name = "bridge", |
| 24 | srcs = [], |
| 25 | hdrs = ["jsg.h"], |
| 26 | local_defines = ["JSG_IMPLEMENTATION"], |
| 27 | tags = ["no-clang-tidy"], |
| 28 | visibility = ["//visibility:public"], |
| 29 | deps = [":jsg"], |
| 30 | ) |
| 31 | |
| 32 | wd_cc_library( |
| 33 | name = "ffi", |
| 34 | srcs = ["ffi.c++"], |
| 35 | hdrs = [ |
| 36 | "ffi.h", |
| 37 | ], |
| 38 | local_defines = ["JSG_IMPLEMENTATION"], |
| 39 | tags = ["no-clang-tidy"], |
| 40 | textual_hdrs = [ |
| 41 | "ffi-inl.h", |
| 42 | ], |
| 43 | visibility = ["//visibility:public"], |
| 44 | deps = [ |
| 45 | ":lib.rs@cxx", |
| 46 | ":v8.rs@cxx", |
| 47 | "//src/workerd/jsg:jsg-core", |
| 48 | "@workerd-cxx//kj-rs", |
| 49 | "@workerd-v8//:v8", |
| 50 | ], |
| 51 | ) |