From a52fadf54e3ecced8dd298cffbe08e6607990d07 Mon Sep 17 00:00:00 2001 From: Syrus Akbary Date: Tue, 10 Dec 2019 16:07:14 -0800 Subject: [PATCH 1/3] Improve wasmer invoke function --- src/bin/wasmer.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bin/wasmer.rs b/src/bin/wasmer.rs index 793b15db0..06d3c1cd4 100644 --- a/src/bin/wasmer.rs +++ b/src/bin/wasmer.rs @@ -499,7 +499,7 @@ fn execute_wasi( .map_err(|e| format!("Invoke failed: {:?}", e))? .call(&args) .map_err(|e| format!("Calling invoke fn failed: {:?}", e))?; - println!("{} returned {:?}", invoke_fn, invoke_result); + println!("{}({:?}) returned {:?}", invoke_fn, args, invoke_result); return Ok(()); } else { result = start.call(); @@ -836,7 +836,7 @@ fn execute_wasm(options: &Run) -> Result<(), String> { .map_err(|e| format!("{:?}", e))? .call(&args) .map_err(|e| format!("{:?}", e))?; - println!("main() returned: {:?}", result); + println!("{}({:?}) returned: {:?}", invoke_fn, args, result); } } From 8e4fdcf5f101482738a0639d88580cec4e4aba9c Mon Sep 17 00:00:00 2001 From: Syrus Akbary Date: Tue, 10 Dec 2019 16:10:33 -0800 Subject: [PATCH 2/3] Update src/bin/wasmer.rs --- src/bin/wasmer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/wasmer.rs b/src/bin/wasmer.rs index 06d3c1cd4..1c2d70097 100644 --- a/src/bin/wasmer.rs +++ b/src/bin/wasmer.rs @@ -836,7 +836,7 @@ fn execute_wasm(options: &Run) -> Result<(), String> { .map_err(|e| format!("{:?}", e))? .call(&args) .map_err(|e| format!("{:?}", e))?; - println!("{}({:?}) returned: {:?}", invoke_fn, args, result); + println!("{}({:?}) returned {:?}", invoke_fn, args, result); } } From 6364c56d635515fe78882e63789a6240fd5409f8 Mon Sep 17 00:00:00 2001 From: Syrus Akbary Date: Tue, 10 Dec 2019 16:12:56 -0800 Subject: [PATCH 3/3] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e6cc8bc9..fe44540cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## **[Unreleased]** +- [#1054](https://github.com/wasmerio/wasmer/pull/1054) Improve `--invoke` output in Wasmer CLI - [#1053](https://github.com/wasmerio/wasmer/pull/1053) For RuntimeError and breakpoints, use Box instead of Box. - [#1052](https://github.com/wasmerio/wasmer/pull/1052) Fix minor panic and improve Error handling in singlepass backend. - [#1050](https://github.com/wasmerio/wasmer/pull/1050) Attach C & C++ headers to releases.