blob: 42fe369745b47fb30e8dbdc5a73d6e0ffbed97d0 [file] [log] [blame]
# Copyright 2023 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("starnix-uapi") {
name = "starnix_uapi"
edition = "2021"
version = "0.1.0"
with_unit_tests = true
sources = [
"src/${current_cpu}.rs",
"src/arc_key.rs",
"src/as_any.rs",
"src/auth.rs",
"src/device_type.rs",
"src/elf.rs",
"src/errors.rs",
"src/file_mode.rs",
"src/inotify_mask.rs",
"src/kcmp.rs",
"src/lib.rs",
"src/math.rs",
"src/mount_flags.rs",
"src/open_flags.rs",
"src/ownership.rs",
"src/personality.rs",
"src/range_ext.rs",
"src/resource_limits.rs",
"src/seal_flags.rs",
"src/signals.rs",
"src/stats.rs",
"src/syslog.rs",
"src/time.rs",
"src/uapi.rs",
"src/union.rs",
"src/user_address.rs",
"src/user_buffer.rs",
"src/vfs.rs",
]
deps = [
"//sdk/fidl/fuchsia.io:fuchsia.io_rust",
"//sdk/fidl/fuchsia.starnix.binder:fuchsia.starnix.binder_rust",
"//src/lib/zircon/rust:fuchsia-zircon",
"//src/starnix/lib/linux_uapi",
"//src/starnix/lib/syncio",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:bitflags",
"//third_party/rust_crates:bstr",
"//third_party/rust_crates:memoffset",
"//third_party/rust_crates:once_cell",
"//third_party/rust_crates:paste",
"//third_party/rust_crates:ref-cast",
"//third_party/rust_crates:smallvec",
"//third_party/rust_crates:static_assertions",
"//third_party/rust_crates:zerocopy",
]
test_deps = [ "//src/lib/fuchsia" ]
configs += [ "//src/starnix/config:starnix_clippy_lints" ]
}
fuchsia_unittest_package("starnix-uapi-tests") {
deps = [ ":starnix-uapi_test" ]
test_specs = {
log_settings = {
# Tests exercise failure cases, so ERROR logs are expected.
max_severity = "ERROR"
}
}
}
group("tests") {
testonly = true
deps = [ ":starnix-uapi-tests" ]
}