mirror of
https://github.com/fluencelabs/marine.git
synced 2024-12-12 14:55:32 +00:00
output args separated with comma
This commit is contained in:
parent
04ffc3dcf8
commit
3785c002b7
6
Cargo.lock
generated
6
Cargo.lock
generated
@ -675,7 +675,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "fluence-app-service"
|
name = "fluence-app-service"
|
||||||
version = "0.1.4"
|
version = "0.1.5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"fluence-faas",
|
"fluence-faas",
|
||||||
"log",
|
"log",
|
||||||
@ -686,7 +686,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "fluence-faas"
|
name = "fluence-faas"
|
||||||
version = "0.1.4"
|
version = "0.1.5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cmd_lib",
|
"cmd_lib",
|
||||||
"env_logger 0.7.1",
|
"env_logger 0.7.1",
|
||||||
@ -794,7 +794,7 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "frepl"
|
name = "frepl"
|
||||||
version = "0.1.7"
|
version = "0.1.8"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"clap",
|
"clap",
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "fluence-app-service"
|
name = "fluence-app-service"
|
||||||
description = "Fluence Application Service"
|
description = "Fluence Application Service"
|
||||||
version = "0.1.4"
|
version = "0.1.5"
|
||||||
authors = ["Fluence Labs"]
|
authors = ["Fluence Labs"]
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
fluence-faas = { path = "../fluence-faas", version = "0.1.4" }
|
fluence-faas = { path = "../fluence-faas", version = "0.1.5" }
|
||||||
|
|
||||||
log = "0.4.8"
|
log = "0.4.8"
|
||||||
serde_json = "1.0.53"
|
serde_json = "1.0.53"
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "fluence-faas"
|
name = "fluence-faas"
|
||||||
description = "Fluence FaaS"
|
description = "Fluence FaaS"
|
||||||
version = "0.1.4"
|
version = "0.1.5"
|
||||||
authors = ["Fluence Labs"]
|
authors = ["Fluence Labs"]
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
@ -23,6 +23,7 @@ use serde::Serializer;
|
|||||||
|
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
use itertools::Itertools;
|
||||||
|
|
||||||
#[derive(Debug, PartialEq, Clone)]
|
#[derive(Debug, PartialEq, Clone)]
|
||||||
pub struct FaaSInterface<'a> {
|
pub struct FaaSInterface<'a> {
|
||||||
@ -69,13 +70,21 @@ impl<'a> fmt::Display for FaaSInterface<'a> {
|
|||||||
for (name, signature) in functions.iter() {
|
for (name, signature) in functions.iter() {
|
||||||
write!(f, " pub fn {}(", name)?;
|
write!(f, " pub fn {}(", name)?;
|
||||||
|
|
||||||
for arg in signature.arguments {
|
let args = signature
|
||||||
write!(f, "{}: {}", arg.name, type_text_view(&arg.ty))?;
|
.arguments
|
||||||
}
|
.iter()
|
||||||
|
.map(|arg| format!("{}: {}", arg.name, type_text_view(&arg.ty)))
|
||||||
|
.join(", ");
|
||||||
|
|
||||||
if signature.output_types.is_empty() {
|
if signature.output_types.is_empty() {
|
||||||
writeln!(f, ")")?;
|
writeln!(f, "{})", args)?;
|
||||||
} else if signature.output_types.len() == 1 {
|
} else if signature.output_types.len() == 1 {
|
||||||
writeln!(f, ") -> {}", type_text_view(&signature.output_types[0]))?;
|
writeln!(
|
||||||
|
f,
|
||||||
|
"{}) -> {}",
|
||||||
|
args,
|
||||||
|
type_text_view(&signature.output_types[0])
|
||||||
|
)?;
|
||||||
} else {
|
} else {
|
||||||
// At now, multi values aren't supported - only one output type is possible
|
// At now, multi values aren't supported - only one output type is possible
|
||||||
unimplemented!()
|
unimplemented!()
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "frepl"
|
name = "frepl"
|
||||||
description = "Fluence FCE REPL intended for testing purposes"
|
description = "Fluence FCE REPL intended for testing purposes"
|
||||||
version = "0.1.7"
|
version = "0.1.8"
|
||||||
authors = ["Fluence Labs"]
|
authors = ["Fluence Labs"]
|
||||||
repository = "https://github.com/fluencelabs/fce/tools/repl"
|
repository = "https://github.com/fluencelabs/fce/tools/repl"
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
@ -12,7 +12,7 @@ name = "fce-repl"
|
|||||||
path = "src/main.rs"
|
path = "src/main.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
fluence-app-service = { path = "../../fluence-app-service", version = "0.1.4", features = ["raw-module-api"] }
|
fluence-app-service = { path = "../../fluence-app-service", version = "0.1.5", features = ["raw-module-api"] }
|
||||||
|
|
||||||
anyhow = "1.0.31"
|
anyhow = "1.0.31"
|
||||||
clap = "2.33.1"
|
clap = "2.33.1"
|
||||||
|
Loading…
Reference in New Issue
Block a user