blob: 3d2700c6e45325a28fa0eceddec1f1eb6a4918d0 [file] [log] [blame]
# Copyright 2020 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/go/go_binary.gni")
import("//build/go/go_library.gni")
import("//build/go/go_test.gni")
go_library("lib") {
name = "fidlgen_rust"
}
go_binary("fidlgen_rust") {
gopackage = "fidlgen_rust"
sdk_category = "partner"
deps = [
":lib",
"//garnet/go/src/fidl:fidl_lib",
]
}
go_test("fidlgen_rust_test") {
gopackages = [ "fidlgen_rust/codegen" ]
deps = [
":lib",
"//garnet/go/src/fidl:fidlgen_test_lib",
]
non_go_deps = [ ":copies" ]
}
group("copies") {
deps = [
":copy_rustfmt",
":copy_rustfmt_toml",
]
metadata = {
test_runtime_deps = [
"$root_out_dir/test_data/fidlgen_rust/rustfmt",
"$root_out_dir/test_data/fidlgen_rust/rustfmt.toml",
]
}
}
copy("copy_rustfmt") {
sources = [ "//prebuilt/third_party/rust/$host_platform/bin/rustfmt" ]
outputs = [ "$root_out_dir/test_data/fidlgen_rust/rustfmt" ]
}
copy("copy_rustfmt_toml") {
sources = [ "//rustfmt.toml" ]
outputs = [ "$root_out_dir/test_data/fidlgen_rust/rustfmt.toml" ]
}