blob: 3b48f22686aa2a6e22dc7d440db4fdc47ea6dc5c [file] [log] [blame]
# Copyright 2018 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("zerocopy") {
name = "zerocopy"
version = "0.1.0"
edition = "2021"
with_unit_tests = true
deps = [
"//src/lib/zerocopy/zerocopy-derive",
"//third_party/rust_crates:byteorder",
"//third_party/rust_crates:rand",
]
features = [ "alloc" ]
sources = [
"src/byteorder.rs",
"src/lib.rs",
]
configs -= [ "//build/config/rust:allow_unused_results" ]
}
fuchsia_unittest_package("zerocopy-test-package") {
package_name = "zerocopy-test"
deps = [ ":zerocopy_test" ]
}
group("tests") {
testonly = true
public_deps = [
":zerocopy-test-package",
":zerocopy_test($host_toolchain)",
"zerocopy-derive:tests",
]
}