blob: ee70e75ca961dba94dc1c3351c15d0c5e51ed439 [file] [log] [blame]
# 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/rust/rustc_library.gni")
import("//build/rust/rustc_macro.gni")
import("//build/rust/rustc_test.gni")
assert(is_host, "Assembly libraries are host-only")
rustc_library("file_relative_path") {
edition = "2021"
name = "assembly_file_relative_path"
version = "0.1.0"
with_unit_tests = true
deps = [
":file_relative_path_derive",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:camino",
"//third_party/rust_crates:pathdiff",
"//third_party/rust_crates:schemars",
"//third_party/rust_crates:serde",
]
test_deps = [ "//third_party/rust_crates:serde_json" ]
sources = [
"src/file_relative_path.rs",
"src/lib.rs",
]
}
rustc_macro("file_relative_path_derive") {
edition = "2021"
name = "assembly_file_relative_path_derive"
deps = [
"//third_party/rust_crates:proc-macro2",
"//third_party/rust_crates:quote",
# FIXME(https://fxbug.dev/332277415): Please update to syn 2.x.
# "//third_party/rust_crates:syn",
"//third_party/rust_crates:syn-v1_0_98",
]
source_root = "src/macro.rs"
sources = [ "src/macro.rs" ]
}
rustc_test("file_relative_path_derive_test") {
edition = "2021"
deps = [
":file_relative_path",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:camino",
"//third_party/rust_crates:serde",
"//third_party/rust_crates:serde_json",
]
source_root = "src/macro_test.rs"
sources = [ "src/macro_test.rs" ]
}