| # Licensed under the Apache-2.0 license | |
| # SPDX-License-Identifier: Apache-2.0 | |
| load("@rules_rust//rust:defs.bzl", "rust_library") | |
| load("//target/ast10x0:defs.bzl", "TARGET_COMPATIBLE_WITH") | |
| # The single kernel-tagged server crate: wraps i2c_server::{dispatch, | |
| # slave::dispatch_slave} in the Pigweed WaitGroup loop and adds the per-bus | |
| # slave-RX notification latch + IRQ->USER wake. One IPC channel per bus. | |
| # Slave/notification logic is verified on-target (QEMU), not host. | |
| rust_library( | |
| name = "i2c_server_runtime", | |
| srcs = ["src/lib.rs"], | |
| edition = "2024", | |
| tags = ["kernel"], | |
| target_compatible_with = TARGET_COMPATIBLE_WITH, | |
| visibility = ["//visibility:public"], | |
| deps = [ | |
| "//services/i2c/api:i2c_api", | |
| "//services/i2c/server:i2c_server", | |
| "@pigweed//pw_kernel/userspace", | |
| "@pigweed//pw_log/rust:pw_log", | |
| "@rust_crates//:zerocopy", | |
| ], | |
| ) |