Last active
February 18, 2020 10:05
-
-
Save dmilith/844602f81ef3ed712651ab14ec299f8b to your computer and use it in GitHub Desktop.
Rust + WASM project, common consts splitted as 2 "features": production and development
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[features] | |
development = [] | |
production = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// API endpoint | |
pub const API_ROOT: &str = "http://127.1:9009"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// API endpoint | |
pub const API_ROOT: &str = "http://127.1:8080"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[cfg(feature = "development")] | |
use crate::development as api; | |
#[cfg(feature = "production")] | |
use crate::production as api; | |
#[cfg(target_os = "macos")] | |
use crate::default as api; // NOTE: for rls / clippy in slt :) | |
pub use api::*; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// API endpoint | |
pub const API_ROOT: &str = "https://some.production.io"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment