blob: f7bb1e609de6a99c4b702ea7e6a7ec668d36054b [file] [log] [blame]
# Copyright 2024 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")
# The cstringify!() macro should only be used in cases where a macro needs to create a C-string
# literal from a path. Otherwise, the c"..." syntax or CString::new() should be used instead.
rustc_library("cstringify") {
# Add some friction to discourage use of the cstringify!() macro except when it's really needed.
visibility = [
":*",
"//src/lib/trace/rust/bench:*",
"//src/storage/fxfs/trace:*",
]
with_unit_tests = true
edition = "2021"
sources = [ "src/lib.rs" ]
}
fuchsia_unittest_package("cstringify-test") {
deps = [ ":cstringify_test" ]
test_specs = {
environments = [ emu_env ]
}
}
group("tests") {
testonly = true
deps = [ ":cstringify-test" ]
}