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