Skip to content

Instantly share code, notes, and snippets.

@dmilith
Last active February 18, 2020 10:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dmilith/844602f81ef3ed712651ab14ec299f8b to your computer and use it in GitHub Desktop.
Save dmilith/844602f81ef3ed712651ab14ec299f8b to your computer and use it in GitHub Desktop.
Rust + WASM project, common consts splitted as 2 "features": production and development
[features]
development = []
production = []
/// API endpoint
pub const API_ROOT: &str = "http://127.1:9009";
/// API endpoint
pub const API_ROOT: &str = "http://127.1:8080";
#[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::*;
/// 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