| # 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") |
| |
| rustc_library("flyweights") { |
| with_unit_tests = true |
| edition = "2021" |
| |
| sources = [ |
| "src/lib.rs", |
| "src/raw.rs", |
| ] |
| deps = [ |
| "//third_party/rust_crates:ahash", |
| "//third_party/rust_crates:bstr", |
| "//third_party/rust_crates:byteorder", |
| "//third_party/rust_crates:serde", |
| "//third_party/rust_crates:static_assertions", |
| ] |
| test_deps = [ |
| "//third_party/rust_crates:serde_json", |
| "//third_party/rust_crates:test-case", |
| ] |
| if (is_host) { |
| deps += [ "//third_party/rust_crates:schemars" ] |
| test_deps += [ "//third_party/rust_crates:serial_test" ] |
| features = [ "json_schema" ] |
| } |
| } |
| |
| fuchsia_unittest_package("flyweights_tests") { |
| deps = [ ":flyweights_test($target_toolchain)" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":flyweights_test($host_toolchain)", |
| ":flyweights_tests", |
| ] |
| } |