main.rs 1.84 KB
Newer Older
Éloïs's avatar
Éloïs committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
//  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/>.

//! Main function for classic duniter-rust nodes (no specialization).

#![cfg_attr(feature = "strict", deny(warnings))]
#![deny(
20 21 22 23 24 25 26 27
    missing_docs,
    missing_debug_implementations,
    missing_copy_implementations,
    trivial_casts,
    trivial_numeric_casts,
    unsafe_code,
    unstable_features,
    unused_import_braces,
Éloïs's avatar
Éloïs committed
28 29
    unused_qualifications
)]
30

31 32
pub use duniter_core::cli::DursOpt;
pub use duniter_core::*;
33
#[cfg(unix)]
34
pub use durs_tui::TuiModule;
35
//pub use durs_skeleton::SkeletonModule;
36 37
pub use durs_ws2p_v1_legacy::WS2PModule;
//pub use durs_ws2p::WS2Pv2Module;
38
use structopt::StructOpt;
Éloïs's avatar
Éloïs committed
39

Éloïs's avatar
Éloïs committed
40
/// Main function
41 42
#[cfg(unix)]
#[cfg(not(target_arch = "arm"))]
Éloïs's avatar
Éloïs committed
43
fn main() {
44
    durs_core_server!(
45 46
        durs_inject_cli![WS2PModule /*, SkeletonModule ,DasaModule*/],
        durs_plug!([WS2PModule], [TuiModule /*, SkeletonModule ,DasaModule*/])
47
    );
48 49 50 51
}
#[cfg(unix)]
#[cfg(target_arch = "arm")]
fn main() {
52
    durs_core_server!(
53
        durs_inject_cli![WS2PModule, TuiModule],
54
        durs_plug!([WS2PModule], [TuiModule])
55
    );
Éloïs's avatar
Éloïs committed
56
}
57 58
#[cfg(windows)]
fn main() {
59
    durs_core_server!(durs_inject_cli![WS2PModule], durs_plug!([WS2PModule], []));
60
}