| # Copyright 2019 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/rust/rustc_library.gni") |
| |
| common_deps = [ |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/storage/pseudo-fs", |
| "//src/lib/storage/vfs/rust/macros", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:byteorder", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:itertools", |
| "//third_party/rust_crates:libc", |
| "//third_party/rust_crates:parking_lot", |
| "//third_party/rust_crates:pin-utils", |
| "//third_party/rust_crates:proc-macro-hack", |
| "//third_party/rust_crates:proc-macro-nested", |
| "//third_party/rust_crates:slab", |
| "//third_party/rust_crates:static_assertions", |
| "//third_party/rust_crates:thiserror", |
| "//third_party/rust_crates:void", |
| "//zircon/system/fidl/fuchsia-io:fuchsia-io-rustc", |
| "//zircon/system/fidl/fuchsia-mem:fuchsia-mem-rustc", |
| ] |
| |
| # TODO(48539): Fix the leaks and remove this. |
| common_deps += [ "//build/config/sanitizers:suppress-lsan.DO-NOT-USE-THIS" ] |
| |
| rustc_library("vfs") { |
| version = "0.1.0" |
| edition = "2018" |
| deps = common_deps |
| } |
| |
| # Suppress this lint for the whole compilation unit. Using source-level suppression doesn't work |
| # because the lint occurs in a proc macro, where #![allow()] doesn't "reach" (and every attempt I |
| # made to put it on the place where the lint fired failed). This may be a compiler bug; see the |
| # issue below for more. |
| # |
| # TODO(fxbug.dev/49845): Remove this once the lints are re-enabled. |
| config("suppress_lints") { |
| visibility = [ ":*" ] |
| rustflags = [ "-Aunused-imports" ] |
| } |
| |
| rustc_test("vfs_test") { |
| name = "vfs_lib_test" |
| edition = "2018" |
| |
| deps = common_deps + [ "//garnet/examples/fidl/services:echo-rustc" ] |
| |
| # TODO(fxbug.dev/49845): Re-enable these lints. |
| # -Dwarnings seems to override -A options that come after it. |
| configs += [ ":suppress_lints" ] |
| } |