| # Copyright 2026 The Fuchsia Authors. All rights reserved. | |
| # Use of this source code is governed by a BSD-style license that can be | |
| # found in the LICENSE file. | |
| load("@rules_cc//cc:cc_library.bzl", "cc_library") | |
| load( | |
| "@rules_fuchsia//fuchsia:defs.bzl", | |
| "fuchsia_cc_driver", | |
| "fuchsia_driver_bind_bytecode", | |
| "fuchsia_driver_component", | |
| "fuchsia_package", | |
| ) | |
| package(default_applicable_licenses = ["//:license"]) | |
| fuchsia_driver_bind_bytecode( | |
| name = "example-config-bind-bytecode", | |
| output = "example_config_driver.bindbc", | |
| rules = "meta/config_driver.bind", | |
| deps = [ | |
| "//examples/drivers/bind/bindlib:gizmo.example", | |
| ], | |
| ) | |
| cc_library( | |
| name = "common", | |
| srcs = [ | |
| "config_driver.cc", | |
| ], | |
| hdrs = [ | |
| "config_driver.h", | |
| ], | |
| deps = [ | |
| "@fuchsia_sdk//pkg/driver_component_cpp", | |
| "@fuchsia_sdk//pkg/driver_logging_cpp", | |
| "@fuchsia_sdk//pkg/zx", | |
| ], | |
| ) | |
| fuchsia_cc_driver( | |
| name = "example-config-driver", | |
| output_name = "example_config_driver", | |
| deps = [":common"], | |
| ) | |
| fuchsia_driver_component( | |
| name = "component", | |
| bind_bytecode = ":example-config-bind-bytecode", | |
| driver_lib = ":example-config-driver", | |
| manifest = "meta/config_driver.cml", | |
| ) | |
| fuchsia_package( | |
| name = "pkg", | |
| package_name = "example_config_driver", | |
| components = [":component"], | |
| fuchsia_api_level = "HEAD", | |
| package_repository_name = "fuchsia.com", | |
| visibility = ["//visibility:public"], | |
| ) |