Skip to content

Commit

Permalink
fix the swift build (#5203)
Browse files Browse the repository at this point in the history
  • Loading branch information
maminrayej authored Oct 30, 2024
2 parents 49b1fcc + 6b64e9a commit dc472a2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions lib/swift/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ wasmer = { version = "=5.0.0", path = "../api", default-features = false, featur
] }
wasmer-wasix = { version = "=0.30.0", path = "../wasix" }
webc.workspace = true
wasmer-package.workspace = true


[build-dependencies]
Expand Down
3 changes: 2 additions & 1 deletion lib/swift/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use std::sync::Arc;
use tokio::runtime::Runtime;
use virtual_fs::{AsyncReadExt, AsyncSeekExt};
use wasmer_package::utils::from_bytes;
use wasmer_wasix::{
bin_factory::BinaryPackage,
runners::{wasi::WasiRunner, Runner},
Expand Down Expand Up @@ -32,7 +33,7 @@ pub enum WasmerError {
pub fn run_package(webc_bytes: Vec<u8>, args: Vec<String>) -> Result<String, WasmerError> {
let tokio_rt = Runtime::new().unwrap();
let _enter = tokio_rt.enter();
let container = err!(webc::Container::from_bytes(webc_bytes));
let container = err!(from_bytes(webc_bytes));
let tasks = TokioTaskManager::new(tokio_rt.handle().clone());
let tasks = Arc::new(tasks);
let mut rt = PluggableRuntime::new(Arc::clone(&tasks) as Arc<_>);
Expand Down

0 comments on commit dc472a2

Please sign in to comment.