pzzld_server/
lib.rs

1/*
2    Appellation: puzzled <library>
3    Contrib: FL03 <jo3mccain@icloud.com>
4*/
5//! # puzzled
6//!
7//! `puzzled` is a library for creating and managing a network of nodes.
8#[doc(inline)]
9pub use self::{
10    config::Settings,
11    consts::*,
12    error::Error,
13    platform::{Context, Platform},
14    traits::prelude::*,
15    types::prelude::*,
16    utils::*,
17};
18
19#[macro_use]
20pub(crate) mod macros;
21pub(crate) mod utils;
22
23pub mod cli;
24pub mod config;
25pub mod error;
26pub mod platform;
27pub mod traits;
28pub mod types;
29pub mod workers;
30
31pub mod prelude {
32    pub use super::consts::*;
33
34    pub use super::cli::prelude::*;
35    pub use super::config::prelude::*;
36    pub use super::error::Error;
37    pub use super::platform::prelude::*;
38    pub use super::traits::prelude::*;
39    pub use super::types::prelude::*;
40    pub use super::workers::prelude::*;
41}
42
43pub mod consts {
44    /// The name of the application.
45    pub const APP_NAME: &str = "pzzld";
46    /// The name of the artifacts directory.
47    pub const ARTIFACTS: &str = ".artifacts";
48    /// The default location for the configuration directory.
49    pub const DEFAULT_CONFIG_DIR: &str = ".config";
50    /// A str constant for the localhost address.
51    pub const LOCALHOST: &str = "127.0.0.1";
52
53    pub const DEFAULT_HOST: &str = "0.0.0.0";
54    /// The default port for the application.
55    pub const DEFAULT_PORT: u16 = 8080;
56
57    pub const DEFAULT_CONTEXT: &str = ".pzzld";
58
59    pub const DEFAULT_WORKDIR: &str = "dist";
60
61    #[allow(unused)]
62    pub(crate) const ROOT: &str = env!("CARGO_MANIFEST_DIR");
63}