Skip to content

Commit

Permalink
Remove func_wrap_async
Browse files Browse the repository at this point in the history
This will cause a compile error instead of a runtime error, which will be better
  • Loading branch information
kajacx committed Mar 9, 2024
1 parent 56c05ce commit 41453ec
Showing 1 changed file with 3 additions and 24 deletions.
27 changes: 3 additions & 24 deletions crates/wasm-bridge-js/src/component/linker.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
use std::{collections::HashMap, future::Future, rc::Rc};
use std::{collections::HashMap, rc::Rc};

use anyhow::Context;
use js_sys::{Array, Function, Object, Reflect};
use wasm_bindgen::JsValue;

use crate::{
direct::{LazyModuleMemory, Lift, Lower},
helpers::static_str_to_js,
AsContextMut, DataHandle, DropHandle, DropHandles, Engine, Result, StoreContextMut,
direct::LazyModuleMemory, helpers::static_str_to_js, AsContextMut, DataHandle, DropHandle,
DropHandles, Engine, Result, StoreContextMut,
};

use super::*;
Expand Down Expand Up @@ -180,26 +179,6 @@ impl<T> LinkerInterface<T> {
Ok(())
}

pub fn func_wrap_async<Params, Results, F>(&mut self, _name: &str, _func: F) -> Result<()>
where
T: 'static,
// F: IntoMakeClosure<T, Params, Results>,
F: for<'a> Fn(
StoreContextMut<'a, T>,
Params,
) -> Box<dyn Future<Output = Result<Results>> + Send + 'a>
+ Send
+ Sync
+ 'static,
Params: Lift + 'static,
Results: Lower + 'static,
{
// self.func_wrap(name, func)
todo!("implement func_wrap_async for {_name}")
// FIXME: actually implement this, or somehow resolve "normal" user imports
// Ok(())
}

pub fn resource<U>(
&mut self,
_name: &str,
Expand Down

0 comments on commit 41453ec

Please sign in to comment.