Skip to content
This repository has been archived by the owner on Jun 13, 2024. It is now read-only.

Commit

Permalink
fix: wasix
Browse files Browse the repository at this point in the history
Signed-off-by: Yuhang Shi <[email protected]>
  • Loading branch information
Yuhang Shi committed Dec 4, 2023
1 parent 61977e3 commit 330a8c1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/rust-core/common/src/code_interpreter/wasix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,15 @@ fn wasix_runtime(cache_path: PathBuf, network: bool) -> impl Runtime + Send + Sy
let mut rt = PluggableRuntime::new(Arc::new(TokioTaskManager::new(tokio_rt)));
let cache = SharedCache::default().with_fallback(FileSystemCache::new(cache_path.clone()));

let client = Arc::new(wasmer_wasix::http::default_http_client().unwrap());
let client = wasmer_wasix::http::default_http_client().unwrap();

rt.set_engine(Some(store.engine().clone()))
.set_module_cache(cache)
.set_package_loader(BuiltinPackageLoader::new_with_client(cache_path, client));
.set_package_loader(
BuiltinPackageLoader::new()
.with_cache_dir(cache_path)
.with_http_client(client),
);

if network {
// TODO: fix me.
Expand Down

0 comments on commit 330a8c1

Please sign in to comment.