lib.rs (483B)
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 7 use proc_macro::TokenStream; 8 9 mod to_shmem; 10 mod util; 11 12 #[proc_macro_derive(ToShmem, attributes(shmem))] 13 pub fn derive_to_shmem(stream: TokenStream) -> TokenStream { 14 let input = syn::parse(stream).unwrap(); 15 to_shmem::derive(input).into() 16 }