blob: 9cb22b4c632479a5fad48a1210054bef71c0f866 [file] [log] [blame]
# Copyright 2024 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_bindgen.gni")
import("//build/rust/rust_executable.gni")
source_set("cpp_lib") {
sources = [
"cpp.cc",
"cpp.h",
]
}
rust_bindgen("cpp_lib_bindgen") {
deps = [ ":cpp_lib" ]
header = "cpp.h"
cpp = true
}
rust_executable("bindgen_cpp_test") {
deps = [ ":cpp_lib_bindgen" ]
sources = [ "main.rs" ]
crate_root = "main.rs"
allow_unsafe = true # Needed for FFI.
}