-
Notifications
You must be signed in to change notification settings - Fork 0
updating wasmtime to 36.0.0 #89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| use std::net::SocketAddr; | ||
| use std::sync::Arc; | ||
| use std::time::Duration; | ||
| use wasmtime::component::HasSelf; | ||
| use wasmtime_wasi_nn::wit::WasiNnView; | ||
|
|
||
| pub use crate::executor::ExecutorFactory; | ||
|
|
@@ -181,25 +182,27 @@ where | |
| fn configure_engine(builder: &mut WasmEngineBuilder<Self::State>) -> Result<()> { | ||
| let linker = builder.component_linker_ref(); | ||
| // Allow re-importing of `wasi:clocks/wall-clock@0.2.0` | ||
| wasmtime_wasi::add_to_linker_async(linker)?; | ||
| wasmtime_wasi::p2::add_to_linker_async(linker)?; | ||
| linker.allow_shadowing(true); | ||
| wasmtime_wasi_http::add_to_linker_async(linker)?; | ||
|
|
||
| wasmtime_wasi_nn::wit::add_to_linker(linker, |data: &mut runtime::Data<Self::State>| { | ||
| WasiNnView::new(&mut data.table, &mut data.wasi_nn) | ||
| })?; | ||
|
|
||
| reactor::gcore::fastedge::http_client::add_to_linker(linker, |data| { | ||
| reactor::gcore::fastedge::http_client::add_to_linker::<_, HasSelf<_>>(linker, |data| { | ||
| &mut data.as_mut().http_backend | ||
| })?; | ||
|
|
||
| reactor::gcore::fastedge::dictionary::add_to_linker(linker, |data| { | ||
| reactor::gcore::fastedge::dictionary::add_to_linker::<_, HasSelf<_>>(linker, |data| { | ||
|
||
| &mut data.as_mut().dictionary | ||
| })?; | ||
|
|
||
| reactor::gcore::fastedge::secret::add_to_linker(linker, |data| &mut data.secret_store)?; | ||
| reactor::gcore::fastedge::secret::add_to_linker::<_, HasSelf<_>>(linker, |data| { | ||
|
||
| &mut data.secret_store | ||
| })?; | ||
|
|
||
| reactor::gcore::fastedge::key_value::add_to_linker(linker, |data| { | ||
| reactor::gcore::fastedge::key_value::add_to_linker::<_, HasSelf<_>>(linker, |data| { | ||
|
||
| &mut data.key_value_store | ||
| })?; | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The repeated use of
HasSelf<_>type parameter suggests this could be extracted into a type alias or helper function to reduce duplication and improve maintainability.