blueprint_allocative_derive/lib.rs
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is dual-licensed under either the MIT license found in the
5 * LICENSE-MIT file in the root directory of this source tree or the Apache
6 * License, Version 2.0 found in the LICENSE-APACHE file in the root directory
7 * of this source tree. You may select, at your option, one of the
8 * above-listed licenses.
9 */
10
11use proc_macro::TokenStream;
12
13mod derive_allocative;
14mod root;
15
16#[proc_macro_derive(Allocative, attributes(allocative))]
17pub fn derive_allocative(input: TokenStream) -> TokenStream {
18 derive_allocative::derive_allocative(input)
19}
20
21#[proc_macro_attribute]
22pub fn root(attr: TokenStream, input: TokenStream) -> TokenStream {
23 root::root(attr, input)
24}