Skip to content
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

Fix the wasmer-swift crate build #5203

Merged
merged 1 commit into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading