# Copyright 2026 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/rust/rust_static_library.gni")
rust_static_library("other_lib") {
crate_root = "other.rs"
sources = [ crate_root ]
testonly = true
cpp_api_from_rust = {
target_name = "other_lib_bindings"
cpp_namespace = "other_lib"
}
}
rust_static_library("rust_lib") {
crate_root = "lib.rs"
sources = [ crate_root ]
testonly = true
cpp_api_from_rust = {
target_name = "rust_lib_bindings"
cpp_namespace = "rust_lib"
deps = [ ":other_lib_bindings" ]
}
deps = [ ":other_lib" ]
}
source_set("test_cpp_api_from_rust") {
sources = [ "unittests.cc" ]
deps = [
":rust_lib_bindings",
"//base",
"//build/rust/crubit:rs_std",
"//testing/gmock",
"//testing/gtest",
]
testonly = true
}