1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use proc_macro::TokenStream;

use crate::read::jvms::auto_read_bytes;
use crate::write::jvms::auto_write_bytes;

mod read;
mod write;

#[proc_macro_derive(FromReadContext, attributes(index))]
pub fn from_read_context_impl(input: TokenStream) -> TokenStream {
    auto_read_bytes(input)
}

#[proc_macro_derive(IntoWriteContext, attributes(index))]
pub fn to_write_context_impl(input: TokenStream) -> TokenStream {
    auto_write_bytes(input)
}