File
Blob: src/rust/kj/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 = "kj", |
| 6 | cxx_bridge_deps = [ |
| 7 | "@capnp-cpp//src/kj/compat:kj-http", |
| 8 | ], |
| 9 | cxx_bridge_srcs = [ |
| 10 | "http.rs", |
| 11 | "io.rs", |
| 12 | ], |
| 13 | proc_macro_deps = [ |
| 14 | "@crates_vendor//:async-trait", |
| 15 | ], |
| 16 | visibility = ["//visibility:public"], |
| 17 | deps = [ |
| 18 | ":ffi", |
| 19 | "@crates_vendor//:futures", |
| 20 | "@crates_vendor//:static_assertions", |
| 21 | ], |
| 22 | ) |
| 23 | |
| 24 | wd_cc_library( |
| 25 | name = "ffi", |
| 26 | srcs = [ |
| 27 | "ffi.c++", |
| 28 | ], |
| 29 | hdrs = [ |
| 30 | "ffi.h", |
| 31 | ], |
| 32 | linkstatic = select({ |
| 33 | "@platforms//os:windows": True, |
| 34 | "//conditions:default": False, |
| 35 | }), |
| 36 | visibility = ["//visibility:public"], |
| 37 | deps = [ |
| 38 | ":http.rs@cxx", |
| 39 | "//src/rust/cxx-integration", |
| 40 | "@capnp-cpp//src/kj", |
| 41 | "@capnp-cpp//src/kj/compat:kj-http", |
| 42 | ], |
| 43 | ) |