File
Blob: src/rust/jsg-test/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_cc_library( |
| 5 | name = "ffi-hdrs", |
| 6 | hdrs = [ |
| 7 | "ffi.h", |
| 8 | ], |
| 9 | visibility = ["//visibility:public"], |
| 10 | deps = [ |
| 11 | "//src/rust/jsg:ffi", |
| 12 | "//src/workerd/jsg", |
| 13 | ], |
| 14 | ) |
| 15 | |
| 16 | wd_cc_library( |
| 17 | name = "ffi-impl", |
| 18 | srcs = ["ffi.c++"], |
| 19 | implementation_deps = [ |
| 20 | ":lib.rs@cxx", |
| 21 | "//src/workerd/io:compatibility-date_capnp", |
| 22 | "@capnp-cpp//src/capnp:capnp", |
| 23 | ], |
| 24 | visibility = ["//visibility:public"], |
| 25 | deps = [ |
| 26 | ":ffi-hdrs", |
| 27 | ], |
| 28 | ) |
| 29 | |
| 30 | wd_rust_crate( |
| 31 | name = "jsg-test", |
| 32 | cxx_bridge_deps = [ |
| 33 | "//src/workerd/jsg:jsg-core", |
| 34 | ":ffi-hdrs", |
| 35 | ], |
| 36 | cxx_bridge_srcs = [ |
| 37 | "lib.rs", |
| 38 | ], |
| 39 | test_proc_macro_deps = ["//src/rust/jsg-macros"], |
| 40 | # The crate has hundreds of subtests and uses RUST_TEST_THREADS=1 (serial), |
| 41 | # so the default "medium" (15s) timeout is too tight under CI load. |
| 42 | test_size = "large", |
| 43 | visibility = ["//visibility:public"], |
| 44 | deps = [ |
| 45 | ":ffi-impl", |
| 46 | "//src/rust/jsg", |
| 47 | ], |
| 48 | ) |