mirror of
https://github.com/fluencelabs/marine.git
synced 2024-12-04 19:50:19 +00:00
Fix value after table problem in TomlMarineNamedModuleConfig(#175)
This commit is contained in:
parent
cc1766b7f1
commit
7a80d3e5a1
10
Cargo.lock
generated
10
Cargo.lock
generated
@ -794,12 +794,12 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "fluence-app-service"
|
||||
version = "0.17.4"
|
||||
version = "0.17.5"
|
||||
dependencies = [
|
||||
"log",
|
||||
"maplit",
|
||||
"marine-min-it-version",
|
||||
"marine-runtime 0.17.1",
|
||||
"marine-runtime 0.17.2",
|
||||
"serde",
|
||||
"serde_derive",
|
||||
"serde_json",
|
||||
@ -1519,7 +1519,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "marine-core"
|
||||
version = "0.15.0"
|
||||
version = "0.15.1"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"boolinator",
|
||||
@ -1839,7 +1839,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "marine-runtime"
|
||||
version = "0.17.1"
|
||||
version = "0.17.2"
|
||||
dependencies = [
|
||||
"bytesize",
|
||||
"cmd_lib",
|
||||
@ -2034,7 +2034,7 @@ dependencies = [
|
||||
"check-latest",
|
||||
"clap",
|
||||
"env_logger 0.7.1",
|
||||
"fluence-app-service 0.17.4",
|
||||
"fluence-app-service 0.17.5",
|
||||
"itertools 0.9.0",
|
||||
"log",
|
||||
"marine-rs-sdk-main",
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "marine-core"
|
||||
description = "Core of Marine, the Fluence Wasm Runtime"
|
||||
version = "0.15.0"
|
||||
version = "0.15.1"
|
||||
authors = ["Fluence Labs"]
|
||||
license = "Apache-2.0"
|
||||
edition = "2018"
|
||||
|
@ -1,13 +1,13 @@
|
||||
[package]
|
||||
name = "fluence-app-service"
|
||||
description = "Fluence Application Service"
|
||||
version = "0.17.4"
|
||||
version = "0.17.5"
|
||||
authors = ["Fluence Labs"]
|
||||
license = "Apache-2.0"
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
marine-runtime = { path = "../../marine", version = "0.17.1" }
|
||||
marine-runtime = { path = "../../marine", version = "0.17.2" }
|
||||
marine-min-it-version = { path = "../../crates/min-it-version", version = "0.1.0" }
|
||||
|
||||
maplit = "1.0.2"
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "marine-runtime"
|
||||
description = "The Fluence Wasm Runtime"
|
||||
version = "0.17.1"
|
||||
version = "0.17.2"
|
||||
authors = ["Fluence Labs"]
|
||||
license = "Apache-2.0"
|
||||
edition = "2018"
|
||||
@ -11,7 +11,7 @@ name = "marine"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[dependencies]
|
||||
marine-core = { path = "../core", version = "0.15.0" }
|
||||
marine-core = { path = "../core", version = "0.15.1" }
|
||||
marine-module-interface = { path = "../crates/module-interface", version = "0.4.1" }
|
||||
marine-utils = { path = "../crates/utils", version = "0.4.0" }
|
||||
marine-rs-sdk-main = { version = "0.6.15", features = ["logger"] }
|
||||
|
@ -91,9 +91,9 @@ pub struct TomlMarineModuleConfig {
|
||||
#[serde(default)]
|
||||
pub max_heap_size: Option<bytesize::ByteSize>,
|
||||
pub logger_enabled: Option<bool>,
|
||||
pub logging_mask: Option<i32>,
|
||||
pub wasi: Option<TomlWASIConfig>,
|
||||
pub mounted_binaries: Option<toml::value::Table>,
|
||||
pub logging_mask: Option<i32>,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Serialize, Debug, Clone, Default)]
|
||||
@ -109,7 +109,13 @@ mod tests {
|
||||
use super::{TomlMarineNamedModuleConfig, TomlMarineModuleConfig, TomlWASIConfig};
|
||||
|
||||
#[test]
|
||||
fn serialize_named() {
|
||||
fn serialize_marine_named_module_config() {
|
||||
let mut mounted_binaries = toml::value::Table::new();
|
||||
mounted_binaries.insert(
|
||||
"curl".to_string(),
|
||||
toml::Value::String("/usr/local/bin/curl".to_string()),
|
||||
);
|
||||
|
||||
let config = TomlMarineNamedModuleConfig {
|
||||
name: "name".to_string(),
|
||||
file_name: Some("file_name".to_string()),
|
||||
@ -117,13 +123,13 @@ mod tests {
|
||||
mem_pages_count: Some(100),
|
||||
max_heap_size: Some(ByteSize::gib(4)),
|
||||
logger_enabled: Some(false),
|
||||
logging_mask: Some(1),
|
||||
wasi: Some(TomlWASIConfig {
|
||||
preopened_files: Some(vec!["a".to_string()]),
|
||||
envs: None,
|
||||
mapped_dirs: None,
|
||||
}),
|
||||
mounted_binaries: None,
|
||||
logging_mask: None,
|
||||
mounted_binaries: Some(mounted_binaries),
|
||||
},
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user