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

[WIP] Move Runner out of WASIX #4306

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Moved BinaryPackage and Runner to runtime
syrusakbary committed Nov 12, 2023
commit ae666a32fcdc49ea16cf325e589d44d1346de520
7 changes: 2 additions & 5 deletions lib/wasix/src/bin_factory/mod.rs
Original file line number Diff line number Diff line change
@@ -9,13 +9,10 @@ use anyhow::Context;
use virtual_fs::{AsyncReadExt, FileSystem};
use webc::Container;

mod binary_package;
mod exec;

pub use self::{
binary_package::*,
exec::{spawn_exec, spawn_exec_module},
};
pub use self::exec::{spawn_exec, spawn_exec_module};
pub use crate::runtime::binary_package::{BinaryPackage, BinaryPackageCommand};
use crate::{os::command::Commands, Runtime};

#[derive(Debug, Clone)]
5 changes: 2 additions & 3 deletions lib/wasix/src/runners/mod.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
mod runner;

#[cfg(feature = "webc_runner_rt_emscripten")]
pub mod emscripten;
pub mod wasi;
mod wasi_common;
#[cfg(feature = "webc_runner_rt_wcgi")]
pub mod wcgi;

pub use self::{runner::Runner, wasi_common::MappedCommand};
pub use self::wasi_common::MappedCommand;
pub use crate::runtime::runner::Runner;

/// A directory that should be mapped from the host filesystem into a WASI
/// instance (the "guest").
File renamed without changes.
11 changes: 7 additions & 4 deletions lib/wasix/src/runtime/mod.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
pub mod binary_package;
pub mod module_cache;
pub mod package_loader;
pub mod resolver;
pub mod runner;
pub mod task_manager;
pub mod tty_sys;

pub use self::binary_package::{BinaryPackage, BinaryPackageCommand};
pub use self::runner::Runner;
pub use self::task_manager::{SpawnMemoryType, VirtualTaskManager};
pub use self::tty_sys::{SysTty, TtyBridge, TtyState};
use self::{
module_cache::{CacheError, ModuleHash},
task_manager::InlineWaker,
};

use self::module_cache::{CacheError, ModuleHash};
use self::task_manager::InlineWaker;

use std::{fmt, sync::Arc};

File renamed without changes.