drying hypervisor

This commit is contained in:
NikVolf 2016-08-01 19:53:53 +02:00
parent d8a3137ce8
commit 1809961f94
6 changed files with 7 additions and 34 deletions

2
Cargo.lock generated
View File

@ -279,7 +279,6 @@ dependencies = [
"rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", "rust-crypto 0.2.36 (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)",
"semver 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "semver 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"syntex 0.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
@ -346,7 +345,6 @@ 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)",
"nanomsg 0.5.1 (git+https://github.com/ethcore/nanomsg.rs.git)", "nanomsg 0.5.1 (git+https://github.com/ethcore/nanomsg.rs.git)",
"semver 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "semver 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"syntex 0.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]

View File

@ -8,7 +8,6 @@ authors = ["Ethcore <admin@ethcore.io>"]
build = "build.rs" build = "build.rs"
[build-dependencies] [build-dependencies]
syntex = "*"
"ethcore-ipc-codegen" = { path = "../ipc/codegen" } "ethcore-ipc-codegen" = { path = "../ipc/codegen" }
[dependencies] [dependencies]
@ -35,7 +34,6 @@ ethcore-ipc = { path = "../ipc/rpc" }
ethstore = { path = "../ethstore" } ethstore = { path = "../ethstore" }
ethcore-ipc-nano = { path = "../ipc/nano" } ethcore-ipc-nano = { path = "../ipc/nano" }
[dependencies.hyper] [dependencies.hyper]
git = "https://github.com/ethcore/hyper" git = "https://github.com/ethcore/hyper"
default-features = false default-features = false

View File

@ -14,10 +14,10 @@
// 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/>.
extern crate ethcore_ipc_codegen as codegen; extern crate ethcore_ipc_codegen;
fn main() { fn main() {
codegen::derive_binary("src/types/mod.rs.in"); ethcore_ipc_codegen::derive_binary("src/types/mod.rs.in").unwrap();
codegen::derive_ipc("src/client/traits.rs"); ethcore_ipc_codegen::derive_ipc("src/client/traits.rs").unwrap();
codegen::derive_ipc("src/client/chain_notify.rs"); ethcore_ipc_codegen::derive_ipc("src/client/chain_notify.rs").unwrap();
} }

View File

@ -15,5 +15,4 @@ semver = "0.2"
log = "0.3" log = "0.3"
[build-dependencies] [build-dependencies]
syntex = "*"
ethcore-ipc-codegen = { path = "../codegen" } ethcore-ipc-codegen = { path = "../codegen" }

View File

@ -14,30 +14,8 @@
// 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/>.
extern crate syntex; extern crate ethcore_ipc_codegen;
extern crate ethcore_ipc_codegen as codegen;
use std::env;
use std::path::Path;
fn main() { fn main() {
let out_dir = env::var_os("OUT_DIR").unwrap(); ethcore_ipc_codegen::derive_ipc("src/service.rs.in").unwrap();
// ipc pass
{
let src = Path::new("src/service.rs.in");
let dst = Path::new(&out_dir).join("hypervisor_service_ipc.rs");
let mut registry = syntex::Registry::new();
codegen::register(&mut registry);
registry.expand("", &src, &dst).unwrap();
}
// serialization pass
{
let src = Path::new(&out_dir).join("hypervisor_service_ipc.rs");
let dst = Path::new(&out_dir).join("hypervisor_service_cg.rs");
let mut registry = syntex::Registry::new();
codegen::register(&mut registry);
registry.expand("", &src, &dst).unwrap();
}
} }

View File

@ -17,4 +17,4 @@
//! Parity interprocess hypervisor IPC service //! Parity interprocess hypervisor IPC service
#![allow(dead_code, unused_assignments, unused_variables)] // codegen issues #![allow(dead_code, unused_assignments, unused_variables)] // codegen issues
include!(concat!(env!("OUT_DIR"), "/hypervisor_service_cg.rs")); include!(concat!(env!("OUT_DIR"), "/service.rs.in"));