mirror of
https://github.com/fluencelabs/marine.git
synced 2024-12-12 06:45:32 +00:00
repl interface output improvements
This commit is contained in:
parent
76006bc3eb
commit
04ffc3dcf8
70
Cargo.lock
generated
70
Cargo.lock
generated
@ -43,7 +43,7 @@ checksum = "6b602bfe940d21c130f3895acd65221e8a61270debe89d628b9cb4e3ccb8569b"
|
||||
name = "arguments-passing-test"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"fluence 0.2.3",
|
||||
"fluence",
|
||||
"safe-transmute",
|
||||
]
|
||||
|
||||
@ -166,7 +166,7 @@ checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38"
|
||||
name = "call_parameters"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"fluence 0.2.3",
|
||||
"fluence",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -375,7 +375,7 @@ dependencies = [
|
||||
name = "curl"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"fluence 0.2.3",
|
||||
"fluence",
|
||||
"log",
|
||||
]
|
||||
|
||||
@ -664,15 +664,6 @@ dependencies = [
|
||||
"serde_json",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fluence"
|
||||
version = "0.2.2"
|
||||
source = "git+https://github.com/fluencelabs/rust-sdk?branch=record_support#9201a824f2ecc4f2668449ea956d9b10a39091e5"
|
||||
dependencies = [
|
||||
"fluence-sdk-macro 0.2.2",
|
||||
"fluence-sdk-main 0.2.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fluence"
|
||||
version = "0.2.3"
|
||||
@ -684,7 +675,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "fluence-app-service"
|
||||
version = "0.1.3"
|
||||
version = "0.1.4"
|
||||
dependencies = [
|
||||
"fluence-faas",
|
||||
"log",
|
||||
@ -695,7 +686,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "fluence-faas"
|
||||
version = "0.1.3"
|
||||
version = "0.1.4"
|
||||
dependencies = [
|
||||
"cmd_lib",
|
||||
"env_logger 0.7.1",
|
||||
@ -715,14 +706,6 @@ dependencies = [
|
||||
"wasmer-wasi-fl",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fluence-sdk-macro"
|
||||
version = "0.2.2"
|
||||
source = "git+https://github.com/fluencelabs/rust-sdk?branch=record_support#9201a824f2ecc4f2668449ea956d9b10a39091e5"
|
||||
dependencies = [
|
||||
"fluence-sdk-wit 0.2.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fluence-sdk-macro"
|
||||
version = "0.2.3"
|
||||
@ -740,16 +723,6 @@ dependencies = [
|
||||
"fluence-sdk-wit 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fluence-sdk-main"
|
||||
version = "0.2.2"
|
||||
source = "git+https://github.com/fluencelabs/rust-sdk?branch=record_support#9201a824f2ecc4f2668449ea956d9b10a39091e5"
|
||||
dependencies = [
|
||||
"fluence-sdk-macro 0.2.2",
|
||||
"log",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fluence-sdk-main"
|
||||
version = "0.2.3"
|
||||
@ -771,19 +744,6 @@ dependencies = [
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fluence-sdk-wit"
|
||||
version = "0.2.2"
|
||||
source = "git+https://github.com/fluencelabs/rust-sdk?branch=record_support#9201a824f2ecc4f2668449ea956d9b10a39091e5"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"syn",
|
||||
"uuid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fluence-sdk-wit"
|
||||
version = "0.2.3"
|
||||
@ -834,7 +794,7 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
|
||||
|
||||
[[package]]
|
||||
name = "frepl"
|
||||
version = "0.1.5"
|
||||
version = "0.1.7"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"clap",
|
||||
@ -1146,7 +1106,7 @@ dependencies = [
|
||||
name = "inner-records-test"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"fluence 0.2.3",
|
||||
"fluence",
|
||||
"safe-transmute",
|
||||
]
|
||||
|
||||
@ -1185,7 +1145,7 @@ dependencies = [
|
||||
name = "ipfs-effector"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"fluence 0.2.3",
|
||||
"fluence",
|
||||
"log",
|
||||
]
|
||||
|
||||
@ -1193,7 +1153,7 @@ dependencies = [
|
||||
name = "ipfs-pure"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"fluence 0.2.3",
|
||||
"fluence",
|
||||
"log",
|
||||
]
|
||||
|
||||
@ -1272,7 +1232,7 @@ checksum = "f2f96b10ec2560088a8e76961b00d47107b3a625fecb76dedb29ee7ccbf98235"
|
||||
name = "local_storage"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"fluence 0.2.3",
|
||||
"fluence",
|
||||
"log",
|
||||
]
|
||||
|
||||
@ -1761,7 +1721,7 @@ dependencies = [
|
||||
name = "record-effector"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"fluence 0.2.3",
|
||||
"fluence",
|
||||
"test-record",
|
||||
]
|
||||
|
||||
@ -1769,7 +1729,7 @@ dependencies = [
|
||||
name = "record-pure"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"fluence 0.2.3",
|
||||
"fluence",
|
||||
"test-record",
|
||||
]
|
||||
|
||||
@ -2054,7 +2014,7 @@ name = "site-storage"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"fluence 0.2.2",
|
||||
"fluence",
|
||||
"log",
|
||||
]
|
||||
|
||||
@ -2198,7 +2158,7 @@ dependencies = [
|
||||
name = "test-record"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"fluence 0.2.2",
|
||||
"fluence",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -2633,7 +2593,7 @@ checksum = "1d649a3145108d7d3fbcde896a468d1bd636791823c9921135218ad89be08307"
|
||||
name = "wasm-greeting"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"fluence 0.2.3",
|
||||
"fluence",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -9,4 +9,4 @@ name = "test_record"
|
||||
path = "src/test_record.rs"
|
||||
|
||||
[dependencies]
|
||||
fluence = { git = "https://github.com/fluencelabs/rust-sdk", branch = "record_support" }
|
||||
fluence = { git = "https://github.com/fluencelabs/rust-sdk" }
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -9,6 +9,6 @@ name = "site-storage"
|
||||
path = "src/main.rs"
|
||||
|
||||
[dependencies]
|
||||
fluence = { git = "https://github.com/fluencelabs/rust-sdk", branch = "record_support", features = ["logger"] }
|
||||
fluence = { git = "https://github.com/fluencelabs/rust-sdk", features = ["logger"] }
|
||||
anyhow = "1.0.31"
|
||||
log = "0.4.8"
|
||||
|
@ -1,13 +1,13 @@
|
||||
[package]
|
||||
name = "fluence-app-service"
|
||||
description = "Fluence Application Service"
|
||||
version = "0.1.3"
|
||||
version = "0.1.4"
|
||||
authors = ["Fluence Labs"]
|
||||
license = "Apache-2.0"
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
fluence-faas = { path = "../fluence-faas", version = "0.1.3" }
|
||||
fluence-faas = { path = "../fluence-faas", version = "0.1.4" }
|
||||
|
||||
log = "0.4.8"
|
||||
serde_json = "1.0.53"
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "fluence-faas"
|
||||
description = "Fluence FaaS"
|
||||
version = "0.1.3"
|
||||
version = "0.1.4"
|
||||
authors = ["Fluence Labs"]
|
||||
license = "Apache-2.0"
|
||||
edition = "2018"
|
||||
|
@ -54,7 +54,7 @@ impl<'a> fmt::Display for FaaSInterface<'a> {
|
||||
writeln!(f, "{} {{", record_type.name)?;
|
||||
|
||||
for field in record_type.fields.iter() {
|
||||
writeln!(f, " {}: {:?}", field.name, type_text_view(&field.ty))?;
|
||||
writeln!(f, " {}: {}", field.name, type_text_view(&field.ty))?;
|
||||
}
|
||||
writeln!(f, "}}")?;
|
||||
}
|
||||
@ -64,7 +64,7 @@ impl<'a> fmt::Display for FaaSInterface<'a> {
|
||||
}
|
||||
|
||||
for (name, functions) in self.modules.iter() {
|
||||
writeln!(f, "{}:", *name)?;
|
||||
writeln!(f, "\n{}:", *name)?;
|
||||
|
||||
for (name, signature) in functions.iter() {
|
||||
write!(f, " pub fn {}(", name)?;
|
||||
@ -73,16 +73,14 @@ impl<'a> fmt::Display for FaaSInterface<'a> {
|
||||
write!(f, "{}: {}", arg.name, type_text_view(&arg.ty))?;
|
||||
}
|
||||
if signature.output_types.is_empty() {
|
||||
write!(f, ")")?;
|
||||
writeln!(f, ")")?;
|
||||
} else if signature.output_types.len() == 1 {
|
||||
write!(f, ") -> {}", type_text_view(&signature.output_types[0]))?;
|
||||
writeln!(f, ") -> {}", type_text_view(&signature.output_types[0]))?;
|
||||
} else {
|
||||
// At now, multi values aren't supported - only one output type is possible
|
||||
unimplemented!()
|
||||
}
|
||||
}
|
||||
|
||||
writeln!(f)?
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "frepl"
|
||||
description = "Fluence FCE REPL intended for testing purposes"
|
||||
version = "0.1.5"
|
||||
version = "0.1.7"
|
||||
authors = ["Fluence Labs"]
|
||||
repository = "https://github.com/fluencelabs/fce/tools/repl"
|
||||
license = "Apache-2.0"
|
||||
@ -12,7 +12,7 @@ name = "fce-repl"
|
||||
path = "src/main.rs"
|
||||
|
||||
[dependencies]
|
||||
fluence-app-service = { path = "../../fluence-app-service", version = "0.1.3", features = ["raw-module-api"] }
|
||||
fluence-app-service = { path = "../../fluence-app-service", version = "0.1.4", features = ["raw-module-api"] }
|
||||
|
||||
anyhow = "1.0.31"
|
||||
clap = "2.33.1"
|
||||
|
@ -142,7 +142,7 @@ impl REPL {
|
||||
}
|
||||
Some("interface") => {
|
||||
let interface = self.app_service.get_interface();
|
||||
println!("Application service interface:\n\n{}", interface);
|
||||
println!("Application service interface:\n{}", interface);
|
||||
}
|
||||
Some("h") | Some("help") | None => {
|
||||
println!(
|
||||
|
Loading…
Reference in New Issue
Block a user