Removing submodule in favour of rust crate (#2756)
* Removing submodule * Fixing UI dependency structure. * Merging RS and JS package * Updating release script to push also rs files * fix merge gone wrong * Fixing compilation
This commit is contained in:
parent
20591e882e
commit
aca82fb84b
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -2,6 +2,3 @@
|
|||||||
path = ethcore/res/ethereum/tests
|
path = ethcore/res/ethereum/tests
|
||||||
url = https://github.com/ethereum/tests.git
|
url = https://github.com/ethereum/tests.git
|
||||||
branch = develop
|
branch = develop
|
||||||
[submodule "js/build"]
|
|
||||||
path = js/build
|
|
||||||
url = https://github.com/ethcore/js-precompiled
|
|
||||||
|
26
Cargo.lock
generated
26
Cargo.lock
generated
@ -341,7 +341,7 @@ dependencies = [
|
|||||||
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"mime 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"mime 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"mime_guess 1.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"mime_guess 1.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-dapps-glue 1.4.0",
|
"parity-dapps-glue 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-ui 1.4.0",
|
"parity-ui 1.4.0",
|
||||||
"rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@ -508,7 +508,7 @@ dependencies = [
|
|||||||
"ethcore-util 1.4.0",
|
"ethcore-util 1.4.0",
|
||||||
"jsonrpc-core 3.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"jsonrpc-core 3.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-dapps-glue 1.4.0",
|
"parity-dapps-glue 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"parity-ui 1.4.0",
|
"parity-ui 1.4.0",
|
||||||
"rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rustc_version 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rustc_version 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@ -1177,6 +1177,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "parity-dapps-glue"
|
name = "parity-dapps-glue"
|
||||||
version = "1.4.0"
|
version = "1.4.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"aster 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"aster 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
"glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@ -1191,7 +1192,24 @@ dependencies = [
|
|||||||
name = "parity-ui"
|
name = "parity-ui"
|
||||||
version = "1.4.0"
|
version = "1.4.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"parity-dapps-glue 1.4.0",
|
"parity-ui-dev 1.4.0",
|
||||||
|
"parity-ui-precompiled 1.4.0 (git+https://github.com/ethcore/js-precompiled.git)",
|
||||||
|
"rustc_version 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "parity-ui-dev"
|
||||||
|
version = "1.4.0"
|
||||||
|
dependencies = [
|
||||||
|
"parity-dapps-glue 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "parity-ui-precompiled"
|
||||||
|
version = "1.4.0"
|
||||||
|
source = "git+https://github.com/ethcore/js-precompiled.git#eba8fdcb29c2230868b6604dd341513b5beceba9"
|
||||||
|
dependencies = [
|
||||||
|
"parity-dapps-glue 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -1993,6 +2011,8 @@ dependencies = [
|
|||||||
"checksum number_prefix 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "084d05f4bf60621a9ac9bde941a410df548f4de9545f06e5ee9d3aef4b97cd77"
|
"checksum number_prefix 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "084d05f4bf60621a9ac9bde941a410df548f4de9545f06e5ee9d3aef4b97cd77"
|
||||||
"checksum odds 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)" = "b28c06e81b0f789122d415d6394b5fe849bde8067469f4c2980d3cdc10c78ec1"
|
"checksum odds 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)" = "b28c06e81b0f789122d415d6394b5fe849bde8067469f4c2980d3cdc10c78ec1"
|
||||||
"checksum owning_ref 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8d91377085359426407a287ab16884a0111ba473aa6844ff01d4ec20ce3d75e7"
|
"checksum owning_ref 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8d91377085359426407a287ab16884a0111ba473aa6844ff01d4ec20ce3d75e7"
|
||||||
|
"checksum parity-dapps-glue 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "98378dec0a185da2b7180308752f0bad73aaa949c3e0a3b0528d0e067945f7ab"
|
||||||
|
"checksum parity-ui-precompiled 1.4.0 (git+https://github.com/ethcore/js-precompiled.git)" = "<none>"
|
||||||
"checksum parking_lot 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "968f685642555d2f7e202c48b8b11de80569e9bfea817f7f12d7c61aac62d4e6"
|
"checksum parking_lot 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "968f685642555d2f7e202c48b8b11de80569e9bfea817f7f12d7c61aac62d4e6"
|
||||||
"checksum parking_lot 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "dbc5847584161f273e69edc63c1a86254a22f570a0b5dd87aa6f9773f6f7d125"
|
"checksum parking_lot 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "dbc5847584161f273e69edc63c1a86254a22f570a0b5dd87aa6f9773f6f7d125"
|
||||||
"checksum parking_lot_core 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fb1b97670a2ffadce7c397fb80a3d687c4f3060140b885621ef1653d0e5d5068"
|
"checksum parking_lot_core 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fb1b97670a2ffadce7c397fb80a3d687c4f3060140b885621ef1653d0e5d5068"
|
||||||
|
29
Cargo.toml
29
Cargo.toml
@ -26,7 +26,11 @@ lazy_static = "0.2"
|
|||||||
regex = "0.1"
|
regex = "0.1"
|
||||||
isatty = "0.1"
|
isatty = "0.1"
|
||||||
toml = "0.2"
|
toml = "0.2"
|
||||||
|
serde = "0.8.0"
|
||||||
|
serde_json = "0.8.0"
|
||||||
|
hyper = { version = "0.9", default-features = false }
|
||||||
ctrlc = { git = "https://github.com/ethcore/rust-ctrlc.git" }
|
ctrlc = { git = "https://github.com/ethcore/rust-ctrlc.git" }
|
||||||
|
json-ipc-server = { git = "https://github.com/ethcore/json-ipc-server.git" }
|
||||||
fdlimit = { path = "util/fdlimit" }
|
fdlimit = { path = "util/fdlimit" }
|
||||||
ethcore = { path = "ethcore" }
|
ethcore = { path = "ethcore" }
|
||||||
ethcore-util = { path = "util" }
|
ethcore-util = { path = "util" }
|
||||||
@ -40,12 +44,9 @@ ethcore-ipc = { path = "ipc/rpc" }
|
|||||||
ethcore-ipc-hypervisor = { path = "ipc/hypervisor" }
|
ethcore-ipc-hypervisor = { path = "ipc/hypervisor" }
|
||||||
ethcore-logger = { path = "logger" }
|
ethcore-logger = { path = "logger" }
|
||||||
rlp = { path = "util/rlp" }
|
rlp = { path = "util/rlp" }
|
||||||
json-ipc-server = { git = "https://github.com/ethcore/json-ipc-server.git" }
|
ethcore-stratum = { path = "stratum" }
|
||||||
ethcore-dapps = { path = "dapps", optional = true }
|
ethcore-dapps = { path = "dapps", optional = true }
|
||||||
clippy = { version = "0.0.90", optional = true}
|
clippy = { version = "0.0.90", optional = true}
|
||||||
ethcore-stratum = { path = "stratum" }
|
|
||||||
serde = "0.8.0"
|
|
||||||
serde_json = "0.8.0"
|
|
||||||
|
|
||||||
[target.'cfg(windows)'.dependencies]
|
[target.'cfg(windows)'.dependencies]
|
||||||
winapi = "0.2"
|
winapi = "0.2"
|
||||||
@ -53,14 +54,20 @@ winapi = "0.2"
|
|||||||
[target.'cfg(not(windows))'.dependencies]
|
[target.'cfg(not(windows))'.dependencies]
|
||||||
daemonize = "0.2"
|
daemonize = "0.2"
|
||||||
|
|
||||||
[dependencies.hyper]
|
|
||||||
version = "0.9"
|
|
||||||
default-features = false
|
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["ui", "use-precompiled-js"]
|
default = ["ui-precompiled"]
|
||||||
ui = ["dapps", "ethcore-signer/ui"]
|
|
||||||
use-precompiled-js = ["ethcore-dapps/use-precompiled-js", "ethcore-signer/use-precompiled-js"]
|
ui = [
|
||||||
|
"dapps",
|
||||||
|
"ethcore-dapps/ui",
|
||||||
|
"ethcore-signer/ui",
|
||||||
|
]
|
||||||
|
ui-precompiled = [
|
||||||
|
"dapps",
|
||||||
|
"ethcore-signer/ui-precompiled",
|
||||||
|
"ethcore-dapps/ui-precompiled",
|
||||||
|
]
|
||||||
|
|
||||||
dapps = ["ethcore-dapps"]
|
dapps = ["ethcore-dapps"]
|
||||||
ipc = ["ethcore/ipc", "ethsync/ipc"]
|
ipc = ["ethcore/ipc", "ethsync/ipc"]
|
||||||
jit = ["ethcore/jit"]
|
jit = ["ethcore/jit"]
|
||||||
|
@ -20,17 +20,17 @@ url = "1.0"
|
|||||||
rustc-serialize = "0.3"
|
rustc-serialize = "0.3"
|
||||||
serde = "0.8"
|
serde = "0.8"
|
||||||
serde_json = "0.8"
|
serde_json = "0.8"
|
||||||
serde_macros = { version = "0.8", optional = true }
|
|
||||||
zip = { version = "0.1", default-features = false }
|
|
||||||
ethabi = "0.2.2"
|
ethabi = "0.2.2"
|
||||||
linked-hash-map = "0.3"
|
linked-hash-map = "0.3"
|
||||||
|
parity-dapps-glue = "1.4"
|
||||||
mime = "0.2"
|
mime = "0.2"
|
||||||
|
serde_macros = { version = "0.8", optional = true }
|
||||||
|
zip = { version = "0.1", default-features = false }
|
||||||
ethcore-devtools = { path = "../devtools" }
|
ethcore-devtools = { path = "../devtools" }
|
||||||
ethcore-rpc = { path = "../rpc" }
|
ethcore-rpc = { path = "../rpc" }
|
||||||
ethcore-util = { path = "../util" }
|
ethcore-util = { path = "../util" }
|
||||||
fetch = { path = "../util/fetch" }
|
fetch = { path = "../util/fetch" }
|
||||||
parity-ui = { path = "./ui" }
|
parity-ui = { path = "./ui" }
|
||||||
parity-dapps-glue = { path = "./js-glue" }
|
|
||||||
|
|
||||||
mime_guess = { version = "1.6.1" }
|
mime_guess = { version = "1.6.1" }
|
||||||
clippy = { version = "0.0.90", optional = true}
|
clippy = { version = "0.0.90", optional = true}
|
||||||
@ -43,4 +43,5 @@ default = ["serde_codegen"]
|
|||||||
nightly = ["serde_macros"]
|
nightly = ["serde_macros"]
|
||||||
dev = ["clippy", "ethcore-rpc/dev", "ethcore-util/dev"]
|
dev = ["clippy", "ethcore-rpc/dev", "ethcore-util/dev"]
|
||||||
|
|
||||||
use-precompiled-js = ["parity-ui/use-precompiled-js"]
|
ui = ["parity-ui/no-precompiled-js"]
|
||||||
|
ui-precompiled = ["parity-ui/use-precompiled-js"]
|
||||||
|
@ -53,11 +53,11 @@ fn die<T : fmt::Debug>(s: &'static str, e: T) -> ! {
|
|||||||
pub fn test(_path: &str) {
|
pub fn test(_path: &str) {
|
||||||
}
|
}
|
||||||
#[cfg(feature = "use-precompiled-js")]
|
#[cfg(feature = "use-precompiled-js")]
|
||||||
pub fn build(_path: &str) {
|
pub fn build(_path: &str, _dest: &str) {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(feature = "use-precompiled-js"))]
|
#[cfg(not(feature = "use-precompiled-js"))]
|
||||||
pub fn build(path: &str) {
|
pub fn build(path: &str, dest: &str) {
|
||||||
let child = platform::handle_fd(&mut Command::new(platform::NPM_CMD))
|
let child = platform::handle_fd(&mut Command::new(platform::NPM_CMD))
|
||||||
.arg("install")
|
.arg("install")
|
||||||
.arg("--no-progress")
|
.arg("--no-progress")
|
||||||
@ -70,7 +70,7 @@ pub fn build(path: &str) {
|
|||||||
.arg("run")
|
.arg("run")
|
||||||
.arg("build")
|
.arg("build")
|
||||||
.env("NODE_ENV", "production")
|
.env("NODE_ENV", "production")
|
||||||
.env("BUILD_DEST", "build")
|
.env("BUILD_DEST", dest)
|
||||||
.current_dir(path)
|
.current_dir(path)
|
||||||
.status()
|
.status()
|
||||||
.unwrap_or_else(|e| die("Building JS code", e));
|
.unwrap_or_else(|e| die("Building JS code", e));
|
||||||
|
@ -1,19 +1,18 @@
|
|||||||
[package]
|
[package]
|
||||||
description = "Parity built-in dapps."
|
description = "Ethcore Parity UI"
|
||||||
|
homepage = "http://ethcore.io"
|
||||||
|
license = "GPL-3.0"
|
||||||
name = "parity-ui"
|
name = "parity-ui"
|
||||||
version = "1.4.0"
|
version = "1.4.0"
|
||||||
license = "GPL-3.0"
|
|
||||||
authors = ["Ethcore <admin@ethcore.io>"]
|
authors = ["Ethcore <admin@ethcore.io>"]
|
||||||
build = "build.rs"
|
|
||||||
|
|
||||||
[features]
|
|
||||||
default = ["with-syntex"]
|
|
||||||
use-precompiled-js = ["parity-dapps-glue/use-precompiled-js"]
|
|
||||||
with-syntex = ["parity-dapps-glue/with-syntex"]
|
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
parity-dapps-glue = { path = "../js-glue" }
|
rustc_version = "0.1"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
parity-dapps-glue = { path = "../js-glue" }
|
parity-ui-dev = { path = "../../js", optional = true }
|
||||||
|
parity-ui-precompiled = { git = "https://github.com/ethcore/js-precompiled.git", optional = true }
|
||||||
|
|
||||||
|
[features]
|
||||||
|
no-precompiled-js = ["parity-ui-dev"]
|
||||||
|
use-precompiled-js = ["parity-ui-precompiled"]
|
||||||
|
@ -14,9 +14,20 @@
|
|||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
#[cfg(feature = "with-syntex")]
|
|
||||||
include!(concat!(env!("OUT_DIR"), "/lib.rs"));
|
|
||||||
|
|
||||||
#[cfg(not(feature = "with-syntex"))]
|
#[cfg(feature = "parity-ui-dev")]
|
||||||
include!("lib.rs.in");
|
mod inner {
|
||||||
|
extern crate parity_ui_dev;
|
||||||
|
|
||||||
|
pub use self::parity_ui_dev::*;
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "parity-ui-precompiled")]
|
||||||
|
mod inner {
|
||||||
|
extern crate parity_ui_precompiled;
|
||||||
|
|
||||||
|
pub use self::parity_ui_precompiled::*;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
pub use self::inner::*;
|
||||||
|
1
js/.gitignore
vendored
1
js/.gitignore
vendored
@ -1,5 +1,6 @@
|
|||||||
node_modules
|
node_modules
|
||||||
npm-debug.log
|
npm-debug.log
|
||||||
|
build
|
||||||
.build
|
.build
|
||||||
.coverage
|
.coverage
|
||||||
.happypack
|
.happypack
|
||||||
|
19
js/Cargo.precompiled.toml
Normal file
19
js/Cargo.precompiled.toml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
[package]
|
||||||
|
description = "Parity built-in dapps."
|
||||||
|
name = "parity-ui-precompiled"
|
||||||
|
version = "1.4.0"
|
||||||
|
license = "GPL-3.0"
|
||||||
|
authors = ["Ethcore <admin@ethcore.io>"]
|
||||||
|
build = "build.rs"
|
||||||
|
|
||||||
|
[features]
|
||||||
|
default = ["with-syntex"]
|
||||||
|
use-precompiled-js = ["parity-dapps-glue/use-precompiled-js"]
|
||||||
|
with-syntex = ["parity-dapps-glue/with-syntex"]
|
||||||
|
|
||||||
|
[build-dependencies]
|
||||||
|
parity-dapps-glue = "1.4"
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
parity-dapps-glue = "1.4"
|
||||||
|
|
18
js/Cargo.toml
Normal file
18
js/Cargo.toml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
[package]
|
||||||
|
description = "Parity built-in dapps."
|
||||||
|
name = "parity-ui-dev"
|
||||||
|
version = "1.4.0"
|
||||||
|
license = "GPL-3.0"
|
||||||
|
authors = ["Ethcore <admin@ethcore.io>"]
|
||||||
|
build = "build.rs"
|
||||||
|
|
||||||
|
[features]
|
||||||
|
default = ["with-syntex"]
|
||||||
|
with-syntex = ["parity-dapps-glue/with-syntex"]
|
||||||
|
|
||||||
|
[build-dependencies]
|
||||||
|
parity-dapps-glue = "1.4"
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
parity-dapps-glue = "1.4"
|
||||||
|
|
1
js/build
1
js/build
@ -1 +0,0 @@
|
|||||||
Subproject commit f94a8eddb8789410dda0db03d4f1d6ae42b31208
|
|
@ -17,6 +17,6 @@
|
|||||||
extern crate parity_dapps_glue;
|
extern crate parity_dapps_glue;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
parity_dapps_glue::js::build(concat!(env!("CARGO_MANIFEST_DIR"), "/../../js"));
|
parity_dapps_glue::js::build(env!("CARGO_MANIFEST_DIR"), "build");
|
||||||
parity_dapps_glue::generate();
|
parity_dapps_glue::generate();
|
||||||
}
|
}
|
@ -1,4 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
# change into the build directory
|
# change into the build directory
|
||||||
pushd `dirname $0`
|
pushd `dirname $0`
|
||||||
@ -7,6 +8,16 @@ cd ../.build
|
|||||||
# variables
|
# variables
|
||||||
UTCDATE=`date -u "+%Y%m%d-%H%M%S"`
|
UTCDATE=`date -u "+%Y%m%d-%H%M%S"`
|
||||||
|
|
||||||
|
# Create proper directory structure
|
||||||
|
mkdir -p build
|
||||||
|
mv * build || true
|
||||||
|
mkdir -p src
|
||||||
|
|
||||||
|
# Copy rust files
|
||||||
|
cp ../Cargo.precompiled.toml Cargo.toml
|
||||||
|
cp ../build.rs .
|
||||||
|
cp ../src/lib.rs* ./src/
|
||||||
|
|
||||||
# init git
|
# init git
|
||||||
rm -rf ./.git
|
rm -rf ./.git
|
||||||
git init
|
git init
|
||||||
|
@ -1,19 +1,11 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# change into main dir
|
||||||
# change into the submodule build directory
|
|
||||||
pushd `dirname $0`
|
pushd `dirname $0`
|
||||||
cd ../build
|
cd ../../
|
||||||
|
|
||||||
if [ -z "$1" ]; then
|
cargo update -p parity-ui-precompiled
|
||||||
popd
|
|
||||||
echo "Usage: $0 <sha-commit>"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
git fetch
|
|
||||||
git fetch origin $1
|
|
||||||
git merge $1 -X theirs
|
|
||||||
|
|
||||||
popd
|
popd
|
||||||
exit 0
|
exit 0
|
||||||
|
22
js/src/lib.rs
Normal file
22
js/src/lib.rs
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
// Copyright 2015, 2016 Ethcore (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 <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
#[cfg(feature = "with-syntex")]
|
||||||
|
include!(concat!(env!("OUT_DIR"), "/lib.rs"));
|
||||||
|
|
||||||
|
#[cfg(not(feature = "with-syntex"))]
|
||||||
|
include!("lib.rs.in");
|
||||||
|
|
@ -20,7 +20,7 @@ use std::collections::HashMap;
|
|||||||
use parity_dapps_glue::{WebApp, File, Info};
|
use parity_dapps_glue::{WebApp, File, Info};
|
||||||
|
|
||||||
#[derive(WebAppFiles)]
|
#[derive(WebAppFiles)]
|
||||||
#[webapp(path = "../../../js/build")]
|
#[webapp(path = "../build")]
|
||||||
pub struct App {
|
pub struct App {
|
||||||
pub files: HashMap<&'static str, File>,
|
pub files: HashMap<&'static str, File>,
|
||||||
}
|
}
|
||||||
@ -43,7 +43,7 @@ impl WebApp for App {
|
|||||||
name: "Parity UI",
|
name: "Parity UI",
|
||||||
version: env!("CARGO_PKG_VERSION"),
|
version: env!("CARGO_PKG_VERSION"),
|
||||||
author: "Ethcore <admin@ethcore.io>",
|
author: "Ethcore <admin@ethcore.io>",
|
||||||
description: "New UI for Parity. (Experimental)",
|
description: "New UI for Parity.",
|
||||||
icon_url: "icon.png",
|
icon_url: "icon.png",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -51,5 +51,5 @@ impl WebApp for App {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_js() {
|
fn test_js() {
|
||||||
parity_dapps_glue::js::build(concat!(env!("CARGO_MANIFEST_DIR"), "/../../js"));
|
parity_dapps_glue::js::build(env!("CARGO_MANIFEST_DIR"));
|
||||||
}
|
}
|
@ -15,18 +15,17 @@ rand = "0.3.14"
|
|||||||
jsonrpc-core = "3.0"
|
jsonrpc-core = "3.0"
|
||||||
log = "0.3"
|
log = "0.3"
|
||||||
env_logger = "0.3"
|
env_logger = "0.3"
|
||||||
|
parity-dapps-glue = { version = "1.4", optional = true }
|
||||||
ws = { git = "https://github.com/ethcore/ws-rs.git", branch = "mio-upstream-stable" }
|
ws = { git = "https://github.com/ethcore/ws-rs.git", branch = "mio-upstream-stable" }
|
||||||
ethcore-util = { path = "../util" }
|
ethcore-util = { path = "../util" }
|
||||||
ethcore-io = { path = "../util/io" }
|
ethcore-io = { path = "../util/io" }
|
||||||
ethcore-rpc = { path = "../rpc" }
|
ethcore-rpc = { path = "../rpc" }
|
||||||
ethcore-devtools = { path = "../devtools" }
|
ethcore-devtools = { path = "../devtools" }
|
||||||
parity-dapps-glue = { path = "../dapps/js-glue", version = "1.4", optional = true}
|
parity-ui = { path = "../dapps/ui", version = "1.4", optional = true }
|
||||||
parity-ui = { path = "../dapps/ui", version = "1.4", optional = true}
|
|
||||||
|
|
||||||
clippy = { version = "0.0.90", optional = true}
|
clippy = { version = "0.0.90", optional = true}
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
dev = ["clippy"]
|
dev = ["clippy"]
|
||||||
ui = ["parity-dapps-glue", "parity-ui"]
|
ui = ["parity-dapps-glue", "parity-ui", "parity-ui/no-precompiled-js"]
|
||||||
use-precompiled-js = ["parity-ui/use-precompiled-js"]
|
ui-precompiled = ["parity-dapps-glue", "parity-ui", "parity-ui/use-precompiled-js"]
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ use std::str::FromStr;
|
|||||||
use jsonrpc_core::IoHandler;
|
use jsonrpc_core::IoHandler;
|
||||||
use util::{H256, Mutex, version};
|
use util::{H256, Mutex, version};
|
||||||
|
|
||||||
#[cfg(feature = "ui")]
|
#[cfg(feature = "parity-ui")]
|
||||||
mod ui {
|
mod ui {
|
||||||
extern crate parity_ui as ui;
|
extern crate parity_ui as ui;
|
||||||
extern crate parity_dapps_glue as dapps;
|
extern crate parity_dapps_glue as dapps;
|
||||||
@ -46,7 +46,7 @@ mod ui {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#[cfg(not(feature = "ui"))]
|
#[cfg(not(feature = "parity-ui"))]
|
||||||
mod ui {
|
mod ui {
|
||||||
pub struct File {
|
pub struct File {
|
||||||
pub content: &'static [u8],
|
pub content: &'static [u8],
|
||||||
|
Loading…
Reference in New Issue
Block a user