oxedyne/fe2o3/fe2o3_shield/src/app/constant.rs
1.7 KiB, 7 runs
created by r1870400018:4066, which is this file's identity for as long as the history lasts, whatever it is later renamed to
download · who wrote it · its history
| 1 | use oxedyne_fe2o3_jdat::version::SemVer; |
| 2 | use oxedyne_fe2o3_o3db_sync::{ |
| 3 | comm::response::Wait, |
| 4 | }; |
| 5 | |
| 6 | pub const VERSION: SemVer = SemVer::new(0, 1, 0); |
| 7 | pub const DB_DIR: &'static str = "o3db"; |
| 8 | pub const DEFAULT_LOG_LEVEL: &'static str = "info"; |
| 9 | pub const LOG_FILE_EXTENSION: &'static str = "log"; |
| 10 | |
| 11 | pub const CONFIG_NAME: &'static str = "config.jdat"; |
| 12 | pub const WALLET_NAME: &'static str = "wallet.jdat"; |
| 13 | // Retain enough passhashes to be satisfied that the user is not reusing recent passphrases. |
| 14 | pub const NUM_PREV_PASSHASHES_TO_RETAIN: usize = 10; |
| 15 | // Timeouts. |
| 16 | pub const GET_DATA_WAIT: Wait = Wait::new_default(); |
| 17 | // Key derivation functions. |
| 18 | pub const KDF_HASH_LEN: u32 = 32; |
| 19 | pub const KDF_SALT_LEN: usize = 16; |
| 20 | pub const KDF_MEM_COST_KB: u32 = 104_858; // 100 MiB in KB |
| 21 | pub const KDF_TIME_COST_PASSES: u32 = 5; |
| 22 | |
| 23 | pub const WS_APP_MSG_LIMIT: u16 = 100; // Arbitrary. |
| 24 | |
| 25 | // User interface. |
| 26 | pub const MAX_CREATE_PASS_ATTEMPTS: usize = 3; // Arbitrary. |
| 27 | pub const SYNTAX_CMD_SIMILARITY_THRESHOLD: f64 = 0.7; |
| 28 | |
| 29 | // Development. |
| 30 | pub const DEV_TREE_CREATE: &[&str] = &[ |
| 31 | "tls/dev", |
| 32 | "tls/prod", |
| 33 | "www/logs", |
| 34 | "www/public", |
| 35 | "www/public/assets", |
| 36 | "www/public/assets/font", |
| 37 | "www/public/assets/img", |
| 38 | "www/public/bundles", |
| 39 | "www/public/bundles/js", |
| 40 | "www/src/js", |
| 41 | "www/src/js/components", |
| 42 | "www/src/js/pages", |
| 43 | "www/src/js/pages/main", |
| 44 | "www/src/js/pages/admin", |
| 45 | "www/src/js/utils", |
| 46 | "www/src/styles", |
| 47 | "www/src/styles/components", |
| 48 | ]; |
| 49 | pub const INIT_TREE_HALT: &[&str] = &[ |
| 50 | "www/public", |
| 51 | "www/src", |
| 52 | ]; |