blob: bef041c0b753ec3585c53bf90c8ab3341c1c8799 [file] [log] [blame]
# Copyright 2021 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/rust.gni")
import("//build/rust/mixed_target.gni")
# Defines a component containing both Rust and C++ code.
# See mixed_target.gni for documentation.
#
# Note that there is not currently any way for other Rust code
# to depend on Rust APIs exposed by this component. We simply haven't
# set up the infrastructure to enable Rust symbols to be exported by
# a shared library yet. This likely requires a fix to:
# https://github.com/rust-lang/rust/issues/73295
template("mixed_component") {
mixed_target(target_name) {
target_type = "component"
forward_variables_from(invoker,
"*",
TESTONLY_AND_VISIBILITY + [ "rs_visibility" ])
forward_variables_from(invoker,
TESTONLY_AND_VISIBILITY + [ "rs_visibility" ])
}
}
set_defaults("mixed_component") {
configs = default_component_configs
}