to_shmem_derive/
lib.rs

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 https://mozilla.org/MPL/2.0/. */
4
5#![recursion_limit = "128"]
6
7use proc_macro::TokenStream;
8
9mod to_shmem;
10mod util;
11
12#[proc_macro_derive(ToShmem, attributes(shmem))]
13pub fn derive_to_shmem(stream: TokenStream) -> TokenStream {
14    let input = syn::parse(stream).unwrap();
15    to_shmem::derive(input).into()
16}