Debian Codegraph @

third_party/rust/uniffi_bindgen/src/macro_metadata/mod.rs

raw
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4
5 use super::ComponentInterface;
6 use anyhow::Context;
7 use camino::Utf8Path;
8
9 mod ci;
10 mod extract;
11
12 pub use ci::{add_group_to_ci, add_to_ci};
13 pub use extract::extract_from_library;
14
15 pub fn add_to_ci_from_library(
16 iface: &mut ComponentInterface,
17 library_path: &Utf8Path,
18 ) -> anyhow::Result<()> {
19 add_to_ci(
20 iface,
21 extract_from_library(library_path).context("Failed to extract proc-macro metadata")?,
22 )
23 .context("Failed to add proc-macro metadata to ComponentInterface")
24 }