| # 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("dense-map") { |
| version = "0.1.0" |
| edition = "2021" |
| with_unit_tests = true |
| |
| deps = [ |
| # TODO(https://github.com/rust-lang-nursery/portability-wg/issues/11): |
| # remove this module. |
| # TODO(https://fxbug.dev/42084580): Remove this module once we import `ahash` |
| # crate and can use the `hashbrown` crate w/ a default hasher for `HashMap` |
| # and `HashSet` data structures instead of `std`. |
| "//src/lib/fakealloc", |
| ] |
| |
| test_deps = [ |
| "//src/lib/const-unwrap", |
| "//src/lib/proptest-support", |
| "//third_party/rust_crates:proptest", |
| "//third_party/rust_crates:rand", |
| "//third_party/rust_crates:rand_xorshift", |
| ] |
| |
| sources = [ |
| "src/collection.rs", |
| "src/lib.rs", |
| "src/testutil.rs", |
| ] |
| |
| configs -= [ "//build/config/rust/lints:allow_unused_results" ] |
| } |
| |
| fuchsia_unittest_package("dense-map-test") { |
| package_name = "dense-map-test" |
| deps = [ ":dense-map_test" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":dense-map-test", |
| ":dense-map_test($host_toolchain)", |
| ] |
| } |