blob: abfdba3e638a1425ac080ac5c6dc1c5e0c950821 [file] [log] [blame]
# Copyright 2022 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")
static_library("test-lib") {
sources = [
"test/lib.cc",
"test/lib.h",
]
deps = [ "//zircon/system/public" ]
}
rustc_library("abi") {
name = "fuchsia_zbi_abi"
edition = "2021"
with_unit_tests = true
deps = [
"//sdk/fidl/zbi:zbi_zither.rust",
"//third_party/rust_crates:num-derive",
"//third_party/rust_crates:num-traits",
"//third_party/rust_crates:zerocopy",
]
test_deps = [
":test-lib",
"//src/lib/fuchsia",
]
sources = [ "src/lib.rs" ]
# TODO(https://fxbug.dev/42082652): //sdk/fidl/zbi:zbi_zither.rust is unused right now,
# but is depended upon for compilation exercise. Future changes will begin
# to replace the abi crate with the generated one, at which point this can be
# removed.
configs += [ ":unused" ]
}
config("unused") {
rustflags = [ "-Aunused-crate-dependencies" ]
}
fuchsia_unittest_package("fuchsia-zbi-abi-tests") {
deps = [ ":abi_test" ]
}