From c50dacff17742cd4f7ca5685b12d809825602a53 Mon Sep 17 00:00:00 2001 From: Marek Kotewicz Date: Mon, 19 Jun 2017 11:29:09 +0200 Subject: [PATCH] all executables are workspace members (#5865) * ethstore-cli and ethkey-cli are workspace projects * evmbin is now a workspace project --- Cargo.lock | 21 ++++++++++++++++--- Cargo.toml | 4 +--- ethcore/Cargo.toml | 2 -- ethkey/Cargo.toml | 10 --------- ethkey/cli/Cargo.toml | 14 +++++++++++++ ethkey/{src/bin/ethkey.rs => cli/src/main.rs} | 0 ethkey/src/bin/main.rs | 21 ------------------- ethstore/Cargo.toml | 9 -------- ethstore/cli/Cargo.toml | 14 +++++++++++++ .../{src/bin/ethstore.rs => cli/src/main.rs} | 0 ethstore/src/bin/main.rs | 21 ------------------- 11 files changed, 47 insertions(+), 69 deletions(-) create mode 100644 ethkey/cli/Cargo.toml rename ethkey/{src/bin/ethkey.rs => cli/src/main.rs} (100%) delete mode 100644 ethkey/src/bin/main.rs create mode 100644 ethstore/cli/Cargo.toml rename ethstore/{src/bin/ethstore.rs => cli/src/main.rs} (100%) delete mode 100644 ethstore/src/bin/main.rs diff --git a/Cargo.lock b/Cargo.lock index ace76b1f7..8647a52b8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -692,7 +692,6 @@ name = "ethkey" version = "0.2.0" dependencies = [ "byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "docopt 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "eth-secp256k1 0.5.6 (git+https://github.com/paritytech/rust-secp256k1)", "ethcore-bigint 0.1.3", "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -703,10 +702,18 @@ dependencies = [ ] [[package]] -name = "ethstore" +name = "ethkey-cli" version = "0.1.0" dependencies = [ "docopt 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ethkey 0.2.0", + "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "ethstore" +version = "0.1.0" +dependencies = [ "ethcore-bigint 0.1.3", "ethcrypto 0.1.0", "ethkey 0.2.0", @@ -727,6 +734,15 @@ dependencies = [ "tiny-keccak 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "ethstore-cli" +version = "0.1.0" +dependencies = [ + "docopt 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ethstore 0.1.0", + "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "ethsync" version = "1.7.0" @@ -1569,7 +1585,6 @@ dependencies = [ "ethcore-util 1.7.0", "ethkey 0.2.0", "ethsync 1.7.0", - "evmbin 0.1.0", "fdlimit 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", "isatty 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/Cargo.toml b/Cargo.toml index 497078c62..b1d8c6699 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,7 +40,6 @@ ethcore-light = { path = "ethcore/light" } ethcore-logger = { path = "logger" } ethcore-stratum = { path = "stratum" } ethkey = { path = "ethkey" } -evmbin = { path = "evmbin" } rlp = { path = "util/rlp" } rpc-cli = { path = "rpc_cli" } parity-hash-fetch = { path = "hash-fetch" } @@ -86,8 +85,6 @@ jit = ["ethcore/jit"] dev = ["clippy", "ethcore/dev", "ethcore-util/dev", "ethsync/dev", "parity-rpc/dev", "parity-dapps/dev"] json-tests = ["ethcore/json-tests"] test-heavy = ["ethcore/test-heavy"] -ethkey-cli = ["ethcore/ethkey-cli"] -ethstore-cli = ["ethcore/ethstore-cli"] evm-debug = ["ethcore/evm-debug"] evm-debug-tests = ["ethcore/evm-debug-tests"] slow-blocks = ["ethcore/slow-blocks"] @@ -104,3 +101,4 @@ lto = false panic = "abort" [workspace] +members = ["ethstore/cli", "ethkey/cli", "evmbin"] diff --git a/ethcore/Cargo.toml b/ethcore/Cargo.toml index b207ae2b3..168cf803c 100644 --- a/ethcore/Cargo.toml +++ b/ethcore/Cargo.toml @@ -66,5 +66,3 @@ dev = ["clippy"] default = [] benches = [] ipc = [] -ethkey-cli = ["ethkey/cli"] -ethstore-cli = ["ethstore/cli"] diff --git a/ethkey/Cargo.toml b/ethkey/Cargo.toml index e99e1cbe7..7d038a7f7 100644 --- a/ethkey/Cargo.toml +++ b/ethkey/Cargo.toml @@ -9,16 +9,6 @@ lazy_static = "0.2" tiny-keccak = "1.2" eth-secp256k1 = { git = "https://github.com/paritytech/rust-secp256k1" } rustc-serialize = "0.3" -docopt = { version = "0.7", optional = true } ethcore-bigint = { path = "../util/bigint" } rust-crypto = "0.2" byteorder = "1.0" - -[features] -default = [] -cli = ["docopt"] - -[[bin]] -name = "ethkey" -path = "src/bin/main.rs" -doc = false diff --git a/ethkey/cli/Cargo.toml b/ethkey/cli/Cargo.toml new file mode 100644 index 000000000..01cc9849f --- /dev/null +++ b/ethkey/cli/Cargo.toml @@ -0,0 +1,14 @@ +[package] +name = "ethkey-cli" +version = "0.1.0" +authors = ["Parity Technologies "] + +[dependencies] +ethkey = { path = "../" } +rustc-serialize = "0.3" +docopt = "0.7" + +[[bin]] +name = "ethkey" +path = "src/main.rs" +doc = false diff --git a/ethkey/src/bin/ethkey.rs b/ethkey/cli/src/main.rs similarity index 100% rename from ethkey/src/bin/ethkey.rs rename to ethkey/cli/src/main.rs diff --git a/ethkey/src/bin/main.rs b/ethkey/src/bin/main.rs deleted file mode 100644 index 14dfa34ff..000000000 --- a/ethkey/src/bin/main.rs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. -// This file is part of Parity. - -// Parity is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Parity is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Parity. If not, see . - -#[cfg(feature = "cli")] -include!("ethkey.rs"); - -#[cfg(not(feature = "cli"))] -fn main() {} diff --git a/ethstore/Cargo.toml b/ethstore/Cargo.toml index 4c6ece5f5..a2efaf286 100755 --- a/ethstore/Cargo.toml +++ b/ethstore/Cargo.toml @@ -14,7 +14,6 @@ serde_derive = "0.9" rustc-serialize = "0.3" rust-crypto = "0.2.36" tiny-keccak = "1.0" -docopt = { version = "0.7", optional = true } time = "0.1.34" itertools = "0.5" parking_lot = "0.4" @@ -24,12 +23,4 @@ smallvec = "0.4" parity-wordlist = "1.0" tempdir = "0.3" -[features] -cli = ["docopt"] - [lib] - -[[bin]] -name = "ethstore" -path = "src/bin/main.rs" -doc = false diff --git a/ethstore/cli/Cargo.toml b/ethstore/cli/Cargo.toml new file mode 100644 index 000000000..28e210cec --- /dev/null +++ b/ethstore/cli/Cargo.toml @@ -0,0 +1,14 @@ +[package] +name = "ethstore-cli" +version = "0.1.0" +authors = ["Parity Technologies "] + +[dependencies] +rustc-serialize = "0.3" +docopt = "0.7" +ethstore = { path = "../" } + +[[bin]] +name = "ethstore" +path = "src/main.rs" +doc = false diff --git a/ethstore/src/bin/ethstore.rs b/ethstore/cli/src/main.rs similarity index 100% rename from ethstore/src/bin/ethstore.rs rename to ethstore/cli/src/main.rs diff --git a/ethstore/src/bin/main.rs b/ethstore/src/bin/main.rs deleted file mode 100644 index a0c9441f4..000000000 --- a/ethstore/src/bin/main.rs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. -// This file is part of Parity. - -// Parity is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Parity is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Parity. If not, see . - -#[cfg(feature = "cli")] -include!("ethstore.rs"); - -#[cfg(not(feature = "cli"))] -fn main() {}