| # Copyright 2025 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. |
| |
| import("//build/components.gni") |
| import("//build/rust/rustc_library.gni") |
| |
| rustc_library("fidl") { |
| name = "fdf_fidl" |
| version = "0.1.0" |
| edition = "2024" |
| with_unit_tests = true |
| |
| deps = [ |
| "//sdk/lib/driver/runtime/rust/channel", |
| "//sdk/lib/driver/runtime/rust/core", |
| "//sdk/rust/zx", |
| "//src/devices/bin/driver_runtime", |
| "//src/lib/fidl/rust_next/fidl_next", |
| "//third_party/rust_crates:futures", |
| ] |
| |
| test_deps = [ |
| ":fuchsia.examples.gizmo_rust_next", |
| "//sdk/lib/driver/runtime/rust/env", |
| "//src/devices/bin/driver_runtime", |
| "//src/lib/fuchsia-async", |
| ] |
| |
| sources = [ |
| "src/lib.rs", |
| "src/wire.rs", |
| ] |
| } |
| |
| # Sample driver protocol using the Driver transport |
| fidl("fuchsia.examples.gizmo") { |
| sources = [ "gizmo.test.fidl" ] |
| public_deps = [ "//zircon/vdso/zx" ] |
| contains_drivers = true |
| enable_rust_next = true |
| } |
| |
| fuchsia_unittest_package("fdf_rust_fidl_tests") { |
| deps = [ ":fidl_test" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":fdf_rust_fidl_tests" ] |
| } |