From 1c3b6ff708096f7514570919104f32b08de8b9e1 Mon Sep 17 00:00:00 2001 From: Tsiry Sandratraina Date: Wed, 21 Aug 2024 07:33:57 +0000 Subject: [PATCH 1/2] fix: display wasm function return value --- Cargo.lock | 2 +- README.md | 4 ++-- crates/cli/Cargo.toml | 2 +- crates/cli/src/cmd/call.rs | 9 +++++++-- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 295bd0a..a382251 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2241,7 +2241,7 @@ dependencies = [ [[package]] name = "fluentci-engine" -version = "0.4.9" +version = "0.4.10" dependencies = [ "anyhow", "clap", diff --git a/README.md b/README.md index 02546ce..0f5fca6 100644 --- a/README.md +++ b/README.md @@ -59,8 +59,8 @@ cargo run -p fluentci-engine -- serve ## 📦 Downloads -- `Mac`: arm64: [fluentci-engine_v0.4.9_aarch64-apple-darwin.tar.gz](https://github.com/fluentci-io/fluentci-engine/releases/download/v0.4.9/fluentci-engine_v0.4.9_aarch64-apple-darwin.tar.gz) intel: [fluentci-engine_v0.4.9_x86_64-apple-darwin.tar.gz](https://github.com/fluentci-io/fluentci-engine/releases/download/v0.4.9/fluentci-engine_v0.4.9_x86_64-apple-darwin.tar.gz) -- `Linux`: intel: [fluentci-engine_v0.4.9_x86_64-unknown-linux-gnu.tar.gz](https://github.com/fluentci-io/fluentci-engine/releases/download/v0.4.9/fluentci-engine_v0.4.9_x86_64-unknown-linux-gnu.tar.gz) arm64: [fluentci-engine_v0.4.9_aarch64-unknown-linux-gnu.tar.gz](https://github.com/fluentci-io/fluentci-engine/releases/download/v0.4.9/fluentci-engine_v0.4.9_aarch64-unknown-linux-gnu.tar.gz) +- `Mac`: arm64: [fluentci-engine_v0.4.10_aarch64-apple-darwin.tar.gz](https://github.com/fluentci-io/fluentci-engine/releases/download/v0.4.10/fluentci-engine_v0.4.10_aarch64-apple-darwin.tar.gz) intel: [fluentci-engine_v0.4.10_x86_64-apple-darwin.tar.gz](https://github.com/fluentci-io/fluentci-engine/releases/download/v0.4.10/fluentci-engine_v0.4.10_x86_64-apple-darwin.tar.gz) +- `Linux`: intel: [fluentci-engine_v0.4.10_x86_64-unknown-linux-gnu.tar.gz](https://github.com/fluentci-io/fluentci-engine/releases/download/v0.4.10/fluentci-engine_v0.4.10_x86_64-unknown-linux-gnu.tar.gz) arm64: [fluentci-engine_v0.4.10_aarch64-unknown-linux-gnu.tar.gz](https://github.com/fluentci-io/fluentci-engine/releases/download/v0.4.10/fluentci-engine_v0.4.10_aarch64-unknown-linux-gnu.tar.gz) ## 📚 Documentation diff --git a/crates/cli/Cargo.toml b/crates/cli/Cargo.toml index e66146b..8e856ee 100644 --- a/crates/cli/Cargo.toml +++ b/crates/cli/Cargo.toml @@ -8,7 +8,7 @@ license = "MPL-2.0" name = "fluentci-engine" readme = "../../README.md" repository = "https://github.com/fluentci-io/fluentci-engine" -version = "0.4.9" +version = "0.4.10" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/crates/cli/src/cmd/call.rs b/crates/cli/src/cmd/call.rs index b63bd5a..2a13529 100644 --- a/crates/cli/src/cmd/call.rs +++ b/crates/cli/src/cmd/call.rs @@ -1,5 +1,8 @@ use std::{ - env::consts::{ARCH, OS}, + env::{ + self, + consts::{ARCH, OS}, + }, fs, process::{Command, Stdio}, sync::{mpsc, Arc, Mutex}, @@ -143,7 +146,9 @@ pub fn call(module: &str, command: &str) -> Result<(), Error> { let args = command.split_whitespace().skip(1).collect::>(); let args = args.join(" "); match plugin.call::<&str, &str>(func, &args) { - Ok(_) => {} + Ok(res) => { + println!("{}", res); + } Err(err) => { println!("{}", err); std::process::exit(1); From 7f62883c1cdd80d83aec0e40a5d2f2604c39803e Mon Sep 17 00:00:00 2001 From: Tsiry Sandratraina Date: Wed, 21 Aug 2024 07:36:30 +0000 Subject: [PATCH 2/2] remove unused import --- crates/cli/src/cmd/call.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/crates/cli/src/cmd/call.rs b/crates/cli/src/cmd/call.rs index 2a13529..7e16c91 100644 --- a/crates/cli/src/cmd/call.rs +++ b/crates/cli/src/cmd/call.rs @@ -1,8 +1,5 @@ use std::{ - env::{ - self, - consts::{ARCH, OS}, - }, + env::consts::{ARCH, OS}, fs, process::{Command, Stdio}, sync::{mpsc, Arc, Mutex},