v8 147.3.0

Rust bindings to V8
Documentation
# 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_static_library.gni")

source_set("cpp_lib") {
  sources = [
    "cpp.cc",
    "cpp.h",
  ]
}

rust_bindgen("cpp_lib_bindgen") {
  deps = [ ":cpp_lib" ]
  header = "cpp.h"
  cpp = true
}

rust_static_library("rust_lib") {
  deps = [ ":cpp_lib_bindgen" ]
  sources = [ "lib.rs" ]
  crate_root = "lib.rs"

  allow_unsafe = true  # Needed for FFI.
}

executable("bindgen_cpp_test_with_cpp_linkage") {
  sources = [ "main.cc" ]
  deps = [ ":rust_lib" ]
}