Select Git revision
-
Hugo Trentesaux authored
* revert spec version will be managed in #195 * update instructions * update runtime version and documentation to generate it locally
Hugo Trentesaux authored* revert spec version will be managed in #195 * update instructions * update runtime version and documentation to generate it locally
lib.rs 28.60 KiB
// Copyright (C) 2018 The Duniter Project Developers.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program 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 Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
//! Crate containing Duniter-rust core.
//#![cfg_attr(feature = "cargo-clippy", allow(implicit_hasher))]
#![deny(
missing_docs,
missing_copy_implementations,
trivial_casts,
trivial_numeric_casts,
unsafe_code,
unstable_features,
unused_import_braces,
unused_qualifications
)]
#[macro_use]
extern crate log;
#[macro_use]
extern crate structopt;
pub mod change_conf;
pub mod cli;
pub mod router;
pub use duniter_conf::{keys::*, ChangeGlobalConf, DuRsConf, DuniterKeyPairs, KEYPAIRS_FILENAME};
use duniter_module::*;
use duniter_network::cli::sync::*;
use duniter_network::NetworkModule;
use durs_blockchain::{BlockchainModule, DBExQuery, DBExTxQuery, DBExWotQuery};
use durs_message::*;
use log::Level;
use simplelog::*;
//use std::error::Error;
//use std::fmt::{Debug, Formatter};
use crate::cli::keys::*;
use crate::cli::*;
use std::collections::HashMap;
use std::fs;
use std::fs::{File, OpenOptions};
use std::sync::mpsc;
use std::thread;
use structopt::clap::{App, ArgMatches};
use structopt::StructOpt;
#[macro_export]
/// Launch durs core server
macro_rules! durs_core_server {
( $closure_inject_cli:expr, $closure_plug:expr ) => {{
duniter_core::main(
env!("CARGO_PKG_NAME"),
env!("CARGO_PKG_VERSION"),
&DursOpt::clap(),
$closure_inject_cli,
$closure_plug,
);
}};