mirror of
https://github.com/fluencelabs/wasmer
synced 2025-03-16 16:20:49 +00:00
Merge #305
305: Feature/fix wasi setup r=lachlansneff a=MarkMcCaskey Co-authored-by: Mark McCaskey <mark@wasmer.io>
This commit is contained in:
commit
72ec4ab9e5
@ -203,7 +203,7 @@ fn execute_wasm(options: &Run) -> Result<(), String> {
|
||||
};
|
||||
|
||||
// TODO: refactor this
|
||||
#[cfg(not(features = "wasi"))]
|
||||
#[cfg(not(feature = "wasi"))]
|
||||
let (_abi, import_object, _em_globals) = if wasmer_emscripten::is_emscripten_module(&module) {
|
||||
let mut emscripten_globals = wasmer_emscripten::EmscriptenGlobals::new(&module);
|
||||
(
|
||||
@ -219,14 +219,18 @@ fn execute_wasm(options: &Run) -> Result<(), String> {
|
||||
)
|
||||
};
|
||||
|
||||
#[cfg(features = "wasi")]
|
||||
#[cfg(feature = "wasi")]
|
||||
let (_abi, import_object) = if wasmer_wasi::is_wasi_module(&module) {
|
||||
(
|
||||
InstanceABI::WASI,
|
||||
wasmer_wasi::generate_import_object(
|
||||
options.args.iter().map(|arg| arg.into_bytes()).collect(),
|
||||
env::vars()
|
||||
options
|
||||
.args
|
||||
.iter()
|
||||
.cloned()
|
||||
.map(|arg| arg.into_bytes())
|
||||
.collect(),
|
||||
env::vars()
|
||||
.map(|(k, v)| format!("{}={}", k, v).into_bytes())
|
||||
.collect(),
|
||||
),
|
||||
|
Loading…
x
Reference in New Issue
Block a user