return data instead of script; update binary

This commit is contained in:
vms 2020-09-22 16:27:33 +03:00
parent 871852d422
commit 0bba055ad5
7 changed files with 15 additions and 27 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
.idea/
/target
.DS_Store
.repl_history

View File

@ -1,4 +0,0 @@
#V2
interface
call aquamarine invoke ["asd", ["a", "b"]]
call aquamarine invoke ["asd", "a"]

19
Cargo.lock generated
View File

@ -16,26 +16,22 @@ checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
[[package]]
name = "fluence"
version = "0.2.4"
source = "git+https://github.com/fluencelabs/rust-sdk#75f4baaa905255b240d191880aeeed3e7ec1ad4f"
version = "0.2.6"
dependencies = [
"fluence-sdk-macro",
"fluence-sdk-main",
"safe-transmute",
]
[[package]]
name = "fluence-sdk-macro"
version = "0.2.4"
source = "git+https://github.com/fluencelabs/rust-sdk#75f4baaa905255b240d191880aeeed3e7ec1ad4f"
version = "0.2.6"
dependencies = [
"fluence-sdk-wit",
]
[[package]]
name = "fluence-sdk-main"
version = "0.2.4"
source = "git+https://github.com/fluencelabs/rust-sdk#75f4baaa905255b240d191880aeeed3e7ec1ad4f"
version = "0.2.6"
dependencies = [
"fluence-sdk-macro",
"log",
@ -44,8 +40,7 @@ dependencies = [
[[package]]
name = "fluence-sdk-wit"
version = "0.2.4"
source = "git+https://github.com/fluencelabs/rust-sdk#75f4baaa905255b240d191880aeeed3e7ec1ad4f"
version = "0.2.6"
dependencies = [
"proc-macro2",
"quote",
@ -158,12 +153,6 @@ version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e"
[[package]]
name = "safe-transmute"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "50b8b2cd387f744f69469aaed197954ba4c0ecdb31e02edf99b023e0df11178a"
[[package]]
name = "serde"
version = "1.0.116"

View File

@ -9,5 +9,5 @@ name = "aquamarine"
path = "src/main.rs"
[dependencies]
fluence = { git = "https://github.com/fluencelabs/rust-sdk", features = ["logger"] }
fluence = { path = "/Users/mike/dev/work/fluence/wasm/rust-sdk", features = ["logger"] }
log = "0.4.11"

BIN
artifacts/aquamarine.wasm Executable file → Normal file

Binary file not shown.

View File

@ -134,7 +134,6 @@ ITERATORS
*/
/*
Addressing:
@ -159,4 +158,4 @@ If !fn_srv_id && !pk_srv_id <- error
(call (current) (fn "resolve" "by_pk") [pk])
*/
*/

View File

@ -24,17 +24,20 @@ pub fn main() {
#[fce]
pub struct StepperOutcome {
pub aqua: String,
pub data: String,
pub next_peer_pks: Vec<String>,
}
#[fce]
pub fn invoke(init_user_id: String, aqua: String) -> StepperOutcome {
info!("stepper invoked with user_id = {}, aqua = {:?}", init_user_id, aqua);
pub fn invoke(init_user_id: String, aqua: String, data: String) -> StepperOutcome {
info!(
"stepper invoked with user_id = {}, aqua = {:?}, data = {:?}",
init_user_id, aqua, data
);
let outcome = StepperOutcome {
aqua,
next_peer_pks: vec![init_user_id]
data,
next_peer_pks: vec![init_user_id],
};
outcome