load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "go_default_library",
    srcs = [
        "answer.go",
        "errors.go",
        "introspect.go",
        "log.go",
        "question.go",
        "rpc.go",
        "tables.go",
        "transport.go",
    ],
    importpath = "zombiezen.com/go/capnproto2/rpc",
    visibility = ["//visibility:public"],
    deps = [
        "//:go_default_library",
        "//internal/fulfiller:go_default_library",
        "//internal/queue:go_default_library",
        "//rpc/internal/refcount:go_default_library",
        "//std/capnp/rpc:go_default_library",
        "@org_golang_x_net//context:go_default_library",
    ],
)

go_test(
    name = "go_default_test",
    srcs = [
        "bench_test.go",
        "cancel_test.go",
        "embargo_test.go",
        "example_test.go",
        "issue3_test.go",
        "promise_test.go",
        "release_test.go",
        "rpc_test.go",
    ],
    embed = [":go_default_library"],
    deps = [
        "//:go_default_library",
        "//rpc/internal/logtransport:go_default_library",
        "//rpc/internal/pipetransport:go_default_library",
        "//rpc/internal/testcapnp:go_default_library",
        "//server:go_default_library",
        "//std/capnp/rpc:go_default_library",
        "@org_golang_x_net//context:go_default_library",
    ],
)
