blob: b8f90b6875fb4b4bfeb9f245e2ff8de884da3546 [file] [log] [blame]
Marcel Hlopkob10e49b2022-05-09 03:57:32 -07001// Part of the Crubit project, under the Apache License v2.0 with LLVM
2// Exceptions. See /LICENSE for license information.
3// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
4
5#ifndef THIRD_PARTY_CRUBIT_RS_BINDINGS_FROM_CC_COLLECT_INSTANTIATIONS_H_
6#define THIRD_PARTY_CRUBIT_RS_BINDINGS_FROM_CC_COLLECT_INSTANTIATIONS_H_
7
8#include <string>
9
10#include "absl/status/statusor.h"
11#include "absl/types/span.h"
12
13namespace crubit {
14
15// Parses Rust source files given their filenames and returns a vector with all
16// C++ class template instantiations requested by calls to the `cc_template!`
17// macro.
18absl::StatusOr<std::vector<std::string>> CollectInstantiations(
19 absl::Span<const std::string> rust_sources);
20
21} // namespace crubit
22
23#endif // THIRD_PARTY_CRUBIT_RS_BINDINGS_FROM_CC_COLLECT_INSTANTIATIONS_H_