From d36a8cbacc9d630672f0433dd0bd111f337f3662 Mon Sep 17 00:00:00 2001 From: Wei Tang Date: Tue, 15 May 2018 19:16:31 +0800 Subject: [PATCH] Move all executables to wasm-utils-tools crate --- Cargo.toml | 7 +---- ext/Cargo.toml | 17 ------------ gas/Cargo.toml | 17 ------------ logger/Cargo.toml | 16 ------------ prune/Cargo.toml | 18 ------------- stack_height/Cargo.toml | 17 ------------ {build => tools}/Cargo.toml | 26 ++++++++++++++++--- {build/src => tools/build}/main.rs | 2 +- {build/src => tools/build}/source.rs | 0 {ext/src => tools/ext}/main.rs | 2 +- {gas/src => tools/gas}/main.rs | 2 +- {prune/src => tools/prune}/main.rs | 2 +- {logger => tools}/src/lib.rs | 0 .../src => tools/stack_height}/main.rs | 2 +- 14 files changed, 29 insertions(+), 99 deletions(-) delete mode 100644 ext/Cargo.toml delete mode 100644 gas/Cargo.toml delete mode 100644 logger/Cargo.toml delete mode 100644 prune/Cargo.toml delete mode 100644 stack_height/Cargo.toml rename {build => tools}/Cargo.toml (62%) rename {build/src => tools/build}/main.rs (99%) rename {build/src => tools/build}/source.rs (100%) rename {ext/src => tools/ext}/main.rs (92%) rename {gas/src => tools/gas}/main.rs (93%) rename {prune/src => tools/prune}/main.rs (97%) rename {logger => tools}/src/lib.rs (100%) rename {stack_height/src => tools/stack_height}/main.rs (94%) diff --git a/Cargo.toml b/Cargo.toml index 074bbfd..21e8679 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,10 +23,5 @@ std = ["parity-wasm/std", "log/std", "byteorder/std"] [workspace] members = [ - "./logger", - "./build", - "./ext", - "./gas", - "./prune", - "./stack_height", + "./tools", ] diff --git a/ext/Cargo.toml b/ext/Cargo.toml deleted file mode 100644 index 13dd2c8..0000000 --- a/ext/Cargo.toml +++ /dev/null @@ -1,17 +0,0 @@ -[package] -name = "pwasm-utils-ext" -version = "0.1.5" -authors = ["Nikolay Volf ", "Sergey Pepyakin "] -license = "MIT/Apache-2.0" -readme = "README.md" -description = "Collection of command-line utilities and corresponding Rust api for producing pwasm-compatible executables" -keywords = ["wasm", "webassembly", "pwasm"] - -[[bin]] -name = "wasm-ext" -path = "src/main.rs" - -[dependencies] -parity-wasm = { git = "https://github.com/paritytech/parity-wasm" } -pwasm-utils = { path = ".." } -pwasm-utils-logger = { path = "../logger" } diff --git a/gas/Cargo.toml b/gas/Cargo.toml deleted file mode 100644 index b932958..0000000 --- a/gas/Cargo.toml +++ /dev/null @@ -1,17 +0,0 @@ -[package] -name = "pwasm-utils-gas" -version = "0.1.5" -authors = ["Nikolay Volf ", "Sergey Pepyakin "] -license = "MIT/Apache-2.0" -readme = "README.md" -description = "Collection of command-line utilities and corresponding Rust api for producing pwasm-compatible executables" -keywords = ["wasm", "webassembly", "pwasm"] - -[[bin]] -name = "wasm-gas" -path = "src/main.rs" - -[dependencies] -parity-wasm = { git = "https://github.com/paritytech/parity-wasm" } -pwasm-utils = { path = ".." } -pwasm-utils-logger = { path = "../logger" } diff --git a/logger/Cargo.toml b/logger/Cargo.toml deleted file mode 100644 index 20cbac4..0000000 --- a/logger/Cargo.toml +++ /dev/null @@ -1,16 +0,0 @@ -[package] -name = "pwasm-utils-logger" -version = "0.1.5" -authors = ["Nikolay Volf ", "Sergey Pepyakin "] -license = "MIT/Apache-2.0" -readme = "README.md" -description = "Collection of command-line utilities and corresponding Rust api for producing pwasm-compatible executables" -keywords = ["wasm", "webassembly", "pwasm"] - -[lib] -name = "logger" - -[dependencies] -log = "0.4" -env_logger = "0.5" -lazy_static = "1.0" diff --git a/prune/Cargo.toml b/prune/Cargo.toml deleted file mode 100644 index f3d451e..0000000 --- a/prune/Cargo.toml +++ /dev/null @@ -1,18 +0,0 @@ -[package] -name = "pwasm-utils-prune" -version = "0.1.5" -authors = ["Nikolay Volf ", "Sergey Pepyakin "] -license = "MIT/Apache-2.0" -readme = "README.md" -description = "Collection of command-line utilities and corresponding Rust api for producing pwasm-compatible executables" -keywords = ["wasm", "webassembly", "pwasm"] - -[[bin]] -name = "wasm-prune" -path = "src/main.rs" - -[dependencies] -parity-wasm = { git = "https://github.com/paritytech/parity-wasm" } -pwasm-utils = { path = ".." } -pwasm-utils-logger = { path = "../logger" } -clap = "2.24" diff --git a/stack_height/Cargo.toml b/stack_height/Cargo.toml deleted file mode 100644 index b1ec658..0000000 --- a/stack_height/Cargo.toml +++ /dev/null @@ -1,17 +0,0 @@ -[package] -name = "pwasm-utils-stack-height" -version = "0.1.5" -authors = ["Nikolay Volf ", "Sergey Pepyakin "] -license = "MIT/Apache-2.0" -readme = "README.md" -description = "Collection of command-line utilities and corresponding Rust api for producing pwasm-compatible executables" -keywords = ["wasm", "webassembly", "pwasm"] - -[[bin]] -name = "wasm-stack-height" -path = "src/main.rs" - -[dependencies] -parity-wasm = { git = "https://github.com/paritytech/parity-wasm" } -pwasm-utils = { path = ".." } -pwasm-utils-logger = { path = "../logger" } diff --git a/build/Cargo.toml b/tools/Cargo.toml similarity index 62% rename from build/Cargo.toml rename to tools/Cargo.toml index 70e2c85..6f8c7bb 100644 --- a/build/Cargo.toml +++ b/tools/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "pwasm-utils-build" +name = "pwasm-utils-tools" version = "0.1.5" authors = ["Nikolay Volf ", "Sergey Pepyakin "] license = "MIT/Apache-2.0" @@ -7,16 +7,36 @@ readme = "README.md" description = "Collection of command-line utilities and corresponding Rust api for producing pwasm-compatible executables" keywords = ["wasm", "webassembly", "pwasm"] +[lib] + +[[bin]] +name = "wasm-prune" +path = "prune/main.rs" + +[[bin]] +name = "wasm-ext" +path = "ext/main.rs" + +[[bin]] +name = "wasm-gas" +path = "gas/main.rs" + [[bin]] name = "wasm-build" -path = "src/main.rs" +path = "build/main.rs" + +[[bin]] +name = "wasm-stack-height" +path = "stack_height/main.rs" [dependencies] parity-wasm = { git = "https://github.com/paritytech/parity-wasm" } pwasm-utils = { path = ".." } -pwasm-utils-logger = { path = "../logger" } glob = "0.2" clap = "2.24" +log = "0.4" +env_logger = "0.5" +lazy_static = "1.0" [dev-dependencies] tempdir = "0.3" diff --git a/build/src/main.rs b/tools/build/main.rs similarity index 99% rename from build/src/main.rs rename to tools/build/main.rs index 29342bc..4a1461b 100644 --- a/build/src/main.rs +++ b/tools/build/main.rs @@ -4,7 +4,7 @@ extern crate glob; extern crate pwasm_utils as utils; extern crate clap; extern crate parity_wasm; -extern crate logger; +extern crate pwasm_utils_tools as logger; mod source; diff --git a/build/src/source.rs b/tools/build/source.rs similarity index 100% rename from build/src/source.rs rename to tools/build/source.rs diff --git a/ext/src/main.rs b/tools/ext/main.rs similarity index 92% rename from ext/src/main.rs rename to tools/ext/main.rs index 621162c..7aa9eb1 100644 --- a/ext/src/main.rs +++ b/tools/ext/main.rs @@ -1,6 +1,6 @@ extern crate parity_wasm; extern crate pwasm_utils as utils; -extern crate logger; +extern crate pwasm_utils_tools as logger; use std::env; diff --git a/gas/src/main.rs b/tools/gas/main.rs similarity index 93% rename from gas/src/main.rs rename to tools/gas/main.rs index 86f5f56..c19bba4 100644 --- a/gas/src/main.rs +++ b/tools/gas/main.rs @@ -1,6 +1,6 @@ extern crate parity_wasm; extern crate pwasm_utils as utils; -extern crate logger; +extern crate pwasm_utils_tools as logger; use std::env; diff --git a/prune/src/main.rs b/tools/prune/main.rs similarity index 97% rename from prune/src/main.rs rename to tools/prune/main.rs index f7e5dd9..550efb3 100644 --- a/prune/src/main.rs +++ b/tools/prune/main.rs @@ -1,6 +1,6 @@ extern crate parity_wasm; extern crate pwasm_utils as utils; -extern crate logger; +extern crate pwasm_utils_tools as logger; extern crate clap; use clap::{App, Arg}; diff --git a/logger/src/lib.rs b/tools/src/lib.rs similarity index 100% rename from logger/src/lib.rs rename to tools/src/lib.rs diff --git a/stack_height/src/main.rs b/tools/stack_height/main.rs similarity index 94% rename from stack_height/src/main.rs rename to tools/stack_height/main.rs index 762b2ba..3d3e100 100644 --- a/stack_height/src/main.rs +++ b/tools/stack_height/main.rs @@ -1,6 +1,6 @@ extern crate pwasm_utils as utils; extern crate parity_wasm; -extern crate logger; +extern crate pwasm_utils_tools as logger; use std::env; use utils::stack_height;