move to the newest interpreter interface crate version

This commit is contained in:
vms 2021-02-17 23:01:04 +03:00
parent cdfed97fce
commit 47f0b31f3f
4 changed files with 51 additions and 71 deletions

108
Cargo.lock generated
View File

@ -40,16 +40,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "afddf7f520a80dbf76e6f50a35bca42a2331ef227a28b3b6dc5c2e2338d114b1"
[[package]]
name = "aquamarine-vm"
version = "0.2.0"
name = "aqua-interpreter-interface"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f4c49b8a5fe1336a9c6981be09cb13706c7d9083e48588d692120b5080a13278"
dependencies = [
"fluence 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)",
"fluence-it-types",
"serde",
]
[[package]]
name = "aquamarine-vm"
version = "0.3.0"
dependencies = [
"aqua-interpreter-interface",
"fluence-faas",
"log",
"maplit",
"parking_lot 0.11.1",
"serde",
"serde_json",
"stepper-interface",
]
[[package]]
@ -1158,9 +1169,9 @@ dependencies = [
[[package]]
name = "hyper"
version = "0.13.9"
version = "0.13.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f6ad767baac13b44d4529fcf58ba2cd0995e36e7b435bc5b039de6f47e880dbf"
checksum = "8a6f157065790a3ed2f88679250419b5cdd96e714a0d65f7797fd337186e96bb"
dependencies = [
"bytes 0.5.6",
"futures-channel",
@ -1172,7 +1183,7 @@ dependencies = [
"httparse",
"httpdate",
"itoa",
"pin-project 1.0.5",
"pin-project",
"socket2",
"tokio",
"tower-service",
@ -1207,9 +1218,9 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
[[package]]
name = "idna"
version = "0.2.0"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9"
checksum = "de910d521f7cc3135c4de8db1cb910e0b5ed1dc6f57c381cd07e8e661ce10094"
dependencies = [
"matches",
"unicode-bidi",
@ -1351,22 +1362,22 @@ checksum = "3576a87f2ba00f6f106fdfcd16db1d698d648a26ad8e0573cad8537c3c362d2a"
[[package]]
name = "lexical-core"
version = "0.7.4"
version = "0.7.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "db65c6da02e61f55dae90a0ae427b2a5f6b3e8db09f58d10efab23af92592616"
checksum = "21f866863575d0e1d654fbeeabdc927292fdf862873dc3c96c6f753357e13374"
dependencies = [
"arrayvec",
"bitflags",
"cfg-if 0.1.10",
"cfg-if 1.0.0",
"ryu",
"static_assertions",
]
[[package]]
name = "libc"
version = "0.2.85"
version = "0.2.86"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7ccac4b00700875e6a07c6cde370d44d32fa01c5a65cdd2fca6858c479d28bb3"
checksum = "b7282d924be3275cec7f6756ff4121987bc6481325397dde6ba3e7802b1a8b1c"
[[package]]
name = "local_storage"
@ -1707,7 +1718,7 @@ checksum = "6d7744ac029df22dca6284efe4e898991d28e3085c706c972bcd7da4a27a15eb"
dependencies = [
"instant",
"lock_api 0.4.2",
"parking_lot_core 0.8.2",
"parking_lot_core 0.8.3",
]
[[package]]
@ -1726,14 +1737,14 @@ dependencies = [
[[package]]
name = "parking_lot_core"
version = "0.8.2"
version = "0.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9ccb628cad4f84851442432c60ad8e1f607e29752d0bf072cbd0baf28aa34272"
checksum = "fa7a782938e745763fe6907fc6ba86946d72f49fe7e21de074e08128a99fb018"
dependencies = [
"cfg-if 1.0.0",
"instant",
"libc",
"redox_syscall 0.1.57",
"redox_syscall 0.2.5",
"smallvec",
"winapi 0.3.9",
]
@ -1744,33 +1755,13 @@ version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e"
[[package]]
name = "pin-project"
version = "0.4.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2ffbc8e94b38ea3d2d8ba92aea2983b503cd75d0888d75b86bb37970b5698e15"
dependencies = [
"pin-project-internal 0.4.27",
]
[[package]]
name = "pin-project"
version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "96fa8ebb90271c4477f144354485b8068bd8f6b78b428b01ba892ca26caf0b63"
dependencies = [
"pin-project-internal 1.0.5",
]
[[package]]
name = "pin-project-internal"
version = "0.4.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "65ad2ae56b6abe3a1ee25f15ee605bacadb9a764edaba9c2bf4103800d4a1895"
dependencies = [
"proc-macro2",
"quote",
"syn",
"pin-project-internal",
]
[[package]]
@ -1854,9 +1845,9 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0"
[[package]]
name = "quote"
version = "1.0.8"
version = "1.0.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "991431c3519a3f36861882da93630ce66b52918dcf1b8e2fd66b397fc96f28df"
checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7"
dependencies = [
"proc-macro2",
]
@ -1885,9 +1876,9 @@ dependencies = [
[[package]]
name = "rand_core"
version = "0.6.1"
version = "0.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c026d7df8b298d90ccbbc5190bd04d85e159eaf5576caeacf8741da93ccbd2e5"
checksum = "34cf66eb183df1c5876e2dcf6b13d57340741e8dc255b48e40a26de954d06ae7"
dependencies = [
"getrandom 0.2.2",
]
@ -1961,9 +1952,9 @@ checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce"
[[package]]
name = "redox_syscall"
version = "0.2.4"
version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "05ec8ca9416c5ea37062b502703cd7fcb207736bc294f6e0cf367ac6fc234570"
checksum = "94341e4e44e24f6b591b59e47a8a027df12e008d73fd5672dbea9cc22f4507d9"
dependencies = [
"bitflags",
]
@ -1986,7 +1977,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64"
dependencies = [
"getrandom 0.2.2",
"redox_syscall 0.2.4",
"redox_syscall 0.2.5",
]
[[package]]
@ -2221,9 +2212,9 @@ dependencies = [
[[package]]
name = "serde_json"
version = "1.0.61"
version = "1.0.62"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4fceb2595057b6891a4ee808f70054bd2d12f0e97f1cbb78689b59f676df325a"
checksum = "ea1c6153794552ea7cf7cf63b1231a25de00ec90db326ba6264440fa08e31486"
dependencies = [
"itoa",
"ryu",
@ -2302,17 +2293,6 @@ version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
[[package]]
name = "stepper-interface"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "95bde63566205ba83b6f55a61a1481a6c2a94fbac9d22d280f68232aab326d27"
dependencies = [
"fluence 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)",
"fluence-it-types",
"serde",
]
[[package]]
name = "strsim"
version = "0.8.0"
@ -2369,7 +2349,7 @@ dependencies = [
"cfg-if 1.0.0",
"libc",
"rand",
"redox_syscall 0.2.4",
"redox_syscall 0.2.5",
"remove_dir_all",
"winapi 0.3.9",
]
@ -2564,11 +2544,11 @@ dependencies = [
[[package]]
name = "tracing-futures"
version = "0.2.4"
version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ab7bb6f14721aa00656086e9335d363c5c8747bae02ebe32ea2c7dece5689b4c"
checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2"
dependencies = [
"pin-project 0.4.27",
"pin-project",
"tracing",
]
@ -2642,9 +2622,9 @@ dependencies = [
[[package]]
name = "unicode-normalization"
version = "0.1.16"
version = "0.1.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a13e63ab62dbe32aeee58d1c5408d35c36c392bba5d9d3142287219721afe606"
checksum = "07fbfce1c8a97d547e8b5334978438d9d6ec8c20e38f56d4a4374d181493eaef"
dependencies = [
"tinyvec",
]

View File

@ -1,7 +1,7 @@
[package]
name = "aquamarine-vm"
description = "Fluence Aquamarine VM"
version = "0.2.0"
version = "0.3.0"
authors = ["Fluence Labs"]
edition = "2018"
license = "Apache-2.0"
@ -12,7 +12,7 @@ path = "src/lib.rs"
[dependencies]
fluence-faas = { path = "../fluence-faas", version = "0.2.0" }
stepper-interface = "0.1.2"
aqua-interpreter-interface = "0.3.1"
maplit = "1.0.2"
serde_json = "1.0.60"

View File

@ -22,7 +22,7 @@ use fluence_faas::{FaaSConfig, HostExportedFunc, ModuleDescriptor};
use fluence_faas::FluenceFaaS;
use fluence_faas::HostImportDescriptor;
use fluence_faas::IValue;
use stepper_interface::StepperOutcome;
use crate::InterpreterOutcome;
use std::path::PathBuf;
use std::ops::{Deref, DerefMut};
@ -105,7 +105,7 @@ impl AquamarineVM {
aqua: impl Into<String>,
data: impl Into<Vec<u8>>,
particle_id: impl Into<String>,
) -> Result<StepperOutcome> {
) -> Result<InterpreterOutcome> {
use AquamarineVMError::PersistDataError;
let particle_id = particle_id.into();
@ -126,7 +126,7 @@ impl AquamarineVM {
self.faas
.call_with_ivalues(&self.wasm_filename, "invoke", &args, <_>::default())?;
let outcome = StepperOutcome::from_ivalues(result)
let outcome = InterpreterOutcome::from_ivalues(result)
.map_err(AquamarineVMError::StepperResultDeError)?;
// persist resulted data

View File

@ -43,7 +43,7 @@ pub use fluence_faas::IType;
pub use fluence_faas::ne_vec;
pub use fluence_faas::Ctx;
pub use stepper_interface::StepperOutcome;
pub use stepper_interface::STEPPER_SUCCESS;
pub use aqua_interpreter_interface::InterpreterOutcome;
pub use aqua_interpreter_interface::INTERPRETER_SUCCESS;
pub(crate) type Result<T> = std::result::Result<T, AquamarineVMError>;