Add async host functions
This commit is contained in:
parent
a5a0abb895
commit
4565f1a976
6 changed files with 96 additions and 91 deletions
|
@ -115,11 +115,8 @@ pub fn import(args: TokenStream, function: TokenStream) -> TokenStream {
|
|||
})
|
||||
.unzip();
|
||||
|
||||
dbg!("hello");
|
||||
|
||||
let body = TokenStream::from(quote! {
|
||||
{
|
||||
// dbg!("executing imported function");
|
||||
// setup
|
||||
let data: (#( #tys ),*) = (#( #args ),*);
|
||||
let data = ::plugin::bincode::serialize(&data).unwrap();
|
||||
|
@ -137,12 +134,8 @@ pub fn import(args: TokenStream, function: TokenStream) -> TokenStream {
|
|||
}
|
||||
});
|
||||
|
||||
dbg!("hello2");
|
||||
|
||||
let block = parse_macro_input!(body as Block);
|
||||
|
||||
dbg!("hello {:?}", &block);
|
||||
|
||||
let inner_fn = ItemFn {
|
||||
attrs: fn_declare.attrs,
|
||||
vis: fn_declare.vis,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue