Skip to content

Commit

Permalink
change(env): split valor crate from cli binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
pandres95 committed Jun 20, 2023
1 parent 21bef74 commit 4ed84a9
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 25 deletions.
39 changes: 18 additions & 21 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,37 +1,34 @@
[workspace]
members = [
"bin/*",
"lib/*",
]

[workspace.package]
authors = [
"Daniel Olano <daniel@olanod.com>",
"Johan Alexis Duque Cadena <johan.duque@gmail.com>",
"Pablo Dorado <hola@pablodorado.com>",
]
license = "GPL-3.0-or-later"

[package]
name = "valor_core"
description = "Virto Async Light Open Runtime"
license = "GPL-3.0-or-later"
edition = "2021"
name = "valor"
repository = "https://github.com/virto-network/valor"
version = "0.6.0"
authors = ["Daniel Olano <daniel@olanod.com>", "Johan Alexis Duque Cadena <johan.duque@gmail.com>"]
edition = "2018"
repository = "https://github.com/valibre-org/valor"

[dependencies]
clap = { version = "4.1.8", features = ["derive"] }
embassy-executor = { version = "0.1.0", git = "https://github.com/embassy-rs/embassy", features = ["log", "std", "nightly", "integrated-timers"] }
embassy-time = { version = "0.1.0", git = "https://github.com/embassy-rs/embassy", features = ["log", "std", "nightly"] }
embedded-io = { version = "0.4.0", features = ["async", "std"] }
env_logger = "0.10.0"
log = "0.4.17"
wasm_runtime = { path = "./wasm" }

[features]

[workspace]
members = [
"wasm",
]

# ToDo: Talk about this with @Dani
# [profile.release.package.valor_web]
# opt-level = "s"

[profile.release]
lto = true
strip = true
opt-level = "s"
strip = true

[profile.dev]
opt-level = 0

18 changes: 18 additions & 0 deletions bin/valor-run/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[package]
description = "CLI tool for running valor modules"
edition = "2021"
name = "valor-run"
version = "0.6.0"

[dependencies]
valor = {path = "../..", version = "0.6.0"}
valor-runtime = {path = "../../lib/runtime", version = "0.6.0"}

clap = {version = "4.1.8", features = ["derive"]}
embassy-executor = {version = "0.1.0", features = ["log", "std", "nightly", "integrated-timers"]}
embassy-time = {version = "0.1.0", features = ["log", "std", "nightly"]}
embedded-io = {version = "0.4.0", features = ["async", "std"]}
env_logger = "0.10.0"
log = "0.4.17"

[features]
File renamed without changes.
2 changes: 1 addition & 1 deletion src/main.rs → bin/valor-run/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use log::{info, warn};

use std::io::stdin;
use std::thread;
use wasm_runtime::{Runtime, Wasm};
use valor_runtime::{Runtime, Wasm};

mod constants;
mod parsero;
Expand Down
File renamed without changes.
3 changes: 1 addition & 2 deletions src/plugin/mod.rs → bin/valor-run/src/plugin/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ impl Plugin {
pub fn new_map(paths: Vec<String>, all_active: bool) -> HashMap<String, Self> {
let mut map_plugins = HashMap::<String, Self>::new();
for path in paths {
let active = if all_active { true } else { false };
let plugin = self::Plugin::new(path.clone(), active);
let plugin = self::Plugin::new(path.clone(), all_active);
map_plugins.insert(path, plugin);
}
map_plugins
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pub fn on_message() {}

0 comments on commit 4ed84a9

Please sign in to comment.