[driver][bindlib] Use visibility on target

The target used to not support the visibility property, so we had the
entire package marked as public. Now it is so we can do per target
visibility.

Bug: 106882
Change-Id: Ia6fd48c6c497d4d3319ac029b3584e93e233036e
Reviewed-on: https://fuchsia-review.googlesource.com/c/sdk-samples/drivers/+/752130
Reviewed-by: Dave Smith <smithdave@google.com>
Commit-Queue: Novin Changizi <novinc@google.com>
diff --git a/src/bind_library/lib/BUILD.bazel b/src/bind_library/lib/BUILD.bazel
index c1ce5fd..17de7e9 100644
--- a/src/bind_library/lib/BUILD.bazel
+++ b/src/bind_library/lib/BUILD.bazel
@@ -11,9 +11,6 @@
     "fuchsia_fidl_llcpp_library",
 )
 
-# TODO(fxbug.dev/106882): Apply visibility to rules once available
-package(default_visibility = ["//visibility:public"])
-
 #[START fuchsia_gizmo_library]
 # This is a bind library that we manually define.
 fuchsia_bind_library(
@@ -21,6 +18,7 @@
     srcs = [
         "testlibrary.bind",
     ],
+    visibility = ["//visibility:public"],
     deps = [
         "@fuchsia_sdk//bind/fuchsia.acpi",  # An SDK bind library.
     ],
@@ -30,6 +28,7 @@
 fuchsia_bind_cc_library(
     name = "fuchsia.examples.gizmo.bind_cc",
     library = ":fuchsia.examples.gizmo.bind",
+    visibility = ["//visibility:public"],
     # Has to have the C++ libraries of all the deps of the bind library.
     deps = [
         "@fuchsia_sdk//bind/fuchsia.acpi:fuchsia.acpi_cc",  # An SDK bind library's C++ lib.
@@ -51,9 +50,10 @@
 fuchsia_fidl_llcpp_library(
     name = "fuchsia.examples.gizmo_cc",
     library = ":fuchsia.examples.gizmo",
+    visibility = ["//visibility:public"],
     deps = [
-        "@fuchsia_sdk//pkg/fidl_cpp_wire",
         "@fuchsia_sdk//pkg/fidl_cpp_v2",
+        "@fuchsia_sdk//pkg/fidl_cpp_wire",
     ],
 )
 
@@ -61,11 +61,13 @@
 fuchsia_fidl_bind_library(
     name = "fuchsia.examples.gizmo_bindlib",
     library = ":fuchsia.examples.gizmo",
+    visibility = ["//visibility:public"],
 )
 
 # We have to manually create the C++ lib for the FIDL based bind library we created.
 fuchsia_bind_cc_library(
     name = "fuchsia.examples.gizmo_bindlib_cc",
     library = ":fuchsia.examples.gizmo_bindlib",
+    visibility = ["//visibility:public"],
 )
 #[END fuchsia_gizmo_protocol]
diff --git a/src/composite_sample/lib/BUILD.bazel b/src/composite_sample/lib/BUILD.bazel
index 992ebfb..64564fd 100644
--- a/src/composite_sample/lib/BUILD.bazel
+++ b/src/composite_sample/lib/BUILD.bazel
@@ -8,17 +8,16 @@
     "fuchsia_bind_library",
 )
 
-# TODO(fxbug.dev/106882): Apply visibility to rules once available
-package(default_visibility = ["//visibility:public"])
-
 fuchsia_bind_library(
     name = "fuchsia.driver.test",
     srcs = [
         "fuchsia_driver_test.bind",
     ],
+    visibility = ["//visibility:public"],
 )
 
 fuchsia_bind_cc_library(
     name = "fuchsia.driver.test_cc",
     library = ":fuchsia.driver.test",
+    visibility = ["//visibility:public"],
 )