embed_licensing_macros/lib.rs
1// SPDX-FileCopyrightText: 2024 Simon Bruder <simon@sbruder.de>
2//
3// SPDX-License-Identifier: MPL-2.0
4
5use proc_macro::TokenStream;
6use quote::quote;
7use syn::parse_macro_input;
8
9// documentation lives in main crate (to avoid circular dev-dependency)
10#[proc_macro]
11pub fn collect(input: TokenStream) -> TokenStream {
12 let config = parse_macro_input!(input);
13
14 let licensing = embed_licensing_core::collect(config).expect("metadata collection failed");
15
16 quote! {
17 #licensing
18 }
19 .into()
20}